应学APP是一款专门用于IT知识教育分享的软件,它上面有非常多的专业IT知识教学,对IT方面感兴趣的用户,可以在这个上面学到非常专业的知识。
注意:
看应学App数据库表设计文档之前
建议先看 :应学App的需求需求分析
数据库名: yingxue
文档版本: V1.0.0
文档描述: 应学App数据库表设计描述
表名: admin
说明: 管理员表
数据列:
ROP TABLE IF EXISTS `admin`; CREATE TABLE `admin` ( `id` int NOT NULL AUTO_INCREMENT, `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: attention
说明: 关注表
数据列:
DROP TABLE IF EXISTS `attention`; CREATE TABLE `attention` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `attention_user_id` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: category
说明: 类别
数据列:
DROP TABLE IF EXISTS `category`; CREATE TABLE `category` ( `id` int NOT NULL AUTO_INCREMENT, `cate_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `levels` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `parent_id` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: collect
说明: 收藏表
数据列:
DROP TABLE IF EXISTS `collect`; CREATE TABLE `collect` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `video_id` int NOT NULL, `collect_date` date NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: comments
说明: 评论表
数据列:
DROP TABLE IF EXISTS `comments`; CREATE TABLE `comments` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `sources_date` int NOT NULL, `content_time` date NOT NULL, `content` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `parent_comment_id` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: graphic
说明: 图文表
数据列:
DROP TABLE IF EXISTS `graphic`; CREATE TABLE `graphic` ( `id` int NOT NULL AUTO_INCREMENT, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `brief` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `cover_path` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `category_id` int NOT NULL, `create_id` int NOT NULL, `user_id` int NOT NULL, `like_count` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: history
说明: 历史表
数据列:
DROP TABLE IF EXISTS `history`; CREATE TABLE `history` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `video_id` int NOT NULL, `history_date` date NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: likes
说明: 点赞表
数据列:
DROP TABLE IF EXISTS `likes`; CREATE TABLE `likes` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `like_date` date NOT NULL, `video_id` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: photos
说明: 图片表
数据列:
DROP TABLE IF EXISTS `photos`; CREATE TABLE `photos` ( `id` int NOT NULL AUTO_INCREMENT, `photo_path` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `graphic_id` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: t_group
说明: 分组表
数据列:
DROP TABLE IF EXISTS `t_group`; CREATE TABLE `t_group` ( `id` int NOT NULL AUTO_INCREMENT, `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_date` date NOT NULL, `user_id` int NOT NULL, `video_num` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: user
说明: 用户表
数据列:
DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int NOT NULL AUTO_INCREMENT, `phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `head_img` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `brief` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `wechat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` date NOT NULL, `fans_count` int NOT NULL, `video_count` int NOT NULL, `score` int NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
表名: video
说明: 视频表
数据列:
DROP TABLE IF EXISTS `video`; CREATE TABLE `video` ( `vedio_id` int NOT NULL AUTO_INCREMENT, `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `cover_path` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `video_path` date NOT NULL, `create_date` int NOT NULL, `category_id` int NOT NULL, `user_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `group_id` int NOT NULL, `like_count` int NULL DEFAULT NULL, `oppose_count` int NULL DEFAULT NULL, PRIMARY KEY (`vedio_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;