1 Star 0 Fork 11

forestsunlee/videoSite

forked from 1845780976/videoSite 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LangV.sql 2.74 KB
一键复制 编辑 原始数据 按行查看 历史
ljx1845780976 提交于 2022-03-04 19:52 . Update LangV.sql
CREATE DATABASE langv;
USE langv;
/*Table structure for table `m_user` */
DROP TABLE IF EXISTS `m_user`;
CREATE TABLE `m_user` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`password` varchar(50) NOT NULL,
`role` varchar(10) DEFAULT 'ROLE_USER',
`STATUS` int NOT NULL,
`email` varchar(50) DEFAULT NULL,
`signature` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `m_collection`;
CREATE TABLE `m_collection` (
`id` bigint NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`video_id` bigint NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Table structure for table `m_comment` */
DROP TABLE IF EXISTS `m_comment`;
CREATE TABLE `m_comment` (
`id` bigint NOT NULL AUTO_INCREMENT,
`video_id` bigint NOT NULL,
`video_username` varchar(20) NOT NULL,
`commentator` varchar(20) NOT NULL,
`comment_time` datetime NOT NULL,
`comment_info` varchar(500) NOT NULL,
PRIMARY KEY (`id`),
KEY `video_username` (`video_username`),
KEY `commentator` (`commentator`),
CONSTRAINT `m_comment_ibfk_1` FOREIGN KEY (`video_username`) REFERENCES `m_user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `m_comment_ibfk_2` FOREIGN KEY (`commentator`) REFERENCES `m_user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Table structure for table `m_subscribe` */
DROP TABLE IF EXISTS `m_subscribe`;
CREATE TABLE `m_subscribe` (
`subscriber` varchar(20) NOT NULL,
`youtuber` varchar(20) NOT NULL,
`subscribe_time` datetime NOT NULL,
PRIMARY KEY (`subscriber`,`youtuber`),
KEY `youtuber` (`youtuber`),
CONSTRAINT `m_subscribe_ibfk_1` FOREIGN KEY (`youtuber`) REFERENCES `m_user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `m_subscribe_ibfk_2` FOREIGN KEY (`subscriber`) REFERENCES `m_user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Table structure for table `m_video` */
DROP TABLE IF EXISTS `m_video`;
CREATE TABLE `m_video` (
`id` bigint NOT NULL AUTO_INCREMENT,
`title` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`TIME` varchar(20) NOT NULL,
`img` varchar(200) NOT NULL,
`username` varchar(20) NOT NULL,
`url` varchar(200) NOT NULL,
`introduction` varchar(250) DEFAULT NULL,
`post_time` datetime NOT NULL,
`status` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `username` (`username`),
CONSTRAINT `m_video_ibfk_1` FOREIGN KEY (`username`) REFERENCES `m_user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/forestsun/videoSite.git
[email protected]:forestsun/videoSite.git
forestsun
videoSite
videoSite
新版本

搜索帮助