该项目为仿抖音的短视频项目,主要模块有后台短视频管理模块、搜索模块、登录注册模块、视频详情模块、个人中心、视频列表模块等
在该模块中,视频与音频的关系有以下几种:
功能点分析:
转发按钮:
可以转发分享到微信朋友圈或QQ空间或下载到本地。
举报用户:
点击“举报用户”按钮进入页面,填写举报描述,并提交。
视频瀑布流列表:多个短视频以纵向排列进行展示
功能点分析:
个人中心包含的功能点有:
作品列表:
收藏列表:
点击五角星进行收藏,在收藏列表查看。
分享按钮:
分享按钮只能将内容发送给相应的人,不能分享到微信朋友圈。
点击首页右上角的放大镜,进入到搜索页面
功能点分析:
首页:
用户信息列表:
举报管理列表:
播放审批:查看视频内容:
点击“点我播放”按钮进行视频预览播放
短视频管理:
bgm管理页面:
bgm 新增-提交页面:
bgm 列表:
用户信息表:
CREATE TABLE `users` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`username` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名' ,
`password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码' ,
`face_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '我的头像,如果没有默认给一张' ,
`nickname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '昵称' ,
`fans_counts` int(11) NULL DEFAULT 0 COMMENT '我的粉丝数量' ,
`follow_counts` int(11) NULL DEFAULT 0 COMMENT '我关注的人总数' ,
`receive_like_counts` int(11) NULL DEFAULT 0 COMMENT '我接受到的赞美/收藏 的数量' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `id` (`id`) USING BTREE ,
UNIQUE INDEX `username` (`username`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
ROW_FORMAT=DYNAMIC
;
用户粉丝表:
CREATE TABLE `users_fans` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户' ,
`fan_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '粉丝' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `user_id` (`user_id`, `fan_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='用户粉丝关联关系表'
ROW_FORMAT=DYNAMIC
;
用户收藏的短视频关系设计表:
CREATE TABLE `users_like_videos` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户' ,
`video_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '视频' ,
PRIMARY KEY (`id`),
UNIQUE INDEX `user_video_rel` (`user_id`, `video_id`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='用户喜欢的/赞过的视频'
ROW_FORMAT=DYNAMIC
;
举报信息表设计:
CREATE TABLE `users_report` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`deal_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '被举报用户id' ,
`deal_video_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型标题,让用户选择,详情见 枚举' ,
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '内容' ,
`userid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '举报人的id' ,
`create_date` datetime NOT NULL COMMENT '举报时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='举报用户表'
ROW_FORMAT=DYNAMIC
;
短视频表设计:
CREATE TABLE `videos` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '发布者id' ,
`audio_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户使用音频的信息' ,
`video_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '视频描述' ,
`video_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '视频存放的路径' ,
`video_seconds` float(6,2) NULL DEFAULT NULL COMMENT '视频秒数' ,
`video_width` int(6) NULL DEFAULT NULL COMMENT '视频宽度' ,
`video_height` int(6) NULL DEFAULT NULL COMMENT '视频高度' ,
`cover_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '视频封面图' ,
`like_counts` bigint(20) NOT NULL DEFAULT 0 COMMENT '喜欢/赞美的数量' ,
`status` int(1) NOT NULL COMMENT '视频状态:\r\n1、发布成功\r\n2、禁止播放,管理员操作' ,
`create_time` datetime NOT NULL COMMENT '创建时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='视频信息表'
ROW_FORMAT=DYNAMIC
;
搜索关键字表设计:
CREATE TABLE `search_records` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '搜索的内容' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='视频搜索的记录表'
ROW_FORMAT=DYNAMIC
;
评论表设计:
CREATE TABLE `comments` (
`id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`father_comment_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL ,
`to_user_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL ,
`video_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '视频id' ,
`from_user_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '留言者,评论的用户id' ,
`comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '评论内容' ,
`create_time` datetime NOT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
COMMENT='课程评论表'
ROW_FORMAT=DYNAMIC
;
bgm 表设计:
CREATE TABLE `bgm` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL ,
`path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '播放地址' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
ROW_FORMAT=DYNAMIC
;