-- ----------------------------
-- Table structure for qrtz_blob_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
                                      `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                      `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                      `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                      `BLOB_DATA` blob,
                                      PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
                                      KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_calendars
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_calendars`;
CREATE TABLE `qrtz_calendars` (
                                  `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                  `CALENDAR_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                  `CALENDAR` blob NOT NULL,
                                  PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_cron_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
                                      `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                      `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                      `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                      `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                      `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 DEFAULT NULL,
                                      PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_fired_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
                                       `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                       `ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 NOT NULL,
                                       `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                       `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                       `INSTANCE_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                       `FIRED_TIME` bigint NOT NULL,
                                       `SCHED_TIME` bigint NOT NULL,
                                       `PRIORITY` int NOT NULL,
                                       `STATE` varchar(16) CHARACTER SET utf8mb4 NOT NULL,
                                       `JOB_NAME` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL,
                                       `JOB_GROUP` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL,
                                       `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
                                       `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
                                       PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
                                       KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_job_details
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
                                    `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                    `JOB_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                    `JOB_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                    `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 DEFAULT NULL,
                                    `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 NOT NULL,
                                    `IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
                                    `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
                                    `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
                                    `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
                                    `JOB_DATA` blob,
                                    PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`) USING BTREE,
                                    KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`) USING BTREE,
                                    KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_locks
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
                              `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                              `LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 NOT NULL,
                              PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_paused_trigger_grps
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
                                            `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                            `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                            PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_scheduler_state
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
                                        `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                        `INSTANCE_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                        `LAST_CHECKIN_TIME` bigint NOT NULL,
                                        `CHECKIN_INTERVAL` bigint NOT NULL,
                                        PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_simple_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
                                        `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                        `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                        `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                        `REPEAT_COUNT` bigint NOT NULL,
                                        `REPEAT_INTERVAL` bigint NOT NULL,
                                        `TIMES_TRIGGERED` bigint NOT NULL,
                                        PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_simprop_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
                                         `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                         `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                         `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                         `STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL,
                                         `STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL,
                                         `STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 DEFAULT NULL,
                                         `INT_PROP_1` int DEFAULT NULL,
                                         `INT_PROP_2` int DEFAULT NULL,
                                         `LONG_PROP_1` bigint DEFAULT NULL,
                                         `LONG_PROP_2` bigint DEFAULT NULL,
                                         `DEC_PROP_1` decimal(13,4) DEFAULT NULL,
                                         `DEC_PROP_2` decimal(13,4) DEFAULT NULL,
                                         `BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
                                         `BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
                                         PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for qrtz_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
                                 `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 NOT NULL,
                                 `TRIGGER_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                 `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                 `JOB_NAME` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                 `JOB_GROUP` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
                                 `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 DEFAULT NULL,
                                 `NEXT_FIRE_TIME` bigint DEFAULT NULL,
                                 `PREV_FIRE_TIME` bigint DEFAULT NULL,
                                 `PRIORITY` int DEFAULT NULL,
                                 `TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 NOT NULL,
                                 `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 NOT NULL,
                                 `START_TIME` bigint NOT NULL,
                                 `END_TIME` bigint DEFAULT NULL,
                                 `CALENDAR_NAME` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL,
                                 `MISFIRE_INSTR` smallint DEFAULT NULL,
                                 `JOB_DATA` blob,
                                 PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
                                 KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`) USING BTREE,
                                 KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`) USING BTREE,
                                 KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`) USING BTREE,
                                 KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`) USING BTREE,
                                 KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`) USING BTREE,
                                 KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`) USING BTREE,
                                 KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`) USING BTREE,
                                 KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`) USING BTREE,
                                 KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`) USING BTREE,
                                 KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`) USING BTREE,
                                 KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`) USING BTREE,
                                 KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
                              `id` bigint NOT NULL COMMENT '主键',
                              `org_id` bigint DEFAULT NULL COMMENT '机构id',
                              `config_key` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '参数键名',
                              `config_name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '参数名称',
                              `config_value` varchar(2000) CHARACTER SET utf8mb4 NOT NULL COMMENT '参数键值',
                              `enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                              `create_id` bigint DEFAULT NULL COMMENT '创建人',
                              `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                              `update_id` bigint DEFAULT NULL COMMENT '更新人',
                              `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                              `remark` varchar(100) DEFAULT NULL COMMENT '备注',
                              `sort` int DEFAULT '1' COMMENT '排序',
                              `editor` tinyint NOT NULL DEFAULT '0' COMMENT '是否可编辑，1：是，0：否',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统参数表';

-- ----------------------------
-- Table structure for t_b_app
-- ----------------------------
DROP TABLE IF EXISTS `t_b_app`;
CREATE TABLE `t_b_app` (
                           `id` bigint NOT NULL COMMENT '主键\n',
                           `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '应用名',
                           `access_key` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '访问凭证',
                           `access_secret` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '访问密钥',
                           `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                           `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                           `last_access_time` bigint DEFAULT NULL COMMENT '最近访问时间',
                           `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                           `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                           PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='app信息';

-- ----------------------------
-- Table structure for t_b_app_version
-- ----------------------------
DROP TABLE IF EXISTS `t_b_app_version`;
CREATE TABLE `t_b_app_version` (
                                   `id` bigint NOT NULL COMMENT '主键',
                                   `name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '版本名',
                                   `value` int NOT NULL COMMENT '版本号',
                                   `url` varchar(2000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '版本详情链接',
                                   `description` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '版本描述',
                                   `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '类型:IOS/ANDROID',
                                   `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                                   `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                   `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                   `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                   `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='移动端版本';

-- ----------------------------
-- Table structure for t_b_attachment
-- ----------------------------
DROP TABLE IF EXISTS `t_b_attachment`;
CREATE TABLE `t_b_attachment` (
                                  `id` bigint NOT NULL COMMENT '主键',
                                  `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '附件名称',
                                  `path` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '路径',
                                  `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '类型',
                                  `size` double NOT NULL COMMENT '大小',
                                  `md5` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT 'MD5',
                                  `remark` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '备注',
                                  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='附件表';

-- ----------------------------
-- Table structure for t_b_client_version
-- ----------------------------
DROP TABLE IF EXISTS `t_b_client_version`;
CREATE TABLE `t_b_client_version` (
                                      `id` bigint NOT NULL COMMENT '主键',
                                      `org_id` bigint DEFAULT NULL COMMENT '机构id',
                                      `name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '版本名',
                                      `value` int NOT NULL COMMENT '版本号',
                                      `url` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '版本详情链接',
                                      `description` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '版本描述',
                                      `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                                      `type` varchar(100) CHARACTER SET utf8mb4 DEFAULT 'ONLINE' COMMENT '类型，ONLINE：线上，UPLOAD：客户端上传',
                                      `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                      `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                      `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                      `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户端版本';

-- ----------------------------
-- Table structure for t_b_exam_invigilate_user
-- ----------------------------
DROP TABLE IF EXISTS `t_b_exam_invigilate_user`;
CREATE TABLE `t_b_exam_invigilate_user` (
                                            `id` bigint NOT NULL COMMENT '主键',
                                            `org_id` bigint NOT NULL COMMENT '机构ID',
                                            `user_id` bigint DEFAULT NULL COMMENT '用户ID',
                                            `exam_id` bigint NOT NULL COMMENT '考试批次id',
                                            `room_code` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '考场代码',
                                            `room_name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '考场名称',
                                            `monitor_status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '监考状态，NOT_START：未开始，START：监考中，FINISHED：已结束',
                                            PRIMARY KEY (`id`) USING BTREE,
                                            UNIQUE KEY `t_b_exam_invigilate_user_orgId_userId_roomCode_Idx` (`org_id`,`user_id`,`room_code`,`exam_id`) USING BTREE,
                                            KEY `exam_room_code` (`exam_id`,`room_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监考员设置';

-- ----------------------------
-- Table structure for t_b_exam_invigilate_user_temp
-- ----------------------------
DROP TABLE IF EXISTS `t_b_exam_invigilate_user_temp`;
CREATE TABLE `t_b_exam_invigilate_user_temp` (
                                                 `id` bigint NOT NULL COMMENT '主键',
                                                 `org_id` bigint NOT NULL COMMENT '机构ID',
                                                 `exam_id` bigint NOT NULL COMMENT '考试批次id',
                                                 `room_code` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '考场代码',
                                                 `room_name` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '考场名称',
                                                 PRIMARY KEY (`id`) USING BTREE,
                                                 UNIQUE KEY `room_code_index` (`org_id`,`exam_id`,`room_code`),
                                                 KEY `exam_room_code` (`exam_id`,`room_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监考员设置';

-- ----------------------------
-- Table structure for t_b_org
-- ----------------------------
DROP TABLE IF EXISTS `t_b_org`;
CREATE TABLE `t_b_org` (
                           `id` bigint NOT NULL COMMENT '主键',
                           `code` varchar(50) NOT NULL DEFAULT '' COMMENT '机构代码，通常用学校简称表示，全局唯一',
                           `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
                           `logo` varchar(500) DEFAULT NULL COMMENT 'logo图片url',
                           `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                           `enable_simulate` tinyint DEFAULT '1' COMMENT '是否开启模考，0：不开启，1：开启',
                           `simulate_paper_id` bigint DEFAULT NULL COMMENT '模考试卷id',
                           `access_key` varchar(50) DEFAULT NULL COMMENT '外部访问凭证',
                           `access_secret` varchar(50) DEFAULT NULL COMMENT '外部访问密钥',
                           `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                           `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                           `contact_name` varchar(50) DEFAULT NULL COMMENT '联系人',
                           `contact_phone` varchar(30) DEFAULT NULL COMMENT '联系人电话',
                           `enable_liveness` tinyint DEFAULT '1' COMMENT '是否允许使用活体，0：不允许，1：允许',
                           `enable_monitor_record` tinyint DEFAULT '1' COMMENT '是否允许监控转录，0：不允许，1：允许',
                           `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                           `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                           PRIMARY KEY (`id`),
                           UNIQUE KEY `t_b_org_code_Idx` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构';

-- ----------------------------
-- Table structure for t_b_privilege
-- ----------------------------
DROP TABLE IF EXISTS `t_b_privilege`;
CREATE TABLE `t_b_privilege` (
                                 `id` bigint NOT NULL COMMENT '主键',
                                 `name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '名称',
                                 `url` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '地址',
                                 `type` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '类型',
                                 `parent_id` bigint DEFAULT NULL COMMENT '父id',
                                 `sequence` int DEFAULT NULL COMMENT '序号',
                                 `remark` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '备注',
                                 `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='菜单和权限';

-- ----------------------------
-- Table structure for t_b_problem
-- ----------------------------
DROP TABLE IF EXISTS `t_b_problem`;
CREATE TABLE `t_b_problem` (
                               `id` bigint NOT NULL COMMENT '主键 ',
                               `main_number` int NOT NULL COMMENT '主编号',
                               `sub_number` int NOT NULL COMMENT '子编号',
                               `sub_index` int DEFAULT NULL COMMENT '子编号序号',
                               `outline` varchar(500) NOT NULL COMMENT '大纲',
                               `title` varchar(1000) NOT NULL COMMENT '标题',
                               `answer` mediumtext CHARACTER SET utf8mb4 NOT NULL COMMENT '答案',
                               `sort` int NOT NULL COMMENT '排序',
                               `solve_count` bigint NOT NULL DEFAULT '0' COMMENT '已解决数量',
                               `un_solve_count` bigint NOT NULL DEFAULT '0' COMMENT '未解决数量',
                               `enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                               `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                               `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                               `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                               `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                               PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试问题表';

-- ----------------------------
-- Table structure for t_b_role
-- ----------------------------
DROP TABLE IF EXISTS `t_b_role`;
CREATE TABLE `t_b_role` (
                            `id` bigint NOT NULL COMMENT '主键',
                            `role_code` varchar(30) NOT NULL DEFAULT '' COMMENT '角色编码',
                            `role_name` varchar(50) NOT NULL DEFAULT '' COMMENT '角色名称',
                            `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                            PRIMARY KEY (`id`),
                            UNIQUE KEY `t_b_role_role_code_Idx` (`role_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色';

-- ----------------------------
-- Table structure for t_b_role_privilege
-- ----------------------------
DROP TABLE IF EXISTS `t_b_role_privilege`;
CREATE TABLE `t_b_role_privilege` (
                                      `id` bigint NOT NULL COMMENT '主键',
                                      `role_code` varchar(50) NOT NULL COMMENT '角色编码',
                                      `privilege_id` bigint NOT NULL COMMENT '权限id',
                                      PRIMARY KEY (`id`) USING BTREE,
                                      KEY `role_code` (`role_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色权限';

-- ----------------------------
-- Table structure for t_b_session
-- ----------------------------
DROP TABLE IF EXISTS `t_b_session`;
CREATE TABLE `t_b_session` (
                               `id` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '主键',
                               `org_id` bigint DEFAULT NULL COMMENT '学校id',
                               `identity` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '用户标识',
                               `type` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '用户类型',
                               `source` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '访问来源',
                               `platform` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '设备分类',
                               `device_id` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '设备标识',
                               `address` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '登录IP地址',
                               `access_token` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '访问令牌',
                               `last_access_time` bigint DEFAULT NULL COMMENT '最近访问时间',
                               `last_access_ip` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '最近访问IP地址',
                               `update_time` bigint DEFAULT NULL COMMENT '令牌更新时间',
                               `expire_time` bigint DEFAULT NULL COMMENT '令牌强制失效时间',
                               PRIMARY KEY (`id`) USING BTREE,
                               KEY `identity` (`identity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会话信息';

-- ----------------------------
-- Table structure for t_b_task_history
-- ----------------------------
DROP TABLE IF EXISTS `t_b_task_history`;
CREATE TABLE `t_b_task_history` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '任务类型，calculate_exam_score：考试重新算分，import_exam_student：导入考生，import_exam_paper：导入试卷，import_invigilate_user：导入监考员，export_invigilate_user：导出监考员',
                                    `entity_id` bigint DEFAULT NULL COMMENT '关联业务对象ID',
                                    `status` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '任务状态，init：未开始，running：开始执行，finish：执行结束',
                                    `summary` mediumtext CHARACTER SET utf8mb4 COMMENT '实时摘要信息',
                                    `progress` double DEFAULT NULL COMMENT '执行进度',
                                    `import_file_name` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '导入文件名',
                                    `import_file_path` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '导入文件路径',
                                    `result_file_path` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '导出文件路径',
                                    `report_file_path` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '报告路径',
                                    `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                    `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                    `start_time` bigint DEFAULT NULL COMMENT '开始时间',
                                    `finish_time` bigint DEFAULT NULL COMMENT '结束时间',
                                    `org_id` bigint DEFAULT NULL COMMENT '机构id',
                                    `exam_id` bigint DEFAULT NULL COMMENT '考试批次id',
                                    `remark` varchar(200) DEFAULT NULL COMMENT '备注',
                                    PRIMARY KEY (`id`) USING BTREE,
                                    KEY `exam_type` (`exam_id`,`type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='异步任务';

-- ----------------------------
-- Table structure for t_b_user
-- ----------------------------
DROP TABLE IF EXISTS `t_b_user`;
CREATE TABLE `t_b_user` (
                            `id` bigint NOT NULL COMMENT '主键',
                            `org_id` bigint DEFAULT NULL COMMENT '机构id',
                            `login_name` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名',
                            `name` varchar(50) NOT NULL DEFAULT '' COMMENT '姓名',
                            `password` varchar(30) NOT NULL DEFAULT '' COMMENT '密码',
                            `mobile_number` varchar(30) DEFAULT NULL COMMENT '手机号',
                            `enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                            `create_time` bigint NOT NULL COMMENT '创建时间',
                            `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                            `remark` varchar(100) DEFAULT NULL COMMENT '备注',
                            `create_id` bigint NOT NULL COMMENT '创建人id',
                            `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                            PRIMARY KEY (`id`),
                            UNIQUE KEY `org_login_name` (`org_id`,`login_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户';

-- ----------------------------
-- Table structure for t_b_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_b_user_role`;
CREATE TABLE `t_b_user_role` (
                                 `id` bigint NOT NULL COMMENT '主键',
                                 `user_id` bigint NOT NULL COMMENT '用户id',
                                 `role_code` varchar(30) NOT NULL DEFAULT '' COMMENT '角色编码',
                                 PRIMARY KEY (`id`),
                                 KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色';

-- ----------------------------
-- Table structure for t_e_audio
-- ----------------------------
DROP TABLE IF EXISTS `t_e_audio`;
CREATE TABLE `t_e_audio` (
                             `id` bigint NOT NULL COMMENT '主键',
                             `org_id` bigint NOT NULL COMMENT '机构id',
                             `activity_id` bigint NOT NULL COMMENT '考试场次id',
                             `attachment_id` bigint NOT NULL COMMENT '附件id',
                             `content` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '语音内容',
                             `type` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '类别，BEFORE：开考前语音，AFTER：考试结束前语音',
                             `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                             `audio_default` varchar(30) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'SYS' COMMENT '是否默认，SYS：系统内置，CUSTOM：自定义',
                             `play_time` int DEFAULT NULL COMMENT '设置时长(单位：秒)',
                             `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                             `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                             `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                             `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                             PRIMARY KEY (`id`),
                             UNIQUE KEY `activity_idx` (`activity_id`,`type`,`play_time`,`enable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='场次音频表';

-- ----------------------------
-- Table structure for t_e_config
-- ----------------------------
DROP TABLE IF EXISTS `t_e_config`;
CREATE TABLE `t_e_config` (
                              `id` bigint NOT NULL COMMENT '主键',
                              `similarity_threshold` double DEFAULT NULL COMMENT '相似度比较阀值',
                              `liveness_action_count` int DEFAULT NULL COMMENT '活体动作个数',
                              `liveness_action_retry_count` int DEFAULT NULL COMMENT '活体单个动作重试次数',
                              `liveness_action_limit_seconds` int DEFAULT NULL COMMENT '活体单个动作限时秒数',
                              `no_face_count_error` int DEFAULT NULL COMMENT '一个考试场次中未检测到人脸或有违规动作（左顾右盼、低头、转身、离开座位、人脸移除、遮挡等）次数超过3次（持续30秒连续帧画面违规记为次数1次）',
                              `match_face_compare_error_count` int DEFAULT NULL COMMENT '一个考试场次中检测到人脸与底照不符次数超过3次（持续30秒连续帧画面90%比对底照不符记为次数1次）',
                              `realness_count` int DEFAULT NULL COMMENT '真实性检测数量',
                              `multiple_face_count_error` int DEFAULT NULL COMMENT '一个考试场次中检测到多张人脸超过3次（持续15秒连续帧画面90%存在多张人脸记为次数1次）',
                              `total_face_compare_error_count` int DEFAULT NULL COMMENT '一个考试场次中检测到人脸与底照不符次数超过3次（1分钟内80%检测到人脸与底照不符为1次）',
                              `in_process_face_verify_config` mediumtext CHARACTER SET utf8mb4 COMMENT '过程人脸验证参数配置',
                              `total_eye_close_error_count` int DEFAULT NULL COMMENT '一个考试场次内人脸抓拍检测（D13：1分钟内进行连续人脸抓拍检测不到闭眼动作）失败累计次数超过6次',
                              PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='全局配置';

-- ----------------------------
-- Table structure for t_e_exam
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam`;
CREATE TABLE `t_e_exam` (
                            `id` bigint NOT NULL COMMENT '主键',
                            `org_id` bigint NOT NULL COMMENT '机构ID',
                            `code` varchar(50) NOT NULL DEFAULT '' COMMENT '批次编码，机构唯一',
                            `name` varchar(100) NOT NULL DEFAULT '' COMMENT '批次名称',
                            `tag` varchar(50) DEFAULT NULL COMMENT '批次标注，可用于多个考试批次归类',
                            `start_time` bigint NOT NULL COMMENT '批次开始时间',
                            `end_time` bigint NOT NULL COMMENT '批次结束时间',
                            `short_code` varchar(50) DEFAULT NULL COMMENT '考试口令',
                            `prepare_seconds` int DEFAULT NULL COMMENT '提前多长时间开始候考(分钟)',
                            `min_duration_seconds` int DEFAULT NULL COMMENT '最短考试时长，相当于考试冻结时间(分钟)',
                            `pre_notice` mediumtext COMMENT '考前须知',
                            `pre_notice_stay_seconds` int DEFAULT NULL COMMENT '考试须知阅读时长(秒)',
                            `post_notice` mediumtext COMMENT '考后说明，针对一个场次进行设置',
                            `exam_count` int DEFAULT NULL COMMENT '允许考试次数',
                            `break_expire_seconds` int DEFAULT NULL COMMENT '断点失效时间(秒)',
                            `break_resume_count` int DEFAULT NULL COMMENT '断点续考次数',
                            `camera_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用摄像头拍照答题，0：不允许，1：允许',
                            `reexam_auditing` tinyint DEFAULT NULL COMMENT '重考是否审批，0：不审批，1：审批',
                            `show_objective_score` tinyint DEFAULT NULL COMMENT '交卷后是否显示客观得分，0：不显示，1：显示',
                            `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                            `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                            `mode` varchar(30) DEFAULT NULL COMMENT '模式，together：集中统一，anytime：随到随考',
                            `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                            `archived` tinyint DEFAULT '0' COMMENT '是否归档，0：不归档，1：归档',
                            `opening_seconds` int DEFAULT NULL COMMENT '允许开考开放时长(分钟)，相当于迟到时间',
                            `max_duration_seconds` int DEFAULT NULL COMMENT '最大考试时长(分钟)',
                            `force_finish` tinyint DEFAULT NULL COMMENT '是否在结束时间集中强制收卷，0：不强制，1：强制',
                            `entry_authentication_policy` varchar(30) DEFAULT NULL COMMENT '开考身份验证策略，off：关闭，face_verify_optional：非强制人脸验证，face_verify_force：强制人脸验证，liveness：活体验证',
                            `in_process_face_verify` tinyint DEFAULT NULL COMMENT '考试过程中人脸检测是否开启，0：不开启，1：开启',
                            `in_process_face_stranger_ignore` tinyint DEFAULT NULL COMMENT '考试过程中人脸检测是否忽略陌生人 ，0：不忽略，1：忽略',
                            `in_process_liveness_verify` tinyint DEFAULT NULL COMMENT '考试过程中是否启用活体检测 ，0：不启用，1：启用',
                            `in_process_liveness_fixed_range` varchar(100) DEFAULT NULL COMMENT '考试过程中活体检测间隔时间',
                            `in_process_liveness_judge_policy` varchar(30) DEFAULT NULL COMMENT '考试过程中活体检测结果判定规则，any：任意一次通过，all：全部都要通过，more：通过次数大于失败次数',
                            `record_select_strategy` varchar(30) DEFAULT NULL COMMENT '多次考试记录的选择逻辑，highest_total_score：全部阅卷后取最高分，highest_objective_score：客观分最高，latest：最后一次提交',
                            `enable_ip_limit` tinyint DEFAULT NULL COMMENT '是否IP段限制，0：不允许，1：允许',
                            `ip_allow` varchar(1000) DEFAULT NULL COMMENT '允许IP段',
                            `score_status` varchar(30) DEFAULT NULL COMMENT '算分状态，never：从未算分，calculating：正在算分，finish：算分完成',
                            `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                            `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                            `objective_score_policy` varchar(30) DEFAULT NULL COMMENT '客观题给分策略，equal: 全对给分，partial: 漏选给一半分',
                            `monitor_video_source` varchar(300) DEFAULT NULL COMMENT '开启监控的视频源',
                            `monitor_record` varchar(300) DEFAULT NULL COMMENT '开启转录的视频源',
                            `progress` double DEFAULT NULL COMMENT '算分进度',
                            `invigilate_verify` varchar(30) DEFAULT NULL COMMENT '监考人工审核，now：实时审核，later：事后审核',
                            `monitor_status` varchar(30) DEFAULT 'NOT_START' COMMENT '监考状态，NOT_START：未开始，START：监考中，FINISHED：已结束',
                            `in_process_realness_verify` tinyint DEFAULT NULL COMMENT '考试过程中是否启用真实性检测，0：不启用，1：启用',
                            `scan_time` bigint DEFAULT NULL COMMENT '扫描时间',
                            `third_exam_id` varchar(200) DEFAULT NULL COMMENT '第三方考试id',
                            `exam_student_call_enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否允许考生发起语音通话，0：否，1：是',
                            `objective_score_push` tinyint NOT NULL DEFAULT '0' COMMENT '是否推送客观分，0：否，1：是',
                            `exam_student_breach_push` tinyint NOT NULL DEFAULT '0' COMMENT '是否推送违纪考生，0：否，1：是',
                            `video_delete` tinyint NOT NULL DEFAULT '0' COMMENT '视频是否删除，0：未删除，1：已删除',
                            `video_delete_time` bigint DEFAULT NULL COMMENT '视频删除时间',
                            PRIMARY KEY (`id`),
                            UNIQUE KEY `t_e_exam_orgId_code_Idx` (`org_id`,`code`) USING BTREE,
                            UNIQUE KEY `t_e_exam_short_code_Idx` (`short_code`,`enable`,`archived`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试批次';

-- ----------------------------
-- Table structure for t_e_exam_activity
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_activity`;
CREATE TABLE `t_e_exam_activity` (
                                     `id` bigint NOT NULL COMMENT '主键',
                                     `exam_id` bigint NOT NULL COMMENT '批次id',
                                     `code` varchar(50) NOT NULL DEFAULT '' COMMENT '场次代码',
                                     `prepare_seconds` int DEFAULT NULL COMMENT '提前多长时间开始候考(分钟)',
                                     `max_duration_seconds` int DEFAULT NULL COMMENT '最大考试时长',
                                     `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                                     `opening_seconds` int DEFAULT NULL COMMENT '允许开考时长(分钟)',
                                     `start_time` bigint DEFAULT NULL COMMENT '开考时间',
                                     `finish_time` bigint DEFAULT NULL COMMENT '结束时间',
                                     `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                     `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                     `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                     `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                     PRIMARY KEY (`id`),
                                     UNIQUE KEY `t_e_exam_activity_examId_code_Idx` (`exam_id`,`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试场次';

-- ----------------------------
-- Table structure for t_e_exam_breach_log
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_breach_log`;
CREATE TABLE `t_e_exam_breach_log` (
                                       `id` bigint NOT NULL COMMENT '主键',
                                       `exam_id` bigint NOT NULL COMMENT '考试ID',
                                       `exam_activity_id` bigint NOT NULL COMMENT '场次ID',
                                       `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                       `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                       `type` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '类型',
                                       `description` mediumtext CHARACTER SET utf8mb4 COMMENT '描述',
                                       `status` tinyint DEFAULT NULL COMMENT '状态，0：处理，1：撤销',
                                       `remark` mediumtext CHARACTER SET utf8mb4 COMMENT '备注',
                                       `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                       `create_id` bigint DEFAULT NULL COMMENT '创建人',
                                       `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                       `update_id` bigint DEFAULT NULL COMMENT '更新人',
                                       PRIMARY KEY (`id`) USING BTREE,
                                       KEY `exam_status` (`exam_id`,`status`,`exam_activity_id`) USING BTREE,
                                       KEY `student_status` (`exam_student_id`,`status`,`create_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生违纪处理';

-- ----------------------------
-- Table structure for t_e_exam_course
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_course`;
CREATE TABLE `t_e_exam_course` (
                                   `id` bigint NOT NULL COMMENT '主键',
                                   `exam_id` bigint NOT NULL COMMENT '考试ID',
                                   `course_code` varchar(30) NOT NULL DEFAULT '' COMMENT '科目编码',
                                   `course_name` varchar(50) NOT NULL DEFAULT '' COMMENT '科目名称',
                                   `objective_shuffle` tinyint DEFAULT NULL COMMENT '是否开启客观题乱序，0：不开启，1：开启',
                                   `option_shuffle` tinyint DEFAULT NULL COMMENT '是否选项乱序，针对一个科目进行设置，0：不开启，1：开启',
                                   `paper_count` int DEFAULT NULL COMMENT '已绑定试卷数量',
                                   `has_answer` tinyint DEFAULT NULL COMMENT '是否已补齐标答，0：否，1：是',
                                   `audio_play_count` int DEFAULT '2' COMMENT '音频播放次数',
                                   `has_audio` varchar(30) DEFAULT NULL COMMENT '是否包含音频题目，0：不包含，1：包含',
                                   `mobile_photo_upload` tinyint DEFAULT '1' COMMENT '是否允许使用移动端拍照答题，0：不开启，1：开启',
                                   `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                   `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                   `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                   `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                   PRIMARY KEY (`id`),
                                   UNIQUE KEY `t_e_exam_course_examId_courseCode_Idx` (`exam_id`,`course_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试科目';

-- ----------------------------
-- Table structure for t_e_exam_paper
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_paper`;
CREATE TABLE `t_e_exam_paper` (
                                  `id` bigint NOT NULL COMMENT '主键',
                                  `exam_id` bigint NOT NULL COMMENT '考试批次id',
                                  `code` varchar(50) NOT NULL DEFAULT '' COMMENT '试卷编码',
                                  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '试卷名称',
                                  `total_score` double NOT NULL COMMENT '试卷总分',
                                  `paper_path` varchar(100) DEFAULT NULL COMMENT '题干路径',
                                  `decrypt_secret` varchar(50) DEFAULT NULL COMMENT '解密密钥',
                                  `encrypt_mode` varchar(30) DEFAULT NULL COMMENT 'auto：自动，hand：手动',
                                  `need_voice_answer` tinyint DEFAULT NULL COMMENT '是否需要语音作答，0：不需要，1：需要',
                                  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                  `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                  `answer_path` varchar(100) DEFAULT NULL COMMENT '标答路径',
                                  `has_audio` tinyint DEFAULT NULL COMMENT '题干包含音频，0：不包含，1：包含',
                                  `weight` double DEFAULT NULL COMMENT '调卷比例',
                                  `audio_play_count` int DEFAULT '2' COMMENT '音频播放次数',
                                  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                  `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                  `course_code` varchar(30) DEFAULT NULL COMMENT '科目编码',
                                  `struct_path` varchar(100) DEFAULT NULL COMMENT '结构文件路径',
                                  `decrypt_vector` varchar(100) DEFAULT NULL COMMENT '解密向量',
                                  `paper_view_path` varchar(100) DEFAULT NULL COMMENT '阅卷用试卷json路径',
                                  `total_objective_score` double DEFAULT NULL COMMENT '试卷客观题总分',
                                  `total_subjective_score` double DEFAULT NULL COMMENT '试卷主观题总分',
                                  `paper_md5` varchar(100) DEFAULT NULL COMMENT '试卷数据包MD5',
                                  `struct_md5` varchar(100) DEFAULT NULL COMMENT '结构文件MD5',
                                  PRIMARY KEY (`id`),
                                  UNIQUE KEY `t_e_exam_paper_examId_code_Idx` (`exam_id`,`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试试卷';

-- ----------------------------
-- Table structure for t_e_exam_reexam
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_reexam`;
CREATE TABLE `t_e_exam_reexam` (
                                   `id` bigint NOT NULL COMMENT '主键',
                                   `exam_id` bigint NOT NULL COMMENT '考试ID',
                                   `exam_activity_id` bigint NOT NULL COMMENT '场次ID',
                                   `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                   `model` tinyint DEFAULT NULL COMMENT '重考方式，0：批次内，1：换批次',
                                   `reason` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '重考原因',
                                   `status` tinyint DEFAULT NULL COMMENT '状态，0：无需审核，1：待审核，2：已审核',
                                   `auditing_id` bigint DEFAULT NULL COMMENT '审核人id',
                                   `auditing_status` tinyint DEFAULT NULL COMMENT '审核状态，0：通过，1：不通过',
                                   `auditing_time` bigint DEFAULT NULL COMMENT '审核时间',
                                   `auditing_suggest` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '审批意见',
                                   `remark` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '备注',
                                   `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                   `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                   `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                   `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                   PRIMARY KEY (`id`) USING BTREE,
                                   KEY `exam_activity` (`exam_id`,`exam_activity_id`,`status`) USING BTREE,
                                   KEY `student` (`exam_student_id`,`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生重考处理';

-- ----------------------------
-- Table structure for t_e_exam_reexam_auditing
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_reexam_auditing`;
CREATE TABLE `t_e_exam_reexam_auditing` (
                                            `id` bigint NOT NULL COMMENT '主键',
                                            `reexam_id` bigint NOT NULL COMMENT '重考id',
                                            `auditing_id` bigint DEFAULT NULL COMMENT '待审核人id',
                                            PRIMARY KEY (`id`) USING BTREE,
                                            KEY `index` (`reexam_id`,`auditing_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='重考审核人表';

-- ----------------------------
-- Table structure for t_e_exam_student
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_student`;
CREATE TABLE `t_e_exam_student` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `exam_id` bigint NOT NULL COMMENT '批次id',
                                    `exam_activity_id` bigint NOT NULL COMMENT '场次id',
                                    `student_id` bigint NOT NULL COMMENT '学生id',
                                    `course_code` varchar(50) NOT NULL DEFAULT '' COMMENT '科目代码',
                                    `room_code` varchar(50) NOT NULL DEFAULT '' COMMENT '虚拟考场代码，考试唯一',
                                    `identity` varchar(50) NOT NULL DEFAULT '' COMMENT '证件号，机构内唯一',
                                    `name` varchar(100) NOT NULL DEFAULT '' COMMENT '姓名',
                                    `parameter` varchar(1000) DEFAULT NULL COMMENT '扩展字段',
                                    `already_exam_count` int DEFAULT NULL COMMENT '已考考试次数',
                                    `current_record_id` bigint DEFAULT NULL COMMENT '当前考试记录ID',
                                    `select_record_id` bigint DEFAULT NULL COMMENT '最终生效的记录ID',
                                    `room_name` varchar(100) DEFAULT NULL COMMENT '考场名称',
                                    `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                                    `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                    `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                    `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                    `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                    `grade` varchar(50) DEFAULT NULL COMMENT '年级',
                                    `class_no` varchar(50) DEFAULT NULL COMMENT '教学班级',
                                    `course_name` varchar(100) DEFAULT NULL COMMENT '科目名称',
                                    PRIMARY KEY (`id`),
                                    UNIQUE KEY `union_identity_index` (`exam_id`,`exam_activity_id`,`course_code`,`identity`),
                                    KEY `student_id` (`student_id`) USING BTREE,
                                    KEY `exam_id` (`exam_id`),
                                    KEY `exam_room_code` (`room_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生库';

-- ----------------------------
-- Table structure for t_e_exam_student_log
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_student_log`;
CREATE TABLE `t_e_exam_student_log` (
                                        `id` bigint NOT NULL COMMENT '主键',
                                        `student_id` bigint NOT NULL COMMENT '学生id',
                                        `exam_student_id` bigint DEFAULT NULL COMMENT '考生id',
                                        `exam_record_id` bigint DEFAULT NULL COMMENT '考试记录id',
                                        `type` varchar(30) DEFAULT NULL COMMENT '类型',
                                        `info` varchar(1000) DEFAULT NULL COMMENT '描述',
                                        `remark` mediumtext COMMENT '备注',
                                        `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                        `obj_id` bigint DEFAULT NULL COMMENT '业务id',
                                        `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                        `title` varchar(100) DEFAULT NULL COMMENT '日志标题',
                                        `ip` varchar(30) DEFAULT NULL COMMENT 'ip地址',
                                        `country` varchar(100) DEFAULT NULL COMMENT '国家',
                                        `region` varchar(100) DEFAULT NULL COMMENT '地区',
                                        `province` varchar(100) DEFAULT NULL COMMENT '省份',
                                        `city` varchar(100) DEFAULT NULL COMMENT '城市',
                                        `isp` varchar(100) DEFAULT NULL COMMENT '运营商',
                                        PRIMARY KEY (`id`),
                                        KEY `student_create_time` (`exam_student_id`,`create_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生轨迹';

-- ----------------------------
-- Table structure for t_e_exam_student_online_log
-- ----------------------------
DROP TABLE IF EXISTS `t_e_exam_student_online_log`;
CREATE TABLE `t_e_exam_student_online_log` (
                                               `id` bigint NOT NULL COMMENT '主键',
                                               `student_id` bigint NOT NULL COMMENT '学生id',
                                               `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                               `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
                                               `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '类型，ON_LINE：上线，OFF_LINE：下线',
                                               `create_time` bigint NOT NULL COMMENT '创建时间',
                                               PRIMARY KEY (`id`),
                                               KEY `create_time_type_index` (`create_time`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考生上线日志';

-- ----------------------------
-- Table structure for t_e_simulate_paper
-- ----------------------------
DROP TABLE IF EXISTS `t_e_simulate_paper`;
CREATE TABLE `t_e_simulate_paper` (
                                      `id` bigint NOT NULL COMMENT '主键',
                                      `org_id` bigint NOT NULL COMMENT '机构id',
                                      `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '试卷名称',
                                      `total_score` double NOT NULL COMMENT '总分',
                                      `paper_path` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '题干路径',
                                      `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                      `update_time` bigint DEFAULT NULL COMMENT '修改时间',
                                      `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                      `update_id` bigint DEFAULT NULL COMMENT '修改人id',
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模拟试卷';

-- ----------------------------
-- Table structure for t_e_student
-- ----------------------------
DROP TABLE IF EXISTS `t_e_student`;
CREATE TABLE `t_e_student` (
                               `id` bigint NOT NULL COMMENT '主键',
                               `org_id` bigint DEFAULT NULL COMMENT '机构ID',
                               `identity` varchar(50) NOT NULL DEFAULT '' COMMENT '证件号',
                               `password` varchar(30) NOT NULL DEFAULT '' COMMENT '登陆密码，密文保存',
                               `idcard_number` varchar(30) DEFAULT NULL COMMENT '身份证号',
                               `mobile_number` varchar(30) DEFAULT NULL COMMENT '手机号',
                               `name` varchar(100) NOT NULL DEFAULT '' COMMENT '姓名',
                               `gender` varchar(20) DEFAULT NULL COMMENT '性别，man：男，woman：女',
                               `base_photo_path` varchar(500) DEFAULT NULL COMMENT '底照保存地址',
                               `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                               `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                               `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                               `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                               `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                               PRIMARY KEY (`id`),
                               UNIQUE KEY `t_e_student_orgId_identity_Idx` (`org_id`,`identity`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学生档案';

-- ----------------------------
-- Table structure for t_e_user_log
-- ----------------------------
DROP TABLE IF EXISTS `t_e_user_log`;
CREATE TABLE `t_e_user_log` (
                                `id` bigint NOT NULL COMMENT '主键',
                                `user_id` bigint NOT NULL COMMENT '用户id',
                                `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '类型',
                                `info` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '描述',
                                `remark` mediumtext CHARACTER SET utf8mb4 COMMENT '备注',
                                `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户轨迹';

-- ----------------------------
-- Table structure for t_g_error
-- ----------------------------
DROP TABLE IF EXISTS `t_g_error`;
CREATE TABLE `t_g_error` (
                             `id` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '主键',
                             `obj` mediumtext CHARACTER SET utf8mb4 NOT NULL COMMENT '业务信息',
                             `create_time` bigint NOT NULL COMMENT '创建时间',
                             PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='全局异常错误信息表';

-- ----------------------------
-- Table structure for t_ie_exam_invigilate_call
-- ----------------------------
DROP TABLE IF EXISTS `t_ie_exam_invigilate_call`;
CREATE TABLE `t_ie_exam_invigilate_call` (
                                             `id` bigint NOT NULL COMMENT '主键',
                                             `exam_id` bigint NOT NULL COMMENT '考试id',
                                             `exam_activity_id` bigint NOT NULL COMMENT '场次id',
                                             `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                             `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
                                             `source` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '状态',
                                             `live_url` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '观看地址',
                                             `status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '状态',
                                             `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                             `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                             `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                             `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                             `type` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '异常类型',
                                             `call_status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '通话状态',
                                             `monitor_key` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '房间号',
                                             `start_time` bigint DEFAULT NULL COMMENT '开始通话时间',
                                             `end_time` bigint DEFAULT NULL COMMENT '结束通话时间',
                                             PRIMARY KEY (`id`) USING BTREE,
                                             UNIQUE KEY `t_ie_exam_invigilate_call_recordId_source_Idx` (`exam_record_id`,`source`) USING BTREE,
                                             KEY `exam_student` (`exam_student_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监控观看地址和通话申请表';

-- ----------------------------
-- Table structure for t_ie_exam_invigilate_call_log
-- ----------------------------
DROP TABLE IF EXISTS `t_ie_exam_invigilate_call_log`;
CREATE TABLE `t_ie_exam_invigilate_call_log` (
                                                 `id` bigint NOT NULL COMMENT '主键',
                                                 `exam_id` bigint NOT NULL COMMENT '考试id',
                                                 `exam_activity_id` bigint NOT NULL COMMENT '场次id',
                                                 `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                                 `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
                                                 `source` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '监考视频源',
                                                 `live_url` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '观看地址',
                                                 `status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '状态',
                                                 `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                                 `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                                 `update_id` bigint DEFAULT NULL COMMENT '修改人id',
                                                 `update_time` bigint DEFAULT NULL COMMENT '修改时间',
                                                 `remark` mediumtext CHARACTER SET utf8mb4 COMMENT '备注',
                                                 `type` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '异常类型',
                                                 `call_status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '通话状态',
                                                 `monitor_key` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '房间号',
                                                 PRIMARY KEY (`id`) USING BTREE,
                                                 KEY `exam_student` (`exam_student_id`) USING BTREE,
                                                 KEY `exam_record` (`exam_record_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监控观看地址和通话申请日志';

-- ----------------------------
-- Table structure for t_ie_exam_invigilate_notice
-- ----------------------------
DROP TABLE IF EXISTS `t_ie_exam_invigilate_notice`;
CREATE TABLE `t_ie_exam_invigilate_notice` (
                                               `id` bigint NOT NULL COMMENT '主键',
                                               `exam_id` bigint NOT NULL COMMENT '考试ID',
                                               `exam_activity_id` bigint NOT NULL COMMENT '场次ID',
                                               `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                               `form_user_id` bigint DEFAULT NULL COMMENT '发送人id',
                                               `receive_user_id` bigint NOT NULL COMMENT '接收人id',
                                               `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息类型',
                                               `content` varchar(1000) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息内容',
                                               `send_time` bigint DEFAULT NULL COMMENT '发送时间',
                                               `receive_time` bigint DEFAULT NULL COMMENT '接收时间',
                                               PRIMARY KEY (`id`) USING BTREE,
                                               KEY `exam_record` (`exam_record_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监考通知消息记录';

-- ----------------------------
-- Table structure for t_ie_invigilate_exception_info
-- ----------------------------
DROP TABLE IF EXISTS `t_ie_invigilate_exception_info`;
CREATE TABLE `t_ie_invigilate_exception_info` (
                                                  `id` bigint NOT NULL COMMENT '主键',
                                                  `exam_id` bigint NOT NULL COMMENT '考试ID',
                                                  `exam_activity_id` bigint NOT NULL COMMENT '场次ID',
                                                  `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                                  `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                                  `info` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '异常信息',
                                                  `type` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '类别',
                                                  `remark` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '备注',
                                                  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                                  `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                                  `difference` int DEFAULT NULL COMMENT '处理时差，单位秒',
                                                  `photo_url` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '图片url',
                                                  `video_url` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '视频url',
                                                  `obj_id` bigint DEFAULT NULL COMMENT '业务id',
                                                  PRIMARY KEY (`id`) USING BTREE,
                                                  KEY `exam_student` (`exam_id`,`exam_student_id`) USING BTREE,
                                                  KEY `exam_record` (`exam_record_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监考异常信息';

-- ----------------------------
-- Table structure for t_ie_invigilate_warn_info
-- ----------------------------
DROP TABLE IF EXISTS `t_ie_invigilate_warn_info`;
CREATE TABLE `t_ie_invigilate_warn_info` (
                                             `id` bigint NOT NULL COMMENT '主键',
                                             `exam_id` bigint NOT NULL COMMENT '考试ID',
                                             `exam_activity_id` bigint NOT NULL COMMENT '场次ID',
                                             `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                             `exam_student_id` bigint NOT NULL COMMENT '考生id',
                                             `info` mediumtext CHARACTER SET utf8mb4 COMMENT '预警信息',
                                             `level` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '预警级别',
                                             `type` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '类别',
                                             `remark` mediumtext CHARACTER SET utf8mb4 COMMENT '备注',
                                             `approve_status` tinyint DEFAULT NULL COMMENT '审阅状态，0：未阅，1：已阅',
                                             `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                             `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                             `photo_url` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '图片url',
                                             `video_url` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '视频url',
                                             `remind_status` tinyint DEFAULT '1' COMMENT '提醒状态，0：不提醒，1：提醒',
                                             PRIMARY KEY (`id`) USING BTREE,
                                             KEY `exam_student` (`exam_id`,`exam_student_id`) USING BTREE,
                                             KEY `exam_record` (`exam_record_id`,`type`),
                                             KEY `create_time_type_index` (`create_time`,`type`),
                                             KEY `001_index` (`approve_status`,`remind_status`,`exam_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='监考预警信息';

-- ----------------------------
-- Table structure for t_ip_region
-- ----------------------------
DROP TABLE IF EXISTS `t_ip_region`;
CREATE TABLE `t_ip_region` (
                               `id` bigint NOT NULL COMMENT '主键',
                               `exam_record_id` bigint DEFAULT NULL COMMENT '考试记录id',
                               `country` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '国家',
                               `region` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '地区',
                               `province` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '省份',
                               `city` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '城市',
                               `isp` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '运营商',
                               `create_time` bigint NOT NULL COMMENT '创建时间',
                               `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                               PRIMARY KEY (`id`),
                               KEY `exam_record_id_index` (`exam_record_id`),
                               KEY `t_ip_region_country_IDX` (`country`,`province`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='ip信息表';

-- ----------------------------
-- Table structure for t_m_rocket_message
-- ----------------------------
DROP TABLE IF EXISTS `t_m_rocket_message`;
CREATE TABLE `t_m_rocket_message` (
                                      `id` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '主键',
                                      `topic` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息topic',
                                      `tag` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息tag',
                                      `body` mediumtext CHARACTER SET utf8mb4 COMMENT '消息内容',
                                      `type` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息类型',
                                      `obj_id` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '关联业务id',
                                      `obj_name` varchar(200) DEFAULT NULL COMMENT '关联业务名称',
                                      `ack` tinyint NOT NULL COMMENT '消息ack',
                                      `sequence` int DEFAULT NULL COMMENT '消息序号',
                                      `properties` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '扩展类型',
                                      `create_time` bigint NOT NULL COMMENT '创建时间',
                                      `timestamp` bigint NOT NULL COMMENT '时间戳',
                                      `source_id` varchar(50) DEFAULT NULL COMMENT '源消息id',
                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='rocketmq消息';

-- ----------------------------
-- Table structure for t_m_tencent_video_message
-- ----------------------------
DROP TABLE IF EXISTS `t_m_tencent_video_message`;
CREATE TABLE `t_m_tencent_video_message` (
                                             `id` bigint NOT NULL COMMENT '主键',
                                             `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
                                             `request_id` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '请求id',
                                             `video_source` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '视频源',
                                             `start_time` bigint DEFAULT NULL COMMENT '开始时间',
                                             `end_time` bigint DEFAULT NULL COMMENT '结束时间',
                                             `video_url` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '视频地址',
                                             `object` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '请求内容',
                                             `create_time` bigint NOT NULL COMMENT '创建时间',
                                             PRIMARY KEY (`id`),
                                             UNIQUE KEY `exam_record` (`exam_record_id`,`video_source`,`start_time`,`end_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='腾讯云视频回调消息';

-- ----------------------------
-- Table structure for t_oe_exam_answer
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_exam_answer`;
CREATE TABLE `t_oe_exam_answer` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `exam_record_id` bigint NOT NULL COMMENT '作答记录ID',
                                    `main_number` int NOT NULL COMMENT '大题号',
                                    `sub_number` int NOT NULL COMMENT '小题号',
                                    `sub_index` int DEFAULT NULL COMMENT '子题序号',
                                    `answer` mediumtext COMMENT '作答内容',
                                    `version` bigint DEFAULT NULL COMMENT '版本时间戳',
                                    `history` mediumtext COMMENT '作答轨迹',
                                    `duration_seconds` int DEFAULT NULL COMMENT '作答时长',
                                    `score` double DEFAULT NULL COMMENT '分数',
                                    PRIMARY KEY (`id`),
                                    UNIQUE KEY `record_number` (`exam_record_id`,`main_number`,`sub_number`,`sub_index`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='作答结果';

-- ----------------------------
-- Table structure for t_oe_exam_break_history
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_exam_break_history`;
CREATE TABLE `t_oe_exam_break_history` (
                                           `id` bigint NOT NULL COMMENT '主键',
                                           `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                           `break_time` bigint NOT NULL COMMENT '断点发生时间',
                                           `break_reason` varchar(30) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '断点判定原因',
                                           `resume_reason` varchar(300) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '提交异常原因',
                                           `prepare_time` bigint DEFAULT NULL COMMENT '恢复候考时间',
                                           `start_time` bigint DEFAULT NULL COMMENT '恢复开考时间',
                                           `entry_authentication_result` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '恢复开考身份验证结果',
                                           `entry_authentication_id` bigint DEFAULT NULL COMMENT '恢复开考身份验证记录ID',
                                           PRIMARY KEY (`id`) USING BTREE,
                                           KEY `record_time` (`exam_record_id`,`break_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试断点记录';

-- ----------------------------
-- Table structure for t_oe_exam_record
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_exam_record`;
CREATE TABLE `t_oe_exam_record` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `exam_id` bigint NOT NULL COMMENT '考试批次ID',
                                    `exam_activity_id` bigint NOT NULL COMMENT '考试场次ID',
                                    `exam_student_id` bigint NOT NULL COMMENT '考生ID',
                                    `paper_id` bigint NOT NULL COMMENT '实际使用的试卷ID',
                                    `status` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '考试状态，FIRST_PREPARE：首次候考，ANSWERING：正在答题，BREAK_OFF：已中断，RESUME_PREPARE：断点恢复候考，FINISHED：已结束考试，PERSISTED：数据已保存，JUNK： 作废',
                                    `first_prepare_time` bigint DEFAULT NULL COMMENT '首次进入候考时间',
                                    `first_start_time` bigint DEFAULT NULL COMMENT '首次开考时间',
                                    `last_break_time` bigint DEFAULT NULL COMMENT '最近断点时间',
                                    `last_prepare_time` bigint DEFAULT NULL COMMENT '最近恢复候考时间',
                                    `last_start_time` bigint DEFAULT NULL COMMENT '最近恢复开考时间',
                                    `already_break_count` int DEFAULT NULL COMMENT '已断点续考次数',
                                    `client_current_ip` varchar(30) DEFAULT NULL COMMENT '客户端当前IP地址',
                                    `client_websocket_status` varchar(30) DEFAULT NULL COMMENT '客户端websocket状态',
                                    `client_websocket_id` varchar(50) DEFAULT NULL COMMENT '客户端websocket连接标识',
                                    `client_last_sync_time` bigint DEFAULT NULL COMMENT '客户端最近同步时间',
                                    `answer_progress` double DEFAULT NULL COMMENT '答题进度',
                                    `duration_seconds` int DEFAULT NULL COMMENT '累计考试用时',
                                    `finish_time` bigint DEFAULT NULL COMMENT '交卷时间',
                                    `finish_type` varchar(30) DEFAULT NULL COMMENT '交卷原因，hand：手动交卷，auto：系统交卷，breach：违纪交卷',
                                    `warning_count` int DEFAULT NULL COMMENT '预警次数',
                                    `review_result` varchar(30) DEFAULT NULL COMMENT '审核结果，pass：通过，no_pass：不通过',
                                    `objective_score` double DEFAULT NULL COMMENT '客观题分数',
                                    `paper_download` tinyint DEFAULT NULL COMMENT '试题下载，0：是，1：不是',
                                    `breach_status` tinyint DEFAULT NULL COMMENT '是否违纪，0：是，1：不是',
                                    `paper_struct_path` mediumtext COMMENT '个人试卷结构',
                                    `paper_struct_upload` tinyint DEFAULT NULL COMMENT '个人试卷结构是否已上传，0：未上传，1：已上传',
                                    `serial_number` int DEFAULT NULL COMMENT '第几次考试',
                                    `last_break_id` bigint DEFAULT NULL COMMENT '最近断点记录ID',
                                    `entry_authentication_result` varchar(30) DEFAULT NULL COMMENT '开考身份验证结果',
                                    `entry_authentication_id` bigint DEFAULT NULL COMMENT '开考身份验证记录ID',
                                    `in_process_face_verify_status` tinyint DEFAULT NULL COMMENT '当前过程人脸检测状态',
                                    `in_process_liveness_verify_status` tinyint DEFAULT NULL COMMENT '当前过程活体验证状态',
                                    `in_process_liveness_verify_count` int DEFAULT NULL COMMENT '已完成过程活体验证次数',
                                    `monitor_key` varchar(50) DEFAULT NULL COMMENT '监控标识（默认直接用recordId）',
                                    `monitor_status_source` varchar(30) DEFAULT NULL COMMENT '监控状态，stop：停止，start：正常',
                                    `score_status` varchar(30) DEFAULT NULL COMMENT '算分状态，never：从未算分，calculating：正在算分，finish：算分完成',
                                    `start_time` bigint DEFAULT NULL COMMENT '考试开始时间',
                                    `end_time` bigint DEFAULT NULL COMMENT '考试结束时间',
                                    `opening_seconds` int DEFAULT NULL COMMENT '允许开考开放时长，相当于迟到时间',
                                    `min_duration_seconds` int DEFAULT NULL COMMENT '最短考试时长，相当于考试冻结时间',
                                    `max_duration_seconds` int DEFAULT NULL COMMENT '最大考试时长',
                                    `force_finish` tinyint DEFAULT NULL COMMENT '是否在结束时间集中强制收卷，0：不强制，1：强制',
                                    `has_answer_file` tinyint DEFAULT NULL COMMENT '是否有标答，0：否，1：是',
                                    `in_process_realness_verify_status` tinyint DEFAULT NULL COMMENT '当前真实性检测状态',
                                    `camera_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用摄像头拍照答题，0：不允许，1：允许',
                                    `mobile_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用移动端拍照答题，0：不开启，1：开启',
                                    `entry_authentication_policy` varchar(30) DEFAULT NULL COMMENT '开考身份验证策略，off：关闭，face_verify_optional：非强制人脸验证，face_verify_force：强制人脸验证，liveness：活体验证',
                                    `in_process_face_stranger_ignore` tinyint DEFAULT NULL COMMENT '考试过程中人脸检测是否忽略陌生人 ，0：不忽略，1：忽略',
                                    `in_process_liveness_fixed_range` varchar(100) DEFAULT NULL COMMENT '考试过程中活体检测间隔时间',
                                    `in_process_liveness_judge_policy` varchar(30) DEFAULT NULL COMMENT '考试过程中活体检测结果判定规则，any：任意一次通过，all：全部都要通过，more：通过次数大于失败次数',
                                    `monitor_video_source` varchar(300) DEFAULT NULL COMMENT '开启监控的视频源',
                                    `mobile_first_websocket_status` varchar(30) DEFAULT NULL COMMENT '移动端第一机位websocket状态',
                                    `mobile_second_websocket_status` varchar(30) DEFAULT NULL COMMENT '移动端第二机位websocket状态',
                                    `mobile_first_websocket_id` varchar(50) DEFAULT NULL COMMENT '移动端第一机位websocketId',
                                    `mobile_second_websocket_id` varchar(50) DEFAULT NULL COMMENT '移动端第二机位websocketId',
                                    `camera_monitor_status` varchar(30) DEFAULT NULL COMMENT '电脑摄像头通信状态',
                                    `screen_monitor_status` varchar(30) DEFAULT NULL COMMENT '电脑屏幕通信状态',
                                    `mobile_first_monitor_status` varchar(30) DEFAULT NULL COMMENT '手机主机位通信状态',
                                    `mobile_second_monitor_status` varchar(30) DEFAULT NULL COMMENT '手机辅机位监控通信状态',
                                    `monitor_record` varchar(300) DEFAULT NULL COMMENT '开启转录的视频源',
                                    `tencent_video_url` mediumtext COMMENT '转录视频地址',
                                    `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                    PRIMARY KEY (`id`),
                                    KEY `exam_student` (`exam_student_id`) USING BTREE,
                                    KEY `exam_activity_id` (`exam_activity_id`),
                                    KEY `exam_id` (`exam_id`),
                                    KEY `exam_status` (`status`,`client_websocket_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试记录';

-- ----------------------------
-- Table structure for t_oe_exam_simulate_history
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_exam_simulate_history`;
CREATE TABLE `t_oe_exam_simulate_history` (
                                              `id` bigint NOT NULL COMMENT '主键',
                                              `student_id` bigint NOT NULL COMMENT '个人ID',
                                              `paper_id` bigint NOT NULL COMMENT '模拟试卷ID',
                                              `finish_time` bigint DEFAULT NULL COMMENT '最近完成时间',
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模拟考试记录  ';

-- ----------------------------
-- Table structure for t_oe_face_verify_history
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_face_verify_history`;
CREATE TABLE `t_oe_face_verify_history` (
                                            `id` bigint NOT NULL COMMENT '主键',
                                            `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                            `face_count` int DEFAULT NULL COMMENT '人脸数量',
                                            `similarity` double DEFAULT NULL COMMENT '相似度分数',
                                            `realness` double DEFAULT NULL COMMENT '真实性验证结果',
                                            `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                            `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                            `type` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'first：初次开考，recover：恢复开考，process：过程中',
                                            `exception` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '异常类型',
                                            `photo_url` varchar(500) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '图片保存路径',
                                            `time` bigint DEFAULT NULL COMMENT '时间戳',
                                            `batch_no` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '批次号',
                                            PRIMARY KEY (`id`) USING BTREE,
                                            KEY `record_type` (`exam_record_id`,`type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='人脸验证记录';

-- ----------------------------
-- Table structure for t_oe_liveness_verify_history
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_liveness_verify_history`;
CREATE TABLE `t_oe_liveness_verify_history` (
                                                `id` bigint NOT NULL COMMENT '主键',
                                                `exam_record_id` bigint NOT NULL COMMENT '考试记录ID',
                                                `type` varchar(30) CHARACTER SET utf8mb4 NOT NULL COMMENT 'first：初次开考，recover：恢复开考，process：过程中',
                                                `actions` varchar(2000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '随机动作与结果',
                                                `retry` int DEFAULT NULL COMMENT '重试次数',
                                                `pass` tinyint DEFAULT NULL COMMENT '本地验证是否通过，0：不通过，1：通过',
                                                `start_time` bigint DEFAULT NULL COMMENT '开始时间',
                                                `finish_time` bigint DEFAULT NULL COMMENT '完成时间',
                                                `exception` varchar(30) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '异常类型',
                                                `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                                `batch_no` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '批次号',
                                                PRIMARY KEY (`id`) USING BTREE,
                                                KEY `record_type` (`exam_record_id`,`type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='活体验证记录';

-- ----------------------------
-- Table structure for t_oe_simulate_paper
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_simulate_paper`;
CREATE TABLE `t_oe_simulate_paper` (
                                       `id` bigint NOT NULL COMMENT '主键',
                                       `org_id` bigint NOT NULL COMMENT '机构ID',
                                       `name` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '试卷名称',
                                       `total_score` double DEFAULT NULL COMMENT '总分',
                                       `paper_path` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '题干路径',
                                       `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                       `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                       `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                       `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                       PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模拟试卷';

-- ----------------------------
-- Table structure for t_s_auth
-- ----------------------------
DROP TABLE IF EXISTS `t_s_auth`;
CREATE TABLE `t_s_auth` (
                            `id` bigint NOT NULL COMMENT '主键',
                            `school_id` bigint NOT NULL COMMENT '学校id',
                            `access_key` varchar(255) DEFAULT NULL COMMENT 'accessKey',
                            `access_secret` varchar(255) DEFAULT NULL COMMENT 'accessSecret',
                            `description` text COMMENT '离线授权证书',
                            `type` varchar(16) NOT NULL COMMENT '授权类型',
                            `create_id` bigint DEFAULT NULL COMMENT '创建人',
                            `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                            `update_id` bigint DEFAULT NULL COMMENT '更新人',
                            `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                            `expire_time` bigint DEFAULT NULL COMMENT '过期时间',
                            `file` mediumblob COMMENT '文件数据',
                            PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='激活授权配置表';

-- ----------------------------
-- Table structure for t_s_black_list
-- ----------------------------
DROP TABLE IF EXISTS `t_s_black_list`;
CREATE TABLE `t_s_black_list` (
                                  `id` bigint NOT NULL COMMENT '主键',
                                  `org_id` bigint DEFAULT NULL COMMENT '机构id',
                                  `soft_name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '软件名称',
                                  `process_name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '进程名称',
                                  `enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                                  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                  `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                  `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                  PRIMARY KEY (`id`),
                                  UNIQUE KEY `soft_index` (`soft_name`,`process_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='黑名单表';

-- ----------------------------
-- Table structure for t_s_log
-- ----------------------------
DROP TABLE IF EXISTS `t_s_log`;
CREATE TABLE `t_s_log` (
                           `id` bigint NOT NULL COMMENT '主键',
                           `obj` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '实体类别',
                           `obj_name` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '实体名称',
                           `obj_id` bigint DEFAULT NULL COMMENT '实体id',
                           `update_before_obj` mediumtext CHARACTER SET utf8mb4 COMMENT '更改前内容',
                           `update_after_obj` mediumtext CHARACTER SET utf8mb4 COMMENT '更改后内容',
                           `create_id` bigint NOT NULL COMMENT '创建人id',
                           `create_time` bigint NOT NULL COMMENT '创建时间',
                           PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统日志';

-- ----------------------------
-- Table structure for t_s_notify
-- ----------------------------
DROP TABLE IF EXISTS `t_s_notify`;
CREATE TABLE `t_s_notify` (
                              `id` bigint NOT NULL COMMENT '主键',
                              `org_id` bigint DEFAULT NULL COMMENT '机构id',
                              `title` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '标题',
                              `content` varchar(2000) CHARACTER SET utf8mb4 NOT NULL COMMENT '内容',
                              `enable` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
                              `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                              `create_time` bigint DEFAULT NULL COMMENT '创建人时间',
                              `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                              `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                              PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统通知表';

-- ----------------------------
-- Table structure for t_sync_exam_student_score
-- ----------------------------
DROP TABLE IF EXISTS `t_sync_exam_student_score`;
CREATE TABLE `t_sync_exam_student_score` (
                                             `id` bigint NOT NULL COMMENT '主键',
                                             `exam_batch_id` bigint NOT NULL COMMENT '考试批次id',
                                             `college` varchar(100) DEFAULT NULL COMMENT '学院',
                                             `objective_score` double DEFAULT NULL COMMENT '客观题分数',
                                             `paper_type` varchar(50) DEFAULT NULL COMMENT '卷型',
                                             `exam_code` varchar(100) DEFAULT NULL COMMENT '考试编码',
                                             `student_code` varchar(100) DEFAULT NULL COMMENT '学号',
                                             `clazz_name` varchar(100) DEFAULT NULL COMMENT '班级',
                                             `subjective_score_detail` mediumtext COMMENT '主观题分数明细',
                                             `exam_number` varchar(100) DEFAULT NULL COMMENT '准考证号',
                                             `total_score` double DEFAULT NULL COMMENT '总分',
                                             `sheet_urls` mediumtext COMMENT '原卷url',
                                             `teacher` varchar(100) DEFAULT NULL COMMENT '教师',
                                             `objective_score_detail` mediumtext COMMENT '客观题分数明细',
                                             `exam_id` bigint DEFAULT NULL COMMENT '云阅卷考试id',
                                             `name` varchar(100) DEFAULT NULL COMMENT '姓名',
                                             `subjective_score` double DEFAULT NULL COMMENT '主观题分数',
                                             `subject_code` varchar(100) DEFAULT NULL COMMENT '科目编码',
                                             `subject_name` varchar(100) DEFAULT NULL COMMENT '科目名称',
                                             `status` tinyint DEFAULT NULL COMMENT '考生状态，1-正常，2-缺考(包含未上传)，3-违纪',
                                             `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                             `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                             PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='同步云阅卷考生成绩表';