-- ----------------------------
-- Table structure for qimall_addons_short_video
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video`;
CREATE TABLE `qimall_addons_short_video`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL COMMENT '商家id',
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
  `video_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '视频路径',
  `first_frame` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '首帧',
  `video_wide` int(11) NOT NULL DEFAULT 0 COMMENT '视频宽度',
  `video_long` int(11) NOT NULL DEFAULT 0 COMMENT '视频长度',
  `duration_str` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '视频时长（时分秒字符串形式），upload_type = video 时才有意义',
  `duration_seconds` float(6, 2) NOT NULL DEFAULT 0.00 COMMENT '视频时长（秒为单位浮点数形式），upload_type = video 时才有意义',
  `related_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '关联类型1：关联商品 2：关联店铺 3：关联地址',
  `related_goods_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '关联商品id',
  `related_store_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '关联门店id',
  `related_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联地址',
  `related_detailed_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联详细地址',
  `related_lon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联经度',
  `related_lat` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联维度',
  `tag_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标签id',
  `open_integral_award` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启积分奖励 0：未开启 1：开启',
  `open_money_award` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启现金奖励 0：未开启 1：开启',
  `max_integral` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '积分最大值',
  `surplus_integral` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '剩余的积分',
  `spend_integral` decimal(12, 2) NOT NULL DEFAULT 0.00 COMMENT '花费积分',
  `max_money` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '金额最大值',
  `surplus_money` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '剩余金额',
  `spend_money` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '花费金额',
  `watch_integral_sum` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '观看奖励积分总和',
  `watch_integral` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '观看奖励积分百分比',
  `watch_integral_one` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '观看奖励积分一级百分比',
  `watch_integral_two` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '观看奖励现金二级百分比',
  `watch_money_sum` decimal(10, 0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看现金奖励总和',
  `watch_money` decimal(10, 0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看奖励现金百分比',
  `watch_money_one` decimal(10, 0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看奖励现金一级百分比',
  `watch_money_two` decimal(10, 0) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看奖励现金二级百分比',
  `check_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '审核备注',
  `check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '审核状态：0：未审核 1：审核通过 2：审核不通过',
  `comment_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评论量',
  `like_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '点赞量',
  `look_people_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看人数',
  `look_complete_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '完整观看人数',
  `look_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '浏览量',
  `share_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分享数量',
  `share_click_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分享点击次数',
  `is_blacklist` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否拉黑0：否 1：是',
  `is_top` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否置顶0：否 1：是',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `check_time` int(11) NOT NULL DEFAULT 0 COMMENT '审核时间',
  `top_time` int(11) NOT NULL DEFAULT 0 COMMENT '置顶时间',
  `blacklist_time` int(11) NOT NULL DEFAULT 0 COMMENT '拉黑时间',
  `created_at` int(11) NOT NULL DEFAULT 0,
  `updated_at` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mu_id`(`mall_id`, `user_id`) USING BTREE,
  INDEX `related_type`(`related_type`) USING BTREE,
  INDEX `is_blacklist`(`is_blacklist`) USING BTREE,
  INDEX `check_status`(`check_status`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频列表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_browse
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_browse`;
CREATE TABLE `qimall_addons_short_video_browse`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户id',
  `is_share` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否分享观看 0：否 1：是',
  `is_complete_look` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否完整观看0：否 1：是',
  `complete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '完整观看时间',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mvu_id`(`mall_id`, `video_id`, `user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频浏览记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_browse_award
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_browse_award`;
CREATE TABLE `qimall_addons_short_video_browse_award`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户id',
  `source_user_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '源头id',
  `user_type` tinyint(4) NULL DEFAULT 0 COMMENT '用户类型：0：本人 1：一级 2：二级',
  `award_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '奖励类型 0：积分 1：现金',
  `award_integral` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励积分',
  `award_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励金额',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mvu_id`(`mall_id`, `video_id`, `user_id`) USING BTREE,
  INDEX `award_type`(`award_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '观看视频奖励' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_browse_num
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_browse_num`;
CREATE TABLE `qimall_addons_short_video_browse_num`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `look_num` int(10) UNSIGNED NULL DEFAULT 1 COMMENT '观看次数',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mu_id`(`mall_id`, `user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户观看视频次数' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_comment
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_comment`;
CREATE TABLE `qimall_addons_short_video_comment`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论内容',
  `like_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '点赞量',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mall_video_id`(`mall_id`, `video_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频评论列表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_comment_like
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_comment_like`;
CREATE TABLE `qimall_addons_short_video_comment_like`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用戶id',
  `comment_id` int(10) UNSIGNED NOT NULL COMMENT '评论ID',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_muc_id`(`mall_id`, `user_id`, `comment_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评论点赞表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_commission_item_setting
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_commission_item_setting`;
CREATE TABLE `qimall_addons_short_video_commission_item_setting`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mall_id` int(11) NOT NULL COMMENT '商城ID',
  `is_enable` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否启用带货奖励：0:否;1是',
  `is_alone` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否独立设置：0:否;1是',
  `is_extra` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启额外分红：0:否;1是',
  `item_id` int(11) NOT NULL DEFAULT 0 COMMENT '项目id',
  `item_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '项目类型：商品goods',
  `commission_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '分佣类型：佣金：commission',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(11) NOT NULL DEFAULT 0,
  `updated_at` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mall_item_id`(`mall_id`, `item_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '短视频项目带货奖励设置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_commission_item_setting_detail
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_commission_item_setting_detail`;
CREATE TABLE `qimall_addons_short_video_commission_item_setting_detail`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mall_id` int(11) NOT NULL COMMENT '商城ID',
  `short_video_commission_item_setting_id` int(11) NOT NULL,
  `level` int(11) NOT NULL DEFAULT 0,
  `calculate_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '计算方式，1：百分比，2：固定值',
  `value` decimal(12, 2) NOT NULL DEFAULT 0.00 COMMENT '值，calculate_type = 1 时表示百分比（计算时需要 /100）;calculate_type = 2 时表示设置的固定值',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(11) NOT NULL DEFAULT 0,
  `updated_at` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_m_c_id`(`mall_id`, `short_video_commission_item_setting_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短视频项目带货奖励设置详情' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_config
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_config`;
CREATE TABLE `qimall_addons_short_video_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启 0--关闭|1--开启',
  `is_check` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否需要审核0：否 1：是',
  `release_rule` tinyint(4) NOT NULL DEFAULT 0 COMMENT '发布权限：0：无条件 1：有条件',
  `award_status` tinyint(4) NULL DEFAULT 0 COMMENT '是否开启全局带货奖励0：否 1：是',
  `award_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '奖励类型 0：金额 1：百分比',
  `award_percentage` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励百分比',
  `award_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励金额',
  `purchase_times_status` tinyint(4) NULL DEFAULT 0 COMMENT '消费达到多少次 是否开启 0：未开启 1：开启',
  `purchase_times` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '消费达到多少次',
  `purchase_cost_status` tinyint(4) NULL DEFAULT 0 COMMENT '消费达标是否开启0：未开启 1：已开启',
  `purchase_cost` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '消费达到多少钱',
  `purchase_goods_status` tinyint(4) NULL DEFAULT 0 COMMENT '消费商品是否开启0：未开启 1：已开启',
  `purchase_goods_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '消费某个商品',
  `video_lenght` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '视频发布时长',
  `agreement` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '视频协议',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `client_status` tinyint(4) NULL DEFAULT 0 COMMENT '是否开启文本审核 0：否 1：是',
  `start_up_diagram` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启动图',
  `share_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分享图片',
  `share_title` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分享标题',
  `share_content` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分享内容',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mall_id`(`mall_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频配置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_goods
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_goods`;
CREATE TABLE `qimall_addons_short_video_goods`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `goods_id` int(10) UNSIGNED NOT NULL COMMENT '商品ID',
  `share_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '佣金类型 0，固定金额，1百分比',
  `percentage` decimal(10, 0) NULL DEFAULT 0 COMMENT '百分比',
  `fixed_value` decimal(10, 0) NULL DEFAULT 0 COMMENT '固定值',
  `is_alone` tinyint(4) NOT NULL DEFAULT 0 COMMENT '独立设置 0：否 1：是',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mg_id`(`mall_id`, `goods_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短视频商品设置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_like
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_like`;
CREATE TABLE `qimall_addons_short_video_like`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户id',
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_muv_id`(`mall_id`, `user_id`, `video_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '点赞记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_order_award
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_order_award`;
CREATE TABLE `qimall_addons_short_video_order_award`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `order_id` int(10) UNSIGNED NOT NULL COMMENT '子订单id',
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '用户id',
  `goods_id` int(10) UNSIGNED NOT NULL COMMENT '商品id',
  `goods_price` decimal(12, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '商品售价',
  `money` decimal(12, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励金额',
  `award_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '奖励类型 0：金额 1：百分比',
  `award_percentage` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励百分比',
  `award_money` decimal(12, 2) NOT NULL DEFAULT 0.00 COMMENT '奖励金额',
  `is_settlement` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否结算 0：否 1：是',
  `settlement_time` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '结算时间',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `goods_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品数量',
  `is_award` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '是否带货奖励商品 0：否 1：是',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mall_id`(`mall_id`) USING BTREE,
  INDEX `order_id`(`order_id`) USING BTREE,
  INDEX `is_settlement`(`is_settlement`) USING BTREE,
  INDEX `video_id`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短视频带货订单奖励' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_related_goods
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_related_goods`;
CREATE TABLE `qimall_addons_short_video_related_goods`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `video_id` int(10) UNSIGNED NOT NULL,
  `goods_id` int(10) UNSIGNED NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_mv_id`(`mall_id`, `video_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频商品关联记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_share
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_share`;
CREATE TABLE `qimall_addons_short_video_share`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL COMMENT '分享视频的会员的id',
  `share_to_user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '观看分享的会员的id',
  `video_id` int(10) UNSIGNED NOT NULL COMMENT '视频id',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_muv_id`(`mall_id`, `user_id`, `video_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频分享记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for qimall_addons_short_video_tag
-- ----------------------------
DROP TABLE IF EXISTS `qimall_addons_short_video_tag`;
CREATE TABLE `qimall_addons_short_video_tag`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mall_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '标签名称',
  `create_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '创建类型1：用户创建 2：平台创建',
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发布用户id',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发布管理员id',
  `is_recommend` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否推荐 0：否 1：是',
  `recommend_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推荐时间',
  `hot_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '热量',
  `usage_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '使用次数',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态[-1:删除;0:禁用;1启用]',
  `created_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `updated_at` int(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频标签' ROW_FORMAT = Dynamic;

