代码拉取完成,页面将自动刷新
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE
`role` (
`role_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` VARCHAR(32) NOT NULL COMMENT '角色名称',
`role_key` VARCHAR(128) NOT NULL COMMENT '角色权限码',
`role_sort` INT UNSIGNED NOT NULL COMMENT '显示排序',
`status` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(255) DEFAULT '0' COMMENT '备注',
PRIMARY KEY (`role_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '角色表';
-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO
role
VALUES
(
'1',
'超级管理员',
'admin',
1,
'0',
'0',
NOW(),
NULL,
'超级管理员'
);
INSERT INTO
role
VALUES
(
'2',
'普通用户',
'common',
2,
'0',
'0',
NOW(),
NULL,
'普通用户'
);
-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE
`menu` (
`menu_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`menu_name` VARCHAR(50) NOT NULL COMMENT '菜单名称',
`parent_id` BIGINT UNSIGNED DEFAULT '0' COMMENT '父菜单ID',
`order_num` INT UNSIGNED NOT NULL DEFAULT '0' COMMENT '显示排序',
`url` VARCHAR(200) DEFAULT '' COMMENT '请求地址',
`component` VARCHAR(255) DEFAULT '0' COMMENT '组件路径',
`query` VARCHAR(255) DEFAULT '0' COMMENT '请求参数',
`route_name` VARCHAR(64) DEFAULT '' COMMENT '路由名称',
`is_frame` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否外链 0-否 1-是',
`is_cache` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否缓存 0-否 1-是',
`menu_type` TINYINT UNSIGNED DEFAULT '0' COMMENT '菜单类型 0-目录 1-菜单 2-按钮',
`visible` TINYINT UNSIGNED DEFAULT '0' COMMENT '显示状态 0-显示 1-隐藏',
`status` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`perms` VARCHAR(128) DEFAULT '0' COMMENT '权限标识',
`icon` VARCHAR(128) DEFAULT '#' COMMENT '菜单图标',
`create_tiem` VARCHAR(64) DEFAULT '' COMMENT '创建时间',
`update_time` VARCHAR(64) DEFAULT '' COMMENT '更新时间',
`remark` VARCHAR(255) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`menu_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 1000 DEFAULT CHARSET = utf8mb4 COMMENT = '菜单权限表';
-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE
`user_role` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`role_id` BIGINT UNSIGNED NOT NULL COMMENT '角色ID',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`, `role_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户角色关联表';
-- ----------------------------
-- Records of user_role
-- ----------------------------
INSERT INTO
user_role (user_id, role_id, create_time)
VALUES
('1', '1', NOW());
INSERT INTO
user_role (user_id, role_id, create_time)
VALUES
('2', '2', NOW());
-- ----------------------------
-- Table structure for role_menu
-- ----------------------------
DROP TABLE IF EXISTS `role_menu`;
CREATE TABLE
`role_menu` (
`role_id` BIGINT UNSIGNED NOT NULL COMMENT '角色ID',
`menu_id` BIGINT UNSIGNED NOT NULL COMMENT '菜单ID',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`role_id`, `menu_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '角色菜单关联表';
-- ----------------------------
-- Table structure for oper_log
-- ----------------------------
DROP TABLE IF EXISTS `oper_log`;
-- ----------------------------
-- Table structure for oper_log
-- ----------------------------
DROP TABLE IF EXISTS `oper_log`;
CREATE TABLE
`oper_log` (
`oper_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '日志ID',
`title` VARCHAR(64) DEFAULT '' COMMENT '模块标题',
`business_type` TINYINT UNSIGNED DEFAULT '0' COMMENT '业务类型 0-其它 1-新增 2-修改 3-删除 4-授权 5-导出 6-导入 7-强退 8-生成代码 9-清空数据',
`method` VARCHAR(255) DEFAULT '' COMMENT '方法名称',
`request_method` VARCHAR(8) DEFAULT '' COMMENT '请求方式',
`operator_type` TINYINT UNSIGNED DEFAULT '0' COMMENT '操作类别 0-其它 1-后台用户 2-前端用户',
`oper_name` VARCHAR(64) DEFAULT '' COMMENT '操作人员',
`oper_url` VARCHAR(255) DEFAULT '' COMMENT '请求URL',
`oper_ip` VARCHAR(128) DEFAULT '' COMMENT '操作IP',
`oper_location` VARCHAR(255) DEFAULT '' COMMENT '操作地点',
`oper_param` VARCHAR(2000) DEFAULT '' COMMENT '请求参数',
`json_result` VARCHAR(2000) DEFAULT '' COMMENT '返回参数',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '操作状态 0-正常 1-异常',
`oper_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
`cost_time` BIGINT UNSIGNED DEFAULT '0' COMMENT '耗时',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-未删除 1-已删除',
PRIMARY KEY (`oper_id`),
KEY idx_oper_log_bt (`business_type`),
KEY idx_oper_log_s (`status`),
KEY idx_oper_log_ot (`oper_time`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = '操作日志';
-- ----------------------------
-- Table structure for dict_type
-- ----------------------------
DROP TABLE IF EXISTS `dict_type`;
CREATE TABLE
`dict_type` (
`dict_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '字典主键',
`dict_name` VARCHAR(128) DEFAULT '' COMMENT '字典名称',
`dict_type` VARCHAR(128) DEFAULT '' COMMENT '字典类型',
`status` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(255) DEFAULT '0' COMMENT '备注',
PRIMARY KEY (`dict_id`),
UNIQUE (`dict_type`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '字典类型表';
-- ----------------------------
-- Table structure for dict_data
-- ----------------------------
DROP TABLE IF EXISTS `dict_data`;
CREATE TABLE
`dict_data` (
`dict_code` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '字典编码',
`dict_sort` INT UNSIGNED DEFAULT '0' COMMENT '字典排序',
`dict_label` VARCHAR(128) DEFAULT '' COMMENT '字典标签',
`dict_value` VARCHAR(128) DEFAULT '' COMMENT '字典键值',
`dict_type` VARCHAR(128) DEFAULT '' COMMENT '字典类型',
`css_class` VARCHAR(128) DEFAULT '' COMMENT '样式属性(其他样式扩展)',
`list_class` VARCHAR(128) DEFAULT '' COMMENT '表格回显样式',
`is_default` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否默认 0-否 1-是',
`status` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(255) DEFAULT '0' COMMENT '备注',
PRIMARY KEY (`dict_code`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '字典数据表';
-- ----------------------------
-- Table structure for login_infor
-- ----------------------------
DROP TABLE IF EXISTS `login_infor`;
CREATE TABLE
`login_infor` (
`info_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '访问ID',
`login_name` VARCHAR(64) DEFAULT '' COMMENT '登录账号',
`ipaddr` VARCHAR(128) DEFAULT '' COMMENT '登录IP地址',
`login_location` VARCHAR(255) DEFAULT '' COMMENT '登录地点',
`browser` VARCHAR(64) DEFAULT '' COMMENT '浏览器类型',
`os` VARCHAR(64) DEFAULT '' COMMENT '操作系统',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '登录状态 0-成功 1-失败',
`msg` VARCHAR(255) DEFAULT '' COMMENT '提示消息',
`login_time` DATETIME COMMENT '访问时间',
PRIMARY KEY (`info_id`),
KEY idx_login_infor_ls (`status`),
KEY idx_login_infor_lt (`login_time`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '系统访问记录';
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE
`user` (
`user_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '帐号',
`password` VARCHAR(255) NOT NULL COMMENT '密码',
`nick_name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '昵称',
`sex` TINYINT UNSIGNED DEFAULT '0' COMMENT '性别 0-未知 1-男 2-女',
`email` VARCHAR(50) NOT NULL COMMENT '邮箱',
`face` VARCHAR(255) DEFAULT '' COMMENT '头像',
`level` INT UNSIGNED DEFAULT '1' COMMENT '等级',
`silence_time` DATETIME DEFAULT NULL COMMENT '封禁时间',
`sign` VARCHAR(255) DEFAULT '' COMMENT '签名',
`description` VARCHAR(255) DEFAULT '' COMMENT '个人简介',
`silence` TINYINT UNSIGNED DEFAULT '0' COMMENT '封禁状态 0-未封禁 1-封禁',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '逻辑删除 0-未删除 1-已删除',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(255) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`user_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT '用户表';
-- ----------------------------
-- Table structure for user_follower
-- ----------------------------
DROP TABLE IF EXISTS `user_follower`;
CREATE TABLE
`user_follower` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`follower_id` BIGINT UNSIGNED NOT NULL COMMENT '关注者ID',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '关注状态 0-关注 1-取消关注',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`, `follower_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户关注表';
-- ----------------------------
-- Table structure for user_blacks
-- ----------------------------
DROP TABLE IF EXISTS `user_blacks`;
CREATE TABLE
`user_blacks` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`black_id` BIGINT UNSIGNED NOT NULL COMMENT '拉黑用户ID',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '拉黑状态 0-拉黑 1-取消拉黑',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`, `black_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户黑名单表';
-- ----------------------------
-- Table structure for media
-- ----------------------------
DROP TABLE IF EXISTS `media`;
CREATE TABLE
`media` (
`media_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '收藏夹ID',
`name` VARCHAR(255) NOT NULL COMMENT '收藏夹名称',
`description` VARCHAR(255) NOT NULL COMMENT '收藏夹描述',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`open` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否公开 0-私密 1-公开',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '逻辑删除 0-未删除 1-已删除',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`media_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4;
-- ----------------------------
-- Table structure for media_video
-- ----------------------------
DROP TABLE IF EXISTS `media_video`;
CREATE TABLE
`media_video` (
`media_id` BIGINT UNSIGNED NOT NULL COMMENT '收藏夹ID',
`video_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
PRIMARY KEY (`media_id`, `video_id`, `user_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE
`sys_config` (
`config_id` INT UNSIGNED NOT NULL COMMENT '参数ID',
`config_name` VARCHAR(100) DEFAULT '' COMMENT '参数名称',
`config_key` VARCHAR(100) DEFAULT '' COMMENT '参数键名',
`config_value` VARCHAR(500) DEFAULT '' COMMENT '参数键值',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`config_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '参数配置表';
-- ----------------------------
-- Table structure for type
-- ----------------------------
DROP TABLE IF EXISTS `type`;
CREATE TABLE
`type` (
`type_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '分区ID',
`type_name` VARCHAR(50) NOT NULL COMMENT '分区代号',
`parent_id` BIGINT UNSIGNED DEFAULT '0' COMMENT '父分区ID',
`order_num` INT UNSIGNED NOT NULL DEFAULT '0' COMMENT '显示排序',
`url` VARCHAR(200) DEFAULT '' COMMENT '路由地址',
`component` VARCHAR(255) DEFAULT '' COMMENT '组件路径',
`route_name` VARCHAR(50) DEFAULT '' COMMENT '路由名称',
`is_cache` TINYINT UNSIGNED DEFAULT '1' COMMENT '是否缓存 0-否 1-是',
`visible` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否显示 0-否 1-是',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`icon` VARCHAR(128) DEFAULT '' COMMENT '图标',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
`remark` VARCHAR(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`type_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4;
-- ----------------------------
-- Table structure for video
-- ----------------------------
DROP TABLE IF EXISTS `video`;
CREATE TABLE
`video` (
`video_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '视频ID',
`video_aid` VARCHAR(255) NOT NULL COMMENT '视频av号',
`video_bvid` VARCHAR(255) NOT NULL COMMENT '视频bv号',
`owner_id` BIGINT UNSIGNED NOT NULL COMMENT 'UPID',
`type_id` BIGINT UNSIGNED NOT NULL COMMENT '分区ID',
`type_name` VARCHAR(50) NOT NULL COMMENT '子分区名称',
`title` VARCHAR(255) NOT NULL COMMENT '视频标题',
`copyright` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否自制 0-否 1-是',
`cover` VARCHAR(255) NOT NULL COMMENT '视频封面URL',
`pubdate` DATETIME COMMENT '发布时间',
`desc` VARCHAR(255) NOT NULL COMMENT '视频简介',
`state` TINYINT DEFAULT '0' COMMENT '视频状态 该字段为二进制标志位,多个标志请用 OR运算叠加 0-开放浏览 1-橙色通过 -1-待审 -2-被打回 -3-网警锁定 -4-被锁定 -5-管理员锁定 -6-修复待审 -7-暂缓审核 -8-补档待审 -9-等待转码 -10-延迟审核 -11-视频源待修 -12-转储失败 -13-允许评论待审 -14-临时回收站 -15-分发中 -16-转码失败 -20-创建未提交 -30-创建已提交 -40-定时发布 -100-用户删除',
`duration` INT UNSIGNED DEFAULT '0' COMMENT '视频时长 单位秒',
`forward` VARCHAR(255) DEFAULT NULL COMMENT '撞车视频AID',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`video_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '视频表';
-- ---------------------------
-- Table structure for dynamic
-- ---------------------------
DROP TABLE IF EXISTS `dynamic`;
CREATE TABLE
`dynamic` (
`dynamic_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '动态ID',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`content` TEXT NOT NULL COMMENT '动态内容',
`pubdate` DATETIME COMMENT '发布时间',
`state` TINYINT DEFAULT '0' COMMENT '视频状态 该字段为二进制标志位,多个标志请用 OR运算叠加 0-开放浏览 1-橙色通过 -1-待审 -2-被打回 -3-网警锁定 -4-被锁定 -5-管理员锁定 -6-修复待审 -7-暂缓审核 -8-补档待审 -9-等待转码 -10-延迟审核 -11-视频源待修 -12-转储失败 -13-允许评论待审 -14-临时回收站 -15-分发中 -16-转码失败 -20-创建未提交 -30-创建已提交 -40-定时发布 -100-用户删除',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`dynamic_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT '动态表';
-- ---------------------------
-- Table structure for space
-- ---------------------------
DROP TABLE IF EXISTS `space`;
CREATE TABLE
`space` (
`space_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '头图ID',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`name` VARCHAR(255) NOT NULL COMMENT '头图名称',
`s_img` VARCHAR(255) NOT NULL COMMENT '小图',
`l_img` VARCHAR(255) NOT NULL COMMENT '大图',
`status` TINYINT UNSIGNED DEFAULT '0' COMMENT '状态 0-正常 1-停用',
`is_open` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否公开 0-私密 1-公用',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`space_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4;
-- ----------------------------
-- Table structure for video_user_action
-- ----------------------------
DROP TABLE IF EXISTS `user_video_action`;
CREATE TABLE
`user_video_action` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`video_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`is_like` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否点赞 0-未点赞 1-已点赞',
`is_coin` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否投币 0-未投币 1-投1币 2-投2币',
`is_favorite` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否收藏 0-未收藏 1-已收藏',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`, `video_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT '用户视频互动表';
-- ----------------------------
-- Table structure for user_dynamic_action
-- ----------------------------
DROP TABLE IF EXISTS `user_dynamic_action`;
CREATE TABLE
`user_dynamic_action` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`dynamic_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`is_like` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否点赞 0-未点赞 1-已点赞',
`is_coin` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否投币 0-未投币 1-投1币 2-投2币',
`is_favorite` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否收藏 0-未收藏 1-已收藏',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`, `dynamic_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT '用户动态互动表';
-- ---------------------------
-- Table structure for reply
-- ---------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE
`reply` (
`reply_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '评论ID',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`root_id` BIGINT UNSIGNED DEFAULT '0' COMMENT '根评论ID',
`parent_id` BIGINT UNSIGNED DEFAULT '0' COMMENT '父评论ID',
`dialog_id` BIGINT UNSIGNED DEFAULT '0' COMMENT '对话用户ID',
`count` INT UNSIGNED DEFAULT '0' COMMENT '二级评论数',
`rcount` INT UNSIGNED DEFAULT '0' COMMENT '回复数',
`floor` INT UNSIGNED DEFAULT '0' COMMENT '楼层',
`message` TEXT NOT NULL COMMENT '评论内容',
`is_fansgrade` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否具有粉丝标签 0-否 1-是',
`like` INT UNSIGNED DEFAULT '0' COMMENT '点赞数',
`is_visible` TINYINT UNSIGNED DEFAULT '1' COMMENT '是否可见 0-否 1-是',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`reply_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT '评论表';
-- ---------------------------
-- Table structure for video_stat
-- ---------------------------
DROP TABLE IF EXISTS `video_stat`;
CREATE TABLE
`video_stat` (
`video_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`star` INT UNSIGNED DEFAULT '0' COMMENT '获赞数',
`view_count` INT UNSIGNED DEFAULT '0' COMMENT '播放量',
`coins` INT UNSIGNED DEFAULT '0' COMMENT '硬币数',
`share` INT UNSIGNED DEFAULT '0' COMMENT '分享数',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`video_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '视频数据表';
-- ----------------------------
-- Table structure for dynamic_stat
-- ----------------------------
DROP TABLE IF EXISTS `dynamic_stat`;
CREATE TABLE
`dynamic_stat` (
`dynamic_id` BIGINT UNSIGNED NOT NULL,
`star` INT UNSIGNED DEFAULT '0' COMMENT '获赞数',
`view_count` INT UNSIGNED DEFAULT '0' COMMENT '播放量',
`coins` INT UNSIGNED DEFAULT '0' COMMENT '硬币数',
`share` INT UNSIGNED DEFAULT '0' COMMENT '分享数',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`dynamic_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '动态数据表';
-- ----------------------------
-- Table structure for user_stat
-- ----------------------------
DROP TABLE IF EXISTS `user_stat`;
CREATE TABLE
`user_stat` (
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '用户ID',
`fans` INT UNSIGNED DEFAULT '0' COMMENT '粉丝数',
`followed` INT UNSIGNED DEFAULT '0' COMMENT '关注数',
`star` INT UNSIGNED DEFAULT '0' COMMENT '获赞数',
`view_count` INT UNSIGNED DEFAULT '0' COMMENT '播放量',
`coins` INT UNSIGNED DEFAULT '0' COMMENT '硬币数',
`create_time` DATETIME COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`user_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户数据表';
-- ---------------------------
-- Table structure for subtitle
-- ---------------------------
DROP TABLE IF EXISTS `subtitle`;
CREATE TABLE
`subtitle` (
`subtitle_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '字幕ID',
`video_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`lan` VARCHAR(255) NOT NULL COMMENT '语言',
`conent` TEXT NOT NULL COMMENT '字幕内容',
`is_open` TINYINT UNSIGNED DEFAULT '0' COMMENT '是否公开 0-否 1-是',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME NOT NULL COMMENT '更新时间',
PRIMARY KEY (`subtitle_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COMMENT = '字幕表';
-- ----------------------------
-- Table structure for video_type
-- ----------------------------
DROP TABLE IF EXISTS `video_type`;
CREATE TABLE
`video_type` (
`video_id` BIGINT UNSIGNED NOT NULL COMMENT '视频ID',
`type_id` BIGINT UNSIGNED NOT NULL COMMENT '分区ID',
`del_flag` TINYINT UNSIGNED DEFAULT '0' COMMENT '删除标志 0-正常 1-删除',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME COMMENT '更新时间',
PRIMARY KEY (`video_id`, `type_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT '视频分区关联表';
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。