谷粒学院——sql(更新中)


谷粒学院项目用到的所有sql语句,由于要建的表、插入的示例数据过多,因此专门写一篇资源博客记录。


edu_teacher表

DROP TABLE IF EXISTS `edu_teacher`;
CREATE TABLE `edu_teacher` (
  `id` char(19) NOT NULL COMMENT '讲师ID',
  `name` varchar(20) NOT NULL COMMENT '讲师姓名',
  `intro` varchar(500) NOT NULL DEFAULT '' COMMENT '讲师简介',
  `career` varchar(500) DEFAULT NULL COMMENT '讲师资历,一句话说明讲师',
  `level` int(10) unsigned NOT NULL COMMENT '头衔 1高级讲师 2首席讲师',
  `avatar` varchar(255) DEFAULT NULL COMMENT '讲师头像',
  `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='讲师';
INSERT INTO `edu_teacher` VALUES ('1', '张三', '近年主持国家自然科学基金(6项)、江苏省重大科技成果转化项目(5项)、江苏省产学研前瞻性联合研究项目(3项)、省工业科技支撑、省高技术、省自然科学基金等省部级及其企业的主要科研项目40多个,多个项目在企业成功转化,产生了较好的经济、社会和环境效益。积极开展产学研科技合作,并与省内16家企业建立了江苏省研究生工作站,其中6家为江苏省优秀研究生工作站', '高级', '1', 'https://guli-file-190513.oss-cn-beijing.aliyuncs.com/avatar/default.jpg', '0', '0', '2019-10-30 14:18:46', '2019-11-12 13:36:36');
INSERT INTO `edu_teacher` VALUES ('1189389726308478977', '晴天', '高级讲师简介', '高级讲师资历', '2', 'https://online-teach-file.oss-cn-beijing.aliyuncs.com/teacher/2019/10/30/de47ee9b-7fec-43c5-8173-13c5f7f689b2.png', '1', '0', '2019-10-30 11:53:03', '2019-10-30 11:53:03');
INSERT INTO `edu_teacher` VALUES ('1189390295668469762', '李刚', '高级讲师简介', '高级讲师', '2', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '2', '0', '2019-10-30 11:55:19', '2019-11-12 13:37:52');
INSERT INTO `edu_teacher` VALUES ('1189426437876985857', '王二', '高级讲师简介', '高级讲师', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2019-10-30 14:18:56', '2019-11-12 13:37:35');
INSERT INTO `edu_teacher` VALUES ('1189426464967995393', '王五', '高级讲师简介', '高级讲师', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2019-10-30 14:19:02', '2019-11-12 13:37:18');
INSERT INTO `edu_teacher` VALUES ('1192249914833055746', '李四', '高级讲师简介', '高级讲师', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2019-11-07 09:18:25', '2019-11-12 13:37:01');
INSERT INTO `edu_teacher` VALUES ('1192327476087115778', '1222-12-12', '1111', '11', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2019-11-07 14:26:37', '2019-11-11 16:26:26');
INSERT INTO `edu_teacher` VALUES ('1195337453429129218', 'test333', 'sdfsdf', 'sdfdf', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2019-11-15 21:47:12', '2020-08-04 23:45:31');
INSERT INTO `edu_teacher` VALUES ('1289906631454273538', 'hahaha', 'string', 'string', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '0', '0', '2020-08-02 20:51:21', '2020-08-02 21:07:03');
INSERT INTO `edu_teacher` VALUES ('1290646470801776642', '张武', '我很好', '一般', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '1', '0', '2020-08-04 21:51:12', '2020-08-04 21:51:12');
INSERT INTO `edu_teacher` VALUES ('1290647121648709633', '王麻子', '理工教授', '理工', '1', 'https://online-teach-file.oss-cn-beijing.aliyuncs.com/teacher/2019/11/08/e44a2e92-2421-4ea3-bb49-46f2ec96ef88.png', '1', '0', '2020-08-04 21:53:48', '2020-08-04 21:53:48');
INSERT INTO `edu_teacher` VALUES ('1290670160830558210', '哈嘿嘿', 'qqqq', '是是是', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/74e33ab5bf8d46848cb5df9943a02c56file.png', '0', '0', '2020-08-04 23:25:20', '2020-08-05 15:16:24');
INSERT INTO `edu_teacher` VALUES ('1290907563440754690', '测试头像上传', '222', '222', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/25f411209c8b44b9b003482b6265c3c9file.png', '1', '0', '2020-08-05 15:08:42', '2020-08-05 15:08:42');
INSERT INTO `edu_teacher` VALUES ('1292097031057219585', '龙洋', '男,曾任重庆市城管委员会会长、重庆工商大学融智学院保安一把手。', '重庆工商大学融智学院保安', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/08/ceacfa9cbe504bc8a9291d9bbe40e236file.png', '0', '0', '2020-08-08 21:55:13', '2020-08-08 21:55:13');
INSERT INTO `edu_teacher` VALUES ('1294175384794947586', '廖大姐', '重庆大学研究生、本科生,现在任职鱼洞街道清洁卫生', '重庆大学研究生', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/14/3d66cd734fa44cf988dcb88a2c11785bfile.png', '0', '0', '2020-08-14 15:33:51', '2020-08-14 15:33:51');
INSERT INTO `edu_teacher` VALUES ('2', '周杰伦', '著名歌星,擅长音乐制作', '重庆交通大学', '1', 'https://guli-file-190513.oss-cn-beijing.aliyuncs.com/avatar/default.jpg', '0', '0', '2020-08-02 16:54:17', '2020-08-02 16:54:21');
INSERT INTO `edu_teacher` VALUES ('66', '廖晓悦', '清华大学经济学博士后,曾任中央银行行长、清华大学经管学院院长。', '清华大学', '2', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/08/80ec96616b0344ffbc5e9d9fe4e03914file.png', '0', '0', '2020-08-03 16:44:36', '2020-08-08 21:51:10');
INSERT INTO `edu_teacher` VALUES ('999', '热巴', '高级影星简介', '北京大学', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/05/74e33ab5bf8d46848cb5df9943a02c56file.png', '0', '0', '2020-07-27 17:18:04', '2020-08-04 17:18:08');

edu_subject表

DROP TABLE IF EXISTS `edu_subject`;
CREATE TABLE `edu_subject` (
  `id` char(19) DEFAULT NULL COMMENT '课程类别ID',
  `title` varchar(10) NOT NULL COMMENT '类别名称',
  `parent_id` char(19) NOT NULL DEFAULT '0' COMMENT '父ID',
  `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序字段',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  KEY `idx_parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='课程科目';
INSERT INTO `edu_subject` VALUES ('1293200126289928194', '前端开发', '0', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126319288322', 'vue', '1293200126289928194', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126365425666', 'JavaScript', '1293200126289928194', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126688387074', 'JQuery', '1293200126289928194', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126705164289', '后端开发', '0', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126730330114', 'java', '1293200126705164289', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126772273153', 'c++', '1293200126705164289', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126793244674', '数据库开发', '0', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');
INSERT INTO `edu_subject` VALUES ('1293200126810021889', 'mysql', '1293200126793244674', '0', '2020-08-11 22:58:31', '2020-08-11 22:58:31');

edu_course表

DROP TABLE IF EXISTS `edu_course`;
CREATE TABLE `edu_course` (
  `id` char(19) NOT NULL COMMENT '课程ID',
  `teacher_id` char(19) NOT NULL COMMENT '课程讲师ID',
  `subject_id` char(19) NOT NULL COMMENT '课程专业ID',
  `subject_parent_id` varchar(40) CHARACTER SET utf8 DEFAULT NULL,
  `title` varchar(50) NOT NULL COMMENT '课程标题',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '课程销售价格,设置为0则可免费观看',
  `lesson_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总课时',
  `cover` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '课程封面图片路径',
  `buy_count` bigint(10) unsigned NOT NULL DEFAULT '0' COMMENT '销售数量',
  `view_count` bigint(10) unsigned NOT NULL DEFAULT '0' COMMENT '浏览数量',
  `version` bigint(20) unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
  `status` varchar(10) NOT NULL DEFAULT 'Draft' COMMENT '课程状态 Draft未发布  Normal已发布',
  `is_deleted` tinyint(3) DEFAULT NULL COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_title` (`title`),
  KEY `idx_subject_id` (`subject_id`),
  KEY `idx_teacher_id` (`teacher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='课程';
INSERT INTO `edu_course` VALUES ('11', '1189389726308478977', '1293200126730330114', '1293200126705164289', 'java基础课程:test', '0.01', '2', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '4', '387', '1', 'Normal', '0', '2019-11-07 09:27:33', '2019-11-18 13:35:03');
INSERT INTO `edu_course` VALUES ('12', 'string333', '1293200126810021889', '1293200126793244674', 'mysql基础', '0.00', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '20', '1', 'Draft', null, '2020-08-06 15:31:40', '2020-08-06 15:31:40');
INSERT INTO `edu_course` VALUES ('1291291664610062338', '', '1293200126730330114', '1293200126705164289', 'java从入门到入土', '30.00', '66', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '46', '1', 'Draft', null, '2020-08-06 16:34:59', '2020-08-06 16:34:59');
INSERT INTO `edu_course` VALUES ('1291293802446819330', '', '1293200126810021889', '1293200126793244674', 'mysql高级优化', '55.00', '55', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-06 16:43:28', '2020-08-06 16:43:28');
INSERT INTO `edu_course` VALUES ('1291298930809737218', '1189390295668469762', '', null, '测试讲师下拉列表', '3.00', '30', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-06 17:03:51', '2020-08-06 17:03:51');
INSERT INTO `edu_course` VALUES ('1291308800434868226', '', '', null, '', '0.00', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-06 17:43:04', '2020-08-06 17:43:04');
INSERT INTO `edu_course` VALUES ('1291556196871901185', '1290646470801776642', '1291017435083829250', null, '文本测试', '99.00', '30', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-07 10:06:08', '2020-08-07 10:06:08');
INSERT INTO `edu_course` VALUES ('1291557512700538881', '1189389726308478977', '1291017433825538050', '1291017433578074114', '最终测试课程添加', '88.00', '66', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-07 10:11:22', '2020-08-07 10:11:22');
INSERT INTO `edu_course` VALUES ('1291573462208405505', '', '', '', '', '0.00', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '66', '1', 'Draft', null, '2020-08-07 11:14:44', '2020-08-07 11:14:44');
INSERT INTO `edu_course` VALUES ('1291586005811359746', '1189426464967995393', '1291017434110750721', '1291017433578074114', '666', '22.00', '66', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-07 12:04:35', '2020-08-07 12:04:35');
INSERT INTO `edu_course` VALUES ('1291590342465843201', '1192249914833055746', '1291017434811199490', '1291017434525986817', '修改课程测试gogogo', '10.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '55', '1', 'Draft', null, '2020-08-07 12:21:49', '2020-08-07 12:24:04');
INSERT INTO `edu_course` VALUES ('1291635923703885825', '1192327476087115778', '1291017434668593154', '1291017434525986817', '测试章节', '60.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-07 15:22:56', '2020-08-07 15:22:56');
INSERT INTO `edu_course` VALUES ('1291647981346443266', '1192249914833055746', '1291017433825538050', '1291017433578074114', 'a', '11.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-07 16:10:51', '2020-08-07 16:10:51');
INSERT INTO `edu_course` VALUES ('1291913972575965186', '66', '1291017434391769090', '1291017433578074114', '提交显示测试', '10.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-08 09:47:48', '2020-08-08 09:47:48');
INSERT INTO `edu_course` VALUES ('1291920219912081409', '1', '1291017433825538050', '1291017433578074114', '老雮尘珠2', '1.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Normal', null, '2020-08-08 10:12:38', '2020-08-08 10:25:33');
INSERT INTO `edu_course` VALUES ('1292089410745049089', '1192249914833055746', '1291017434668593154', '1291017434525986817', '测试视频上传', '10.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Normal', null, '2020-08-08 21:24:56', '2020-08-08 21:27:58');
INSERT INTO `edu_course` VALUES ('1292097678242521090', '1292097031057219585', '1291017433825538050', '1291017433578074114', '时间管理', '999.00', '6', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Normal', null, '2020-08-08 21:57:47', '2020-08-08 21:59:44');
INSERT INTO `edu_course` VALUES ('1292278889588850690', '1189389726308478977', '1291017433825538050', '1291017433578074114', 'qwe', '30.00', '1', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-09 09:57:51', '2020-08-09 09:57:51');
INSERT INTO `edu_course` VALUES ('1292380353153961986', '1192327476087115778', '1291017433825538050', '1291017433578074114', '测试熔断器', '10.00', '10', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Normal', null, '2020-08-09 16:41:02', '2020-08-09 16:45:34');
INSERT INTO `edu_course` VALUES ('1292682429575782401', '1189389726308478977', '1293200126772273153', '1293200126705164289', 'c++精品课程', '10.00', '0', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Draft', null, '2020-08-10 12:41:23', '2020-08-10 12:41:23');
INSERT INTO `edu_course` VALUES ('1299175937918787585', '1294175384794947586', '1293200126365425666', '1293200126289928194', '艺术管理', '2.00', '20', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '0', '1', 'Normal', null, '2020-08-14 15:36:03', '2020-08-14 15:37:19');
INSERT INTO `edu_course` VALUES ('14', '1189389726308478977', '1293200126319288322', '1293200126289928194', 'XHTML CSS2 JS整站制作教程课程学习', '0.00', '3', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '3', '44', '15', 'Normal', '0', '2018-04-02 18:33:34', '2019-11-16 21:21:45');
INSERT INTO `edu_course` VALUES ('15', '1189389726308478977', '1293200126365425666', '1293200126289928194', 'HTML5入门课程学习', '0.00', '23', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '0', '51', '17', 'Normal', '0', '2018-04-02 18:34:32', '2019-11-12 10:19:20');
INSERT INTO `edu_course` VALUES ('18', '1189389726308478977', '1293200126730330114', '1293200126705164289', 'Java精品课程', '0.01', '20', 'http://edu-longyang.oss-cn-beijing.aliyuncs.com/2020/08/06/587d5686663541d986a750be8c9b99b9java.jpg', '151', '737', '6', 'Normal', '0', '2018-04-02 21:28:46', '2019-11-18 11:14:52');

edu_course_description表

DROP TABLE IF EXISTS `edu_course_description`;
CREATE TABLE `edu_course_description` (
  `id` char(19) NOT NULL COMMENT '课程ID',
  `description` text COMMENT '课程简介',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='课程简介';
INSERT INTO `edu_course_description` VALUES ('1292089410745049089', '<p>666</p>', '2020-08-08 21:24:56', '2020-08-08 21:24:56');
INSERT INTO `edu_course_description` VALUES ('1292097678242521090', '', '2020-08-08 21:57:47', '2020-08-08 21:57:47');
INSERT INTO `edu_course_description` VALUES ('1292278889588850690', '<p>qwe</p>', '2020-08-09 09:57:51', '2020-08-09 09:57:51');
INSERT INTO `edu_course_description` VALUES ('1292380353153961986', '<p>qq</p>', '2020-08-09 16:41:02', '2020-08-09 16:41:02');
INSERT INTO `edu_course_description` VALUES ('1292682429575782401', '<p>99</p>', '2020-08-10 12:41:23', '2020-08-10 12:41:23');
INSERT INTO `edu_course_description` VALUES ('1294175937918787585', '<p>发现艺术,发现美</p>', '2020-08-14 15:36:03', '2020-08-14 15:36:03');

edu_chapter表

DROP TABLE IF EXISTS `edu_chapter`;
CREATE TABLE `edu_chapter` (
  `id` char(19) NOT NULL COMMENT '章节ID',
  `course_id` char(19) NOT NULL COMMENT '课程ID',
  `title` varchar(50) NOT NULL COMMENT '章节名称',
  `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '显示排序',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_course_id` (`course_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='课程';
INSERT INTO `edu_chapter` VALUES ('1292089439882878978', '1292089410745049089', '第一章', '0', '2020-08-08 21:25:03', '2020-08-08 21:25:03');
INSERT INTO `edu_chapter` VALUES ('1292097784467464194', '1292097678242521090', '时间', '1', '2020-08-08 21:58:12', '2020-08-08 21:58:12');
INSERT INTO `edu_chapter` VALUES ('1292278906387038209', '1292278889588850690', 'ss', '0', '2020-08-09 09:57:55', '2020-08-09 09:57:55');
INSERT INTO `edu_chapter` VALUES ('1292380380689567746', '1292380353153961986', '1515', '0', '2020-08-09 16:41:09', '2020-08-09 16:41:09');
INSERT INTO `edu_chapter` VALUES ('1292682457631481857', '1292682429575782401', 'a', '0', '2020-08-10 12:41:29', '2020-08-10 12:41:29');
INSERT INTO `edu_chapter` VALUES ('1294175999164014594', '1294175937918787585', '第一章、什么是艺术', '0', '2020-08-14 15:36:17', '2020-08-14 15:36:17');

edu_video表

DROP TABLE IF EXISTS `edu_video`;
CREATE TABLE `edu_video` (
  `id` char(19) NOT NULL COMMENT '视频ID',
  `course_id` char(19) NOT NULL COMMENT '课程ID',
  `chapter_id` char(19) NOT NULL COMMENT '章节ID',
  `title` varchar(50) NOT NULL COMMENT '节点名称',
  `video_source_id` varchar(100) DEFAULT NULL COMMENT '云端视频资源',
  `video_original_name` varchar(100) DEFAULT NULL COMMENT '原始文件名称',
  `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序字段',
  `play_count` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '播放次数',
  `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否可以试听:0收费 1免费',
  `duration` float NOT NULL DEFAULT '0' COMMENT '视频时长(秒)',
  `status` varchar(20) NOT NULL DEFAULT 'Empty' COMMENT 'Empty未上传 Transcoding转码中  Normal正常',
  `size` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '视频源文件大小(字节)',
  `version` bigint(20) unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
  `gmt_create` datetime NOT NULL COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_course_id` (`course_id`),
  KEY `idx_chapter_id` (`chapter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='课程视频';
INSERT INTO `edu_video` VALUES ('1', '1294175937918787585', '1294175999164014594', '艺术的起源', 'fedcdb5027c5428ba29b93f7ef7c7a93', '', '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-14 15:36:57', '2020-08-14 15:36:57');
INSERT INTO `edu_video` VALUES ('1292090147784925186', '1292089410745049089', '1292089439882878978', '第一节', 'e895880ce4784d9a866b17e8d8cd377b', '6 - What If I Want to Move Faster.mp4', '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-08 21:27:52', '2020-08-08 21:27:52');
INSERT INTO `edu_video` VALUES ('1292097844735418369', '1292097678242521090', '1292097784467464194', '什么是时间', '851d386575034d1aa196f35525f9ad72', null, '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-08 21:58:27', '2020-08-08 21:58:27');
INSERT INTO `edu_video` VALUES ('1292097969151057921', '1292097678242521090', '1292097784467464194', '为什么要时间管理', '851d386575034d1aa196f35525f9ad72', null, '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-08 21:58:57', '2020-08-08 21:58:57');
INSERT INTO `edu_video` VALUES ('1292098059089518594', '1292097678242521090', '1292097784467464194', '怎样实现时间管理', '851d386575034d1aa196f35525f9ad72', null, '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-08 21:59:18', '2020-08-08 21:59:18');
INSERT INTO `edu_video` VALUES ('1292380892084277249', '1292380353153961986', '1292380380689567746', '9999', '851d386575034d1aa196f35525f9ad72', '6 - What If I Want to Move Faster.mp4', '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-09 16:43:11', '2020-08-09 16:43:11');
INSERT INTO `edu_video` VALUES ('1292682517811355649', '1292682429575782401', '1292682457631481857', '151', '851d386575034d1aa196f35525f9ad72', null, '10', '0', '0', '0', 'Empty', '0', '1', '2020-08-10 12:41:44', '2020-08-10 12:41:44');
INSERT INTO `edu_video` VALUES ('1294176165854044162', '1294175937918787585', '1294175999164014594', '艺术的起源', '851d386575034d1aa196f35525f9ad72', null, '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-14 15:36:57', '2020-08-14 15:36:57');
INSERT INTO `edu_video` VALUES ('1294176222691057665', '1294175937918787585', '1294175999164014594', '艺术的发展过程', '851d386575034d1aa196f35525f9ad72', null, '0', '0', '0', '0', 'Empty', '0', '1', '2020-08-14 15:37:11', '2020-08-14 15:37:11');

文章作者: Prannt
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Prannt !
评论
  目录