diff --git a/1744769033_create_exam_question.up.sql b/1744769033_create_exam_question.up.sql new file mode 100644 index 0000000..9b5f251 --- /dev/null +++ b/1744769033_create_exam_question.up.sql @@ -0,0 +1,12 @@ +CREATE TABLE `ufutx_exam_question` ( + `id` BIGINT NOT NULL AUTO_INCREMENT , + `library_id` int NOT NULL COMMENT "题库id" + `title` varchar(255) NOT NULL COMMENT "标题", + `parse` varchar(255) NOT NULL COMMENT "解析", + `answer` varchar(10) NOT NULL COMMENT "答案", + `type` enum("RADIO", "MULTIPLE") NOT NULL COMMENT "类型 RADIO:单选,MULTIPLE:多选", + `score` int DEFAULT 1 COMMENT "分数", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '测试题目'; \ No newline at end of file diff --git a/1744769081_create_exam_option.up.sql b/1744769081_create_exam_option.up.sql new file mode 100644 index 0000000..a32bd28 --- /dev/null +++ b/1744769081_create_exam_option.up.sql @@ -0,0 +1,10 @@ +CREATE TABLE `ufutx_exam_option` ( + `id` BIGINT NOT NULL AUTO_INCREMENT , + `library_id` int NOT NULL COMMENT "题库id", + `question_id` int NOT NULL COMMENT "问题id", + `title` varchar(255) NOT NULL COMMENT "选项标题", + `number` varchar(10) NOT NULL COMMENT "编号 A,B,C,D", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '测试选项'; \ No newline at end of file diff --git a/1744769109_create_exam_answer.up.sql b/1744769109_create_exam_answer.up.sql new file mode 100644 index 0000000..5dff6d3 --- /dev/null +++ b/1744769109_create_exam_answer.up.sql @@ -0,0 +1,12 @@ +CREATE TABLE `ufutx_exam_answer` ( + `id` BIGINT NOT NULL AUTO_INCREMENT , + `paper_id` int NOT NULL COMMENT "试卷id", + `user_id` int NOT NULL COMMENT "用户id", + `question_id` text NOT NULL COMMENT "问题id", + `option_id` text NOT NULL COMMENT "选项id, 1,2,3", + `number` text NOT NULL COMMENT "编号 A,B,C,D", + `score` text NOT NULL COMMENT "分数", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '测试结果'; \ No newline at end of file diff --git a/1744792247_create_exam_library.up.sql b/1744792247_create_exam_library.up.sql new file mode 100644 index 0000000..dfe2d65 --- /dev/null +++ b/1744792247_create_exam_library.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE `ufutx_exam_library` ( + `id` BIGINT NOT NULL AUTO_INCREMENT , + `title` varchar(255) NOT NULL COMMENT "标题", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '测试题库'; \ No newline at end of file diff --git a/1744795696_create_exam_paper.up.sql b/1744795696_create_exam_paper.up.sql new file mode 100644 index 0000000..5d06f9f --- /dev/null +++ b/1744795696_create_exam_paper.up.sql @@ -0,0 +1,8 @@ +CREATE TABLE `ufutx_exam_paper` ( + `id` BIGINT NOT NULL AUTO_INCREMENT , + `title` varchar(255) NOT NULL COMMENT "标题", + `config` text NOT NULL COMMENT "配置", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '测试试卷'; \ No newline at end of file