rt-sim-training-service/sql/20221012-xia-paper.sql

90 lines
5.4 KiB
MySQL
Raw Normal View History

2022-10-12 17:52:18 +08:00
/*
Navicat Premium Data Transfer
Source Server : room
Source Server Type : MySQL
Source Server Version : 80029
Source Host : 192.168.3.233:3306
Source Schema : joylink
Target Server Type : MySQL
Target Server Version : 80029
File Encoding : 65001
Date: 12/10/2022 17:49:36
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for rts_paper_composition
-- ----------------------------
DROP TABLE IF EXISTS `rts_paper_composition`;
CREATE TABLE `rts_paper_composition` (
2022-10-28 16:50:14 +08:00
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷蓝图id',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '试卷蓝图名称',
`profile` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '试卷蓝图简介',
2022-12-05 17:04:21 +08:00
`map_id` bigint NOT NULL COMMENT '对应的mapId',
2022-10-28 16:50:14 +08:00
`org_id` bigint DEFAULT NULL COMMENT '组织id',
`start_time` datetime DEFAULT NULL COMMENT '启用起始时间',
`end_time` datetime DEFAULT NULL COMMENT '启用截止时间',
`valid_duration` int DEFAULT NULL COMMENT '完成考试有效最长时长单位min',
`pass_score` int DEFAULT NULL COMMENT '及格分',
`full_score` int DEFAULT NULL COMMENT '满分',
`creator_id` bigint DEFAULT NULL COMMENT '创建者id',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`state` int DEFAULT NULL COMMENT '试卷蓝图状态1-正在编辑2-封存(不能修改)3-已经被使用(不能修改删除)定于见PaperCompositionState',
2022-10-12 17:52:18 +08:00
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rts_paper_rule
-- ----------------------------
DROP TABLE IF EXISTS `rts_paper_rule`;
CREATE TABLE `rts_paper_rule` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷规则定义id',
`pc_id` bigint NULL DEFAULT NULL COMMENT 'paper_compostion的id',
`type` int NULL DEFAULT NULL COMMENT '试题类型1-理论题2-实训题',
`subType` int NULL DEFAULT NULL COMMENT '规则类型:理论题(1-单选题2-多选题3-判断题);实训题(4-单操实训5-场景实训)',
`tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '筛选题目的标签,即根据标签来筛选题目;List<String>的json',
`amount` int NULL DEFAULT NULL COMMENT '该类型题目数量',
`score` int NULL DEFAULT NULL COMMENT '每题分值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rts_paper_user
-- ----------------------------
DROP TABLE IF EXISTS `rts_paper_user`;
CREATE TABLE `rts_paper_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id',
`user_id` bigint NOT NULL COMMENT '用户id',
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
`score` int NULL DEFAULT NULL COMMENT '用户最终得分',
`start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间',
`cause` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
`create_time` datetime NULL DEFAULT NULL COMMENT '用户试卷生成时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rts_paper_user_question
-- ----------------------------
DROP TABLE IF EXISTS `rts_paper_user_question`;
CREATE TABLE `rts_paper_user_question` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷试题结果id',
`pu_id` bigint NOT NULL COMMENT '用户试卷paper_user的id',
`org_id` bigint DEFAULT NULL COMMENT '组织id',
`type` int DEFAULT NULL COMMENT '试题类型1-理论题2-实训题',
`question_id` bigint NOT NULL COMMENT '试题id',
`state` int DEFAULT NULL COMMENT '试题状态1-未做(初始)2-答对3-答错4-时间到结束',
`tmp_answer` varchar(255) DEFAULT NULL COMMENT '临时答案内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=373 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
2022-10-12 17:52:18 +08:00
SET FOREIGN_KEY_CHECKS = 1;