diff --git a/1781687373_create_category.up.sql b/1781687373_create_category.up.sql index cde88f3..8d9ac9f 100644 --- a/1781687373_create_category.up.sql +++ b/1781687373_create_category.up.sql @@ -1,4 +1,4 @@ -CREATE TABLE `category` ( +CREATE TABLE `course_category` ( `id` INT PRIMARY KEY AUTO_INCREMENT COMMENT '分类ID', `parent_id` INT DEFAULT 0 COMMENT '父分类ID,0表示顶级分类', `name` VARCHAR(100) NOT NULL COMMENT '分类名称', diff --git a/1781687994_create_course.up.sql b/1781687994_create_course.up.sql index 717995a..be9aefd 100644 --- a/1781687994_create_course.up.sql +++ b/1781687994_create_course.up.sql @@ -12,8 +12,8 @@ CREATE TABLE `course` ( `cover_image` VARCHAR(500) COMMENT '月度课程封面', -- 价格与售卖 -`price` DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '售价(元)', -`original_price` DECIMAL(10, 2) COMMENT '原价/划线价', +`price` INTEGER NOT NULL DEFAULT 0 COMMENT '售价(分)', +`original_price` INTEGER NOT NULL DEFAULT 0 COMMENT '原价/划线价', `is_published` TINYINT DEFAULT 1 COMMENT '是否上架:1-下架 2-上架', -- 时间戳 diff --git a/1781688012_create_video.up.sql b/1781688012_create_video.up.sql index d550a03..e45c912 100644 --- a/1781688012_create_video.up.sql +++ b/1781688012_create_video.up.sql @@ -1,4 +1,4 @@ -CREATE TABLE `video` ( +CREATE TABLE `course_video` ( `id` INT PRIMARY KEY AUTO_INCREMENT COMMENT '视频ID', `course_id` INT NOT NULL COMMENT '所属月度课程ID', `title` VARCHAR(255) NOT NULL COMMENT '视频标题',