/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80020
 Source Host           : localhost:3306
 Source Schema         : themis

 Target Server Type    : MySQL
 Target Server Version : 80020
 File Encoding         : 65001

 Date: 24/09/2020 15:49:23
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

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

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

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

-- ----------------------------
-- Records of qrtz_cron_triggers
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_cron_triggers` VALUES ('ClusterQuartz', 'MQ_ACTIVITY_JOB_NAME', 'MQ_ACTIVITY_JOB_GROUP_NAME', '0 0 0 * * ?', 'Asia/Shanghai');
INSERT INTO `qrtz_cron_triggers` VALUES ('ClusterQuartz', 'MQ_JOB_NAME', 'MQ_JOB_GROUP_NAME', '0 0/1 * * * ?', 'Asia/Shanghai');
COMMIT;

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

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

-- ----------------------------
-- Records of qrtz_job_details
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_job_details` VALUES ('ClusterQuartz', 'MQ_ACTIVITY_JOB_NAME', 'MQ_ACTIVITY_JOB_GROUP_NAME', NULL, 'com.qmth.themis.task.quartz.MqActivityJob', '0', '0', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400046E616D65740021636F6D2E716D74682E7468656D69732E7461736B2E71756172747A2E4D714A6F627800);
INSERT INTO `qrtz_job_details` VALUES ('ClusterQuartz', 'MQ_JOB_NAME', 'MQ_JOB_GROUP_NAME', NULL, 'com.qmth.themis.task.quartz.MqJob', '0', '0', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400046E616D65740021636F6D2E716D74682E7468656D69732E7461736B2E71756172747A2E4D714A6F627800);
COMMIT;

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

-- ----------------------------
-- Records of qrtz_locks
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_locks` VALUES ('ClusterQuartz', 'STATE_ACCESS');
INSERT INTO `qrtz_locks` VALUES ('ClusterQuartz', 'TRIGGER_ACCESS');
COMMIT;

-- ----------------------------
-- 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) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

-- ----------------------------
-- Records of qrtz_scheduler_state
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_scheduler_state` VALUES ('ClusterQuartz', 'kingdeMacBook-Air.local1600911939740', 1600916166331, 5000);
COMMIT;

-- ----------------------------
-- Table structure for qrtz_simple_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for qrtz_simprop_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `STR_PROP_1` varchar(512) DEFAULT NULL,
  `STR_PROP_2` varchar(512) DEFAULT NULL,
  `STR_PROP_3` varchar(512) 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) DEFAULT NULL,
  `BOOL_PROP_2` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

-- ----------------------------
-- Records of qrtz_triggers
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_triggers` VALUES ('ClusterQuartz', 'MQ_ACTIVITY_JOB_NAME', 'MQ_ACTIVITY_JOB_GROUP_NAME', 'MQ_ACTIVITY_JOB_NAME', 'MQ_ACTIVITY_JOB_GROUP_NAME', NULL, 1600963200000, -1, 5, 'WAITING', 'CRON', 1600911960000, 0, NULL, 0, '');
INSERT INTO `qrtz_triggers` VALUES ('ClusterQuartz', 'MQ_JOB_NAME', 'MQ_JOB_GROUP_NAME', 'MQ_JOB_NAME', 'MQ_JOB_GROUP_NAME', NULL, 1600916220000, 1600916160000, 5, 'WAITING', 'CRON', 1600911955000, 0, NULL, 0, '');
COMMIT;

-- ----------------------------
-- 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) NOT NULL COMMENT '应用名',
  `access_key` varchar(100) NOT NULL COMMENT '访问凭证',
  `access_secret` varchar(100) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app信息';

-- ----------------------------
-- 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) NOT NULL COMMENT '附件名称',
  `path` varchar(500) DEFAULT NULL COMMENT '路径',
  `type` varchar(30) NOT NULL COMMENT '类型',
  `size` double NOT NULL COMMENT '大小',
  `md5` varchar(255) NOT NULL COMMENT 'MD5',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 '主键',
  `name` varchar(50) NOT NULL COMMENT '版本名',
  `value` int NOT NULL COMMENT '版本号',
  `url` varchar(100) NOT NULL COMMENT '版本详情链接',
  `description` varchar(200) 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',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT NULL COMMENT '机构ID',
  `user_id` bigint DEFAULT NULL COMMENT '用户ID',
  `room_code` varchar(50) NOT NULL COMMENT '考场代码',
  `room_name` varchar(100) NOT NULL COMMENT '考场名称',
  `monitor_status` varchar(30) DEFAULT NULL COMMENT '监考状态，NOT_START：未开始，START：监考中，FINISHED：已结束',
  `exam_id` bigint DEFAULT NULL COMMENT '考试批次id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_b_exam_invigilate_user_orgId_userId_roomCode_Idx` (`org_id`,`user_id`,`room_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 COMMENT '机构代码，通常用学校简称表示，全局唯一',
  `name` varchar(100) NOT NULL COMMENT '名称',
  `logo` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'logo图片url',
  `enable` tinyint DEFAULT '1' COMMENT '是否启用，0：停用，1：启用',
  `enable_simulate` tinyint DEFAULT NULL COMMENT '是否开启模考',
  `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 NULL COMMENT '是否允许使用活体',
  `enable_monitor_record` tinyint DEFAULT NULL COMMENT '是否允许监控转录',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `update_id` bigint DEFAULT NULL COMMENT '更新人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构';

-- ----------------------------
-- Records of t_b_org
-- ----------------------------
BEGIN;
INSERT INTO `t_b_org` VALUES (1, 'test1', 'test1', 'http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/2020/9/15/b0f3848f06744686bc6e31697bb27038.jpg', 1, 0, NULL, NULL, NULL, 1600932652000, 1600932652000, 'sysadmin', '11111111111', 0, 0, 1, 1);
COMMIT;

-- ----------------------------
-- 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) NOT NULL COMMENT '名称',
  `url` varchar(100) NOT NULL COMMENT '地址',
  `type` varchar(50) NOT NULL COMMENT '类型',
  `parent_id` bigint DEFAULT NULL COMMENT '父id',
  `sequence` int DEFAULT NULL COMMENT '序号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单和权限';

-- ----------------------------
-- Records of t_b_privilege
-- ----------------------------
BEGIN;
INSERT INTO `t_b_privilege` VALUES (1, '系统设置', 'System', 'MENU', NULL, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (2, '用户管理', 'UserManagement', 'MENU', 1, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (3, '机构管理', 'OrgManagement', 'MENU', 1, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (4, '考务管理', 'Exam', 'MENU', NULL, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (5, '批次管理', 'ExamManagement', 'MENU', 4, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (6, '考生管理', 'ExamStudentManagement', 'MENU', 4, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (7, '调卷规则', 'CourseManagement', 'MENU', 4, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (8, '学生档案', 'StudentManagement', 'MENU', 4, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (9, '考场监考设置', 'InvigilateManagement', 'MENU', 4, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (10, '监考管理', 'Invigilation', 'MENU', NULL, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (11, '考情监控', 'ExamInvigilation', 'MENU', 10, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (13, '在线巡考', 'OnlinePatrol', 'MENU', 10, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (15, '实时监控台', 'RealtimeMonitoring', 'MENU', 10, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (16, '监考明细管理', 'InvigilationDetail', 'MENU', 10, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (17, '预警提醒', 'WarningManage', 'MENU', 10, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (18, '重考申请', 'ReexamApply', 'MENU', 10, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (19, '进度查询', 'ProgressDetail', 'MENU', 10, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (21, '重考待审', 'ReexamPending', 'MENU', 10, 8, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (22, '重考已审', 'ReexamChecked', 'MENU', 10, 9, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (24, '考情综合报表分析', 'ExamReport', 'MENU', 10, 10, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (25, '考生端日志管理', 'StudentLogManage', 'MENU', 10, 11, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (26, '查询用户', '/api/admin/user/query', 'LINK', 2, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (27, '新增用户', '/api/admin/user/save', 'LINK', 2, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (28, '修改用户', '/api/admin/user/save', 'LINK', 2, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (29, '重置用户密码', '/api/admin/user/updatePwd', 'LINK', 2, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (30, '启用/禁用用户', '/api/admin/user/enable', 'LINK', 2, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (31, '查询机构', '/api/admin/org/query', 'LINK', 3, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (32, '新增机构', '/api/admin/org/save', 'LINK', 3, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (33, '修改机构', '/api/admin/org/save', 'LINK', 3, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (34, '启用/禁用机构', '/api/admin/org/enable', 'LINK', 3, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (35, '查询批次', '/api/admin/exam/query', 'LINK', 5, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (36, '新增批次', '/api/admin/exam/save', 'LINK', 5, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (37, '复制批次', '/api/admin/exam/copy', 'LINK', 5, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (38, '启用/禁用批次', '/api/admin/exam/toggle', 'LINK', 5, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (39, '修改批次', '/api/admin/exam/save', 'LINK', 5, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (40, '场次设置', '/api/admin/activity/query', 'LINK', 5, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (41, '重新算分', '/api/admin/exam/score/calculate', 'LINK', 5, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (42, '考生导入', 'ExamStudentImport', 'MENU', 4, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (43, '查询考生', '/api/admin/examStudent/query', 'LINK', 6, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (44, '新增考生', '/api/admin/examStudent/save', 'LINK', 6, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (45, '修改考生', '/api/admin/examStudent/save', 'LINK', 6, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (46, '启用/禁用考生', '/api/admin/examStudent/toggle', 'LINK', 6, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (47, '删除考生', '/api/admin/examStudent/delete', 'LINK', 6, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (48, '导入考生', '/api/admin/examStudent/import', 'LINK', 42, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (49, '考生下载文件', '/api/admin/examStudent/download', 'LINK', 42, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (50, '考生导出报告', '/api/admin/examStudent/export', 'LINK', 42, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (51, '查询调卷规则', '/api/admin/exam/course/query', 'LINK', 7, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (52, '导入试卷', '/api/admin/exam/paper/import', 'LINK', 7, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (53, '编辑试卷', '/api/admin/exam/paper/save', 'LINK', 7, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (54, '查询学生', '/api/admin/student/query', 'LINK', 8, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (55, '重置学生密码', '/api/admin/student/updatePwd', 'LINK', 8, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (56, '启用/禁用学生', '/api/admin/student/toggle', 'LINK', 8, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (57, '查询监考信息', '/api/admin/invigilateUser/query', 'LINK', 9, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (58, '导入监考信息', '/api/admin/invigilateUser/import', 'LINK', 9, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (59, '修改监考信息', '/api/admin/invigilateUser/save', 'LINK', 9, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (60, '考生端', 'oeManager', 'MENU', NULL, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (62, '获取待考列表', '/api/oe/exam/waiting', 'LINK', 60, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (63, '开始候考', '/api/oe/exam/prepare', 'LINK', 60, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (64, '断点恢复', '/api/oe/exam/resume', 'LINK', 60, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (65, '人脸验证结果', '/api/oe/face/verify', 'LINK', 60, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (66, '活体验证结果', '/api/oe/liveness/verify', 'LINK', 60, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (67, '获取移动端监考二维码', '/api/oe/qrcode/mobile_monitor', 'LINK', 60, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (68, '获取移动端拍照上传二维码', '/api/oe/qrcode/photo_upload', 'LINK', 60, 8, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (69, '获取移动端录音上传二维码', '/api/oe/qrcode/audio_upload', 'LINK', 60, 9, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (70, '监控观看地址更新', '/api/oe/monitor/live_url', 'LINK', 60, 10, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (71, '监控状态更新', '/api/oe/monitor/status', 'LINK', 60, 11, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (72, '发送通话申请', '/api/oe/monitor/call/apply', 'LINK', 60, 12, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (73, '撤销通话申请', '/api/oe/monitor/call/cancel', 'LINK', 60, 13, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (74, '开始考试答题', '/api/oe/exam/start', 'LINK', 60, 14, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (75, '上传个人试卷结构', '/api/oe/exam/student_paper_struct/upload', 'LINK', 60, 15, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (76, '提交作答结果', '/api/oe/exam/answer/submit', 'LINK', 60, 16, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (77, '更新音频剩余播放次数', '/api/oe/exam/audio_left_play_count/submit', 'LINK', 60, 17, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (78, '文件上传', '/api/oe/file/upload', 'LINK', 60, 18, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (79, '结束考试', '/api/oe/exam/finish', 'LINK', 60, 19, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (80, '查询交卷结果', '/api/oe/exam/result', 'LINK', 60, 20, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (82, '考场导出', '/api/admin/invigilateUser/export', 'LINK', 9, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (83, '任务查询', '/api/admin/task/query', 'LINK', 6, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (84, '考试批次详情', '/api/admin/exam/detail', 'LINK', 5, 8, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (85, '学生考试记录查询', '/api/admin/student/exam_record/query', 'LINK', 8, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (86, '考试场次修改', '/api/admin/activity/save', 'LINK', 5, 9, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (89, '获取移动端监考二维码', '/api/oe/qrcode/mobile_monitor', 'LINK', 60, 21, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (90, '获取移动端拍照二维码', '/api/oe/qrcode/photo_upload', 'LINK', 60, 22, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (91, '获取移动端录音二维码', '/api/oe/qrcode/audio_upload', 'LINK', 60, 23, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (92, '监控观看地址更新', '/api/oe/monitor/live_url', 'LINK', 60, 24, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (93, '监控状态更新', '/api/oe/monitor/status', 'LINK', 60, 25, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (94, '发送通话申请', '/api/oe/monitor/call/apply', 'LINK', 60, 26, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (95, '撤销通话申请', '/api/oe/monitor/call/cancel', 'LINK', 60, 27, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (98, '试卷查询', '/api/admin/exam/paper/query', 'LINK', 7, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (99, '科目修改', '/api/admin/exam/course/save', 'LINK', 7, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (100, '考情监考统计', '/api/admin/invigilate/count', 'LINK', 12, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (101, '在线巡考', '/api/admin/invigilate/patrol/list', 'LINK', 13, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (102, '实时监控台列表', '/api/admin/invigilate/list', 'LINK', 14, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (103, '实时监控台视频列表', '/api/admin/invigilate/list/video', 'LINK', 14, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (104, '监考明细管理列表', '/api/admin/invigilate/history/list', 'LINK', 14, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (105, '预警提醒通知', '/api/admin/invigilate/warn/notify', 'LINK', 14, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (106, '预警提醒列表', '/api/admin/invigilate/warn/list', 'LINK', 14, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (107, '重考申请列表', '/api/admin/invigilate/reexam/list', 'LINK', 14, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (108, '进度查询列表', '/api/admin/invigilate/progress/list', 'LINK', 14, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (109, '重考待审', '/api/admin/invigilate/reexam/list_not_done', 'LINK', 21, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (110, '重考已审', '/api/admin/invigilate/reexam/list_done', 'LINK', 22, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (111, '重考申请', '/api/admin/invigilate/reexam/apply', 'LINK', 14, 8, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (112, '重考审核', '/api/admin/invigilate/reexam/auditing', 'LINK', 21, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (113, '重考审核明细', '/api/admin/invigilate/reexam/detail', 'LINK', 14, 9, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (114, '移动端监控观看地址更新', '/api/mobile/monitor/live_url', 'LINK', 60, 28, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (115, '移动端监控状态更新', '/api/mobile/monitor/status', 'LINK', 60, 29, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (116, '移动端发送通话申请', '/api/mobile/monitor/call/apply', 'LINK', 60, 30, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (117, '移动端撤销通话申请', '/api/mobile/monitor/call/cancel', 'LINK', 60, 31, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (118, '监考强制/手动交卷', '/api/admin/invigilate/finish', 'LINK', 10, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (119, '实时监控台列表明细', '/api/admin/invigilate/list/detail', 'LINK', 14, 10, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (120, '监考违纪处理', '/api/admin/invigilate/breach', 'LINK', 10, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (121, '监考消息通知', '/api/admin/invigilate/notice', 'LINK', 10, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (122, '监考考试属性统计', '/api/admin/exam/prop/count', 'LINK', 10, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (123, '报表-考试概览', '/api/admin/report/exam_view', 'LINK', 24, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (124, '报表-情况统计', '/api/admin/report/exam_view_count', 'LINK', 24, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (125, '报表-缺考名单', '/api/admin/report/exam_deficiency_list', 'LINK', 24, 3, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (126, '报表-异常处理', '/api/admin/report/exam_exception_list', 'LINK', 24, 4, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (127, '报表-异常处理明细', '/api/admin/report/exam_exception_list_detail', 'LINK', 24, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (128, '报表-重考处理', '/api/admin/report/exam_reexam_list', 'LINK', 24, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (129, '报表-违纪名单', '/api/admin/report/exam_breach_list', 'LINK', 24, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (130, '报表-违纪名单明细', '/api/admin/report/exam_breach_list_detail', 'LINK', 24, 8, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (131, '报表-撤销违纪名单', '/api/admin/report/exam_revoke_breach_list', 'LINK', 24, 9, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (132, '报表-撤销违纪名单明细', '/api/admin/report/exam_revoke_breach_list_detail', 'LINK', 24, 10, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (133, '报表-考生日志', '/api/admin/report/exam_student_log_list', 'LINK', 25, 1, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (134, '报表-考生日志明细', '/api/admin/report/exam_student_log_list_detail', 'LINK', 25, 2, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (135, '监考端获取考试批次提醒', '/api/admin/exam/list/count', 'LINK', 10, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (136, '进度查询导出', '/api/admin/invigilate/progress/export', 'LINK', 14, 11, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (137, '拍照/录音答题就绪', '/api/mobile/answer/ready', 'LINK', 60, 32, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (138, '拍照/录音提交', '/api/mobile/answer/submit', 'LINK', 60, 33, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (139, '监考端撤销通话申请', '/api/admin/monitor/call/cancel', 'LINK', 10, 5, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (140, '结束监考', '/api/admin/invigilate/exam/finish', 'LINK', 14, 12, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (141, '导入导出任务', 'ImportExportTask', 'MENU', 4, 7, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (142, '监考获取monitorKey', '/api/admin/monitor/getMonitorKey', 'LINK', 60, 28, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (143, '监考监控通话提醒接口', '/api/admin/monitor/call/count', 'LINK', 60, 29, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (144, '监考监控通话查询', '/api/admin/monitor/call/list', 'LINK', 60, 30, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (145, '监考监控通话查询来源', '/api/admin/monitor/call/query', 'LINK', 60, 31, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (146, '重考待审提醒', '/api/admin/invigilate/reexam/list_not_done_notify', 'LINK', 60, 32, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (147, '预警消息', '/api/admin/invigilate/warn/message', 'LINK', 60, 33, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (148, '预警修改阅读状态', '/api/admin/invigilate/warn/save/status', 'LINK', 60, 34, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (149, '学生上传底照', '/api/admin/student/base_photo/upload', 'LINK', 6, 6, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (150, '报表-在线巡考', '/api/admin/report/patrol', 'LINK', 60, 35, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (151, '报表-考情监控-人数', '/api/admin/report/examination_monitor/count', 'LINK', 60, 36, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (152, '报表-考情监控-预警分布', '/api/admin/report/examination_monitor/warn_distribution', 'LINK', 60, 37, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (153, '报表-考情监控-预警时间趋势', '/api/admin/report/examination_monitor/warn_trend', 'LINK', 60, 38, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (154, '实时监控台视频随机列表', '/api/admin/invigilate/list/video/random', 'LINK', 60, 39, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (155, '进度查询列表导出', '/api/admin/invigilate/progress/list/export', 'LINK', 60, 40, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (156, '报表-考情监控-预警时间趋势', '/api/admin/report/examination_monitor/warn_msg', 'LINK', 60, 41, NULL, 1600932652000);
INSERT INTO `t_b_privilege` VALUES (157, '候考/答题状态退出', '/api/oe/exam/exit', 'LINK', 60, 42, NULL, 1600932652000);
COMMIT;

-- ----------------------------
-- 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 COMMENT '角色编码',
  `role_name` varchar(50) NOT NULL COMMENT '角色名称',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_b_role_role_code_Idx` (`role_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';

-- ----------------------------
-- Records of t_b_role
-- ----------------------------
BEGIN;
INSERT INTO `t_b_role` VALUES (1, 'SUPER_ADMIN', '系统管理员', 1600932652000);
INSERT INTO `t_b_role` VALUES (2, 'INVIGILATE', '监考员', 1600932652000);
INSERT INTO `t_b_role` VALUES (3, 'ADMIN', '管理员', 1600932652000);
INSERT INTO `t_b_role` VALUES (4, 'INSPECTION', '巡考员', 1600932652000);
INSERT INTO `t_b_role` VALUES (5, 'STUDENT', '学生', 1600932652000);
COMMIT;

-- ----------------------------
-- 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限';

-- ----------------------------
-- Records of t_b_role_privilege
-- ----------------------------
BEGIN;
INSERT INTO `t_b_role_privilege` VALUES (1, 'SUPER_ADMIN', 1);
INSERT INTO `t_b_role_privilege` VALUES (2, 'SUPER_ADMIN', 2);
INSERT INTO `t_b_role_privilege` VALUES (3, 'SUPER_ADMIN', 3);
INSERT INTO `t_b_role_privilege` VALUES (4, 'SUPER_ADMIN', 26);
INSERT INTO `t_b_role_privilege` VALUES (5, 'SUPER_ADMIN', 27);
INSERT INTO `t_b_role_privilege` VALUES (6, 'SUPER_ADMIN', 28);
INSERT INTO `t_b_role_privilege` VALUES (7, 'SUPER_ADMIN', 29);
INSERT INTO `t_b_role_privilege` VALUES (8, 'SUPER_ADMIN', 30);
INSERT INTO `t_b_role_privilege` VALUES (9, 'SUPER_ADMIN', 31);
INSERT INTO `t_b_role_privilege` VALUES (10, 'SUPER_ADMIN', 32);
INSERT INTO `t_b_role_privilege` VALUES (11, 'SUPER_ADMIN', 33);
INSERT INTO `t_b_role_privilege` VALUES (12, 'SUPER_ADMIN', 34);
INSERT INTO `t_b_role_privilege` VALUES (13, 'ADMIN', 1);
INSERT INTO `t_b_role_privilege` VALUES (14, 'ADMIN', 2);
INSERT INTO `t_b_role_privilege` VALUES (15, 'ADMIN', 26);
INSERT INTO `t_b_role_privilege` VALUES (16, 'ADMIN', 27);
INSERT INTO `t_b_role_privilege` VALUES (17, 'ADMIN', 28);
INSERT INTO `t_b_role_privilege` VALUES (18, 'ADMIN', 29);
INSERT INTO `t_b_role_privilege` VALUES (19, 'ADMIN', 30);
INSERT INTO `t_b_role_privilege` VALUES (20, 'ADMIN', 4);
INSERT INTO `t_b_role_privilege` VALUES (21, 'ADMIN', 5);
INSERT INTO `t_b_role_privilege` VALUES (22, 'ADMIN', 6);
INSERT INTO `t_b_role_privilege` VALUES (23, 'ADMIN', 7);
INSERT INTO `t_b_role_privilege` VALUES (24, 'ADMIN', 8);
INSERT INTO `t_b_role_privilege` VALUES (25, 'ADMIN', 9);
INSERT INTO `t_b_role_privilege` VALUES (26, 'ADMIN', 35);
INSERT INTO `t_b_role_privilege` VALUES (27, 'ADMIN', 36);
INSERT INTO `t_b_role_privilege` VALUES (28, 'ADMIN', 37);
INSERT INTO `t_b_role_privilege` VALUES (29, 'ADMIN', 38);
INSERT INTO `t_b_role_privilege` VALUES (30, 'ADMIN', 39);
INSERT INTO `t_b_role_privilege` VALUES (31, 'ADMIN', 40);
INSERT INTO `t_b_role_privilege` VALUES (32, 'ADMIN', 41);
INSERT INTO `t_b_role_privilege` VALUES (33, 'ADMIN', 42);
INSERT INTO `t_b_role_privilege` VALUES (34, 'ADMIN', 43);
INSERT INTO `t_b_role_privilege` VALUES (35, 'ADMIN', 44);
INSERT INTO `t_b_role_privilege` VALUES (36, 'ADMIN', 45);
INSERT INTO `t_b_role_privilege` VALUES (37, 'ADMIN', 46);
INSERT INTO `t_b_role_privilege` VALUES (38, 'ADMIN', 47);
INSERT INTO `t_b_role_privilege` VALUES (39, 'ADMIN', 51);
INSERT INTO `t_b_role_privilege` VALUES (40, 'ADMIN', 52);
INSERT INTO `t_b_role_privilege` VALUES (41, 'ADMIN', 53);
INSERT INTO `t_b_role_privilege` VALUES (42, 'ADMIN', 54);
INSERT INTO `t_b_role_privilege` VALUES (43, 'ADMIN', 55);
INSERT INTO `t_b_role_privilege` VALUES (44, 'ADMIN', 56);
INSERT INTO `t_b_role_privilege` VALUES (45, 'ADMIN', 57);
INSERT INTO `t_b_role_privilege` VALUES (46, 'ADMIN', 58);
INSERT INTO `t_b_role_privilege` VALUES (47, 'ADMIN', 59);
INSERT INTO `t_b_role_privilege` VALUES (48, 'STUDENT', 60);
INSERT INTO `t_b_role_privilege` VALUES (50, 'STUDENT', 62);
INSERT INTO `t_b_role_privilege` VALUES (51, 'STUDENT', 63);
INSERT INTO `t_b_role_privilege` VALUES (52, 'STUDENT', 64);
INSERT INTO `t_b_role_privilege` VALUES (53, 'STUDENT', 65);
INSERT INTO `t_b_role_privilege` VALUES (54, 'STUDENT', 66);
INSERT INTO `t_b_role_privilege` VALUES (55, 'STUDENT', 67);
INSERT INTO `t_b_role_privilege` VALUES (56, 'STUDENT', 68);
INSERT INTO `t_b_role_privilege` VALUES (57, 'STUDENT', 69);
INSERT INTO `t_b_role_privilege` VALUES (58, 'STUDENT', 70);
INSERT INTO `t_b_role_privilege` VALUES (59, 'STUDENT', 71);
INSERT INTO `t_b_role_privilege` VALUES (60, 'STUDENT', 72);
INSERT INTO `t_b_role_privilege` VALUES (61, 'STUDENT', 73);
INSERT INTO `t_b_role_privilege` VALUES (62, 'STUDENT', 74);
INSERT INTO `t_b_role_privilege` VALUES (63, 'STUDENT', 75);
INSERT INTO `t_b_role_privilege` VALUES (64, 'STUDENT', 76);
INSERT INTO `t_b_role_privilege` VALUES (65, 'STUDENT', 77);
INSERT INTO `t_b_role_privilege` VALUES (66, 'STUDENT', 78);
INSERT INTO `t_b_role_privilege` VALUES (67, 'STUDENT', 79);
INSERT INTO `t_b_role_privilege` VALUES (68, 'STUDENT', 80);
INSERT INTO `t_b_role_privilege` VALUES (69, 'ADMIN', 48);
INSERT INTO `t_b_role_privilege` VALUES (70, 'ADMIN', 49);
INSERT INTO `t_b_role_privilege` VALUES (71, 'ADMIN', 50);
INSERT INTO `t_b_role_privilege` VALUES (73, 'ADMIN', 82);
INSERT INTO `t_b_role_privilege` VALUES (74, 'ADMIN', 83);
INSERT INTO `t_b_role_privilege` VALUES (75, 'ADMIN', 84);
INSERT INTO `t_b_role_privilege` VALUES (76, 'ADMIN', 85);
INSERT INTO `t_b_role_privilege` VALUES (77, 'ADMIN', 86);
INSERT INTO `t_b_role_privilege` VALUES (80, 'STUDENT', 89);
INSERT INTO `t_b_role_privilege` VALUES (81, 'STUDENT', 90);
INSERT INTO `t_b_role_privilege` VALUES (82, 'STUDENT', 91);
INSERT INTO `t_b_role_privilege` VALUES (83, 'STUDENT', 92);
INSERT INTO `t_b_role_privilege` VALUES (84, 'STUDENT', 93);
INSERT INTO `t_b_role_privilege` VALUES (85, 'STUDENT', 94);
INSERT INTO `t_b_role_privilege` VALUES (86, 'STUDENT', 95);
INSERT INTO `t_b_role_privilege` VALUES (89, 'ADMIN', 98);
INSERT INTO `t_b_role_privilege` VALUES (90, 'ADMIN', 99);
INSERT INTO `t_b_role_privilege` VALUES (91, 'STUDENT', 114);
INSERT INTO `t_b_role_privilege` VALUES (92, 'STUDENT', 115);
INSERT INTO `t_b_role_privilege` VALUES (93, 'STUDENT', 116);
INSERT INTO `t_b_role_privilege` VALUES (94, 'STUDENT', 117);
INSERT INTO `t_b_role_privilege` VALUES (95, 'ADMIN', 100);
INSERT INTO `t_b_role_privilege` VALUES (96, 'ADMIN', 101);
INSERT INTO `t_b_role_privilege` VALUES (97, 'INSPECTION', 100);
INSERT INTO `t_b_role_privilege` VALUES (98, 'INSPECTION', 101);
INSERT INTO `t_b_role_privilege` VALUES (99, 'ADMIN', 119);
INSERT INTO `t_b_role_privilege` VALUES (100, 'INSPECTION', 119);
INSERT INTO `t_b_role_privilege` VALUES (101, 'INVIGILATE', 135);
INSERT INTO `t_b_role_privilege` VALUES (102, 'INVIGILATE', 122);
INSERT INTO `t_b_role_privilege` VALUES (103, 'INVIGILATE', 102);
INSERT INTO `t_b_role_privilege` VALUES (104, 'INVIGILATE', 103);
INSERT INTO `t_b_role_privilege` VALUES (105, 'INVIGILATE', 119);
INSERT INTO `t_b_role_privilege` VALUES (106, 'INVIGILATE', 120);
INSERT INTO `t_b_role_privilege` VALUES (107, 'INVIGILATE', 121);
INSERT INTO `t_b_role_privilege` VALUES (108, 'INVIGILATE', 122);
INSERT INTO `t_b_role_privilege` VALUES (109, 'ADMIN', 122);
INSERT INTO `t_b_role_privilege` VALUES (110, 'INSPECTION', 122);
INSERT INTO `t_b_role_privilege` VALUES (111, 'INVIGILATE', 118);
INSERT INTO `t_b_role_privilege` VALUES (112, 'ADMIN', 104);
INSERT INTO `t_b_role_privilege` VALUES (113, 'INVIGILATE', 104);
INSERT INTO `t_b_role_privilege` VALUES (114, 'ADMIN', 105);
INSERT INTO `t_b_role_privilege` VALUES (115, 'ADMIN', 106);
INSERT INTO `t_b_role_privilege` VALUES (116, 'INVIGILATE', 105);
INSERT INTO `t_b_role_privilege` VALUES (117, 'INVIGILATE', 106);
INSERT INTO `t_b_role_privilege` VALUES (118, 'ADMIN', 107);
INSERT INTO `t_b_role_privilege` VALUES (119, 'ADMIN', 108);
INSERT INTO `t_b_role_privilege` VALUES (120, 'ADMIN', 109);
INSERT INTO `t_b_role_privilege` VALUES (121, 'ADMIN', 110);
INSERT INTO `t_b_role_privilege` VALUES (122, 'ADMIN', 111);
INSERT INTO `t_b_role_privilege` VALUES (123, 'ADMIN', 112);
INSERT INTO `t_b_role_privilege` VALUES (124, 'ADMIN', 113);
INSERT INTO `t_b_role_privilege` VALUES (125, 'ADMIN', 136);
INSERT INTO `t_b_role_privilege` VALUES (126, 'INVIGILATE', 136);
INSERT INTO `t_b_role_privilege` VALUES (127, 'ADMIN', 123);
INSERT INTO `t_b_role_privilege` VALUES (128, 'ADMIN', 124);
INSERT INTO `t_b_role_privilege` VALUES (129, 'ADMIN', 125);
INSERT INTO `t_b_role_privilege` VALUES (130, 'ADMIN', 126);
INSERT INTO `t_b_role_privilege` VALUES (131, 'ADMIN', 127);
INSERT INTO `t_b_role_privilege` VALUES (132, 'ADMIN', 128);
INSERT INTO `t_b_role_privilege` VALUES (133, 'ADMIN', 129);
INSERT INTO `t_b_role_privilege` VALUES (134, 'ADMIN', 130);
INSERT INTO `t_b_role_privilege` VALUES (135, 'ADMIN', 131);
INSERT INTO `t_b_role_privilege` VALUES (136, 'ADMIN', 132);
INSERT INTO `t_b_role_privilege` VALUES (137, 'ADMIN', 133);
INSERT INTO `t_b_role_privilege` VALUES (138, 'ADMIN', 134);
INSERT INTO `t_b_role_privilege` VALUES (139, 'STUDENT', 137);
INSERT INTO `t_b_role_privilege` VALUES (140, 'STUDENT', 138);
INSERT INTO `t_b_role_privilege` VALUES (141, 'INVIGILATE', 108);
INSERT INTO `t_b_role_privilege` VALUES (142, 'INVIGILATE', 139);
INSERT INTO `t_b_role_privilege` VALUES (143, 'INVIGILATE', 140);
INSERT INTO `t_b_role_privilege` VALUES (144, 'ADMIN', 141);
INSERT INTO `t_b_role_privilege` VALUES (145, 'INVIGILATE', 15);
INSERT INTO `t_b_role_privilege` VALUES (146, 'INVIGILATE', 16);
INSERT INTO `t_b_role_privilege` VALUES (147, 'INVIGILATE', 17);
INSERT INTO `t_b_role_privilege` VALUES (148, 'INVIGILATE', 18);
INSERT INTO `t_b_role_privilege` VALUES (149, 'INVIGILATE', 19);
INSERT INTO `t_b_role_privilege` VALUES (150, 'ADMIN', 16);
INSERT INTO `t_b_role_privilege` VALUES (151, 'ADMIN', 17);
INSERT INTO `t_b_role_privilege` VALUES (152, 'ADMIN', 18);
INSERT INTO `t_b_role_privilege` VALUES (153, 'ADMIN', 19);
INSERT INTO `t_b_role_privilege` VALUES (154, 'ADMIN', 21);
INSERT INTO `t_b_role_privilege` VALUES (155, 'ADMIN', 22);
INSERT INTO `t_b_role_privilege` VALUES (156, 'ADMIN', 24);
INSERT INTO `t_b_role_privilege` VALUES (157, 'ADMIN', 25);
INSERT INTO `t_b_role_privilege` VALUES (158, 'INVIGILATE', 142);
INSERT INTO `t_b_role_privilege` VALUES (159, 'INSPECTION', 11);
INSERT INTO `t_b_role_privilege` VALUES (160, 'INSPECTION', 13);
INSERT INTO `t_b_role_privilege` VALUES (161, 'INVIGILATE', 35);
INSERT INTO `t_b_role_privilege` VALUES (162, 'INSPECTION', 35);
INSERT INTO `t_b_role_privilege` VALUES (163, 'ADMIN', 143);
INSERT INTO `t_b_role_privilege` VALUES (164, 'INVIGILATE', 143);
INSERT INTO `t_b_role_privilege` VALUES (165, 'INSPECTION', 143);
INSERT INTO `t_b_role_privilege` VALUES (166, 'ADMIN', 144);
INSERT INTO `t_b_role_privilege` VALUES (167, 'INVIGILATE', 144);
INSERT INTO `t_b_role_privilege` VALUES (168, 'INSPECTION', 144);
INSERT INTO `t_b_role_privilege` VALUES (169, 'ADMIN', 145);
INSERT INTO `t_b_role_privilege` VALUES (170, 'INVIGILATE', 145);
INSERT INTO `t_b_role_privilege` VALUES (171, 'INSPECTION', 145);
INSERT INTO `t_b_role_privilege` VALUES (172, 'INVIGILATE', 107);
INSERT INTO `t_b_role_privilege` VALUES (173, 'ADMIN', 146);
INSERT INTO `t_b_role_privilege` VALUES (174, 'ADMIN', 135);
INSERT INTO `t_b_role_privilege` VALUES (175, 'ADMIN', 147);
INSERT INTO `t_b_role_privilege` VALUES (176, 'ADMIN', 148);
INSERT INTO `t_b_role_privilege` VALUES (177, 'INVIGILATE', 147);
INSERT INTO `t_b_role_privilege` VALUES (178, 'INVIGILATE', 148);
INSERT INTO `t_b_role_privilege` VALUES (179, 'INVIGILATE', 111);
INSERT INTO `t_b_role_privilege` VALUES (180, 'ADMIN', 149);
INSERT INTO `t_b_role_privilege` VALUES (181, 'ADMIN', 150);
INSERT INTO `t_b_role_privilege` VALUES (182, 'ADMIN', 151);
INSERT INTO `t_b_role_privilege` VALUES (183, 'ADMIN', 152);
INSERT INTO `t_b_role_privilege` VALUES (184, 'ADMIN', 153);
INSERT INTO `t_b_role_privilege` VALUES (185, 'INSPECTION', 150);
INSERT INTO `t_b_role_privilege` VALUES (186, 'INSPECTION', 151);
INSERT INTO `t_b_role_privilege` VALUES (187, 'INSPECTION', 152);
INSERT INTO `t_b_role_privilege` VALUES (188, 'INSPECTION', 153);
INSERT INTO `t_b_role_privilege` VALUES (189, 'INSPECTION', 154);
INSERT INTO `t_b_role_privilege` VALUES (190, 'ADMIN', 155);
INSERT INTO `t_b_role_privilege` VALUES (191, 'INVIGILATE', 155);
INSERT INTO `t_b_role_privilege` VALUES (192, 'ADMIN', 156);
INSERT INTO `t_b_role_privilege` VALUES (193, 'INSPECTION', 156);
INSERT INTO `t_b_role_privilege` VALUES (194, 'STUDENT', 157);
INSERT INTO `t_b_role_privilege` VALUES (195, 'ADMIN', 120);
COMMIT;

-- ----------------------------
-- Table structure for t_b_session
-- ----------------------------
DROP TABLE IF EXISTS `t_b_session`;
CREATE TABLE `t_b_session` (
  `id` varchar(100) NOT NULL COMMENT '主键',
  `identity` varchar(100) NOT NULL COMMENT '用户标识',
  `type` varchar(50) NOT NULL COMMENT '用户类型',
  `source` varchar(50) NOT NULL COMMENT '访问来源',
  `platform` varchar(50) NOT NULL COMMENT '设备分类',
  `device_id` varchar(100) NOT NULL COMMENT '设备标识',
  `address` varchar(100) NOT NULL COMMENT '登录IP地址',
  `access_token` varchar(50) NOT NULL COMMENT '访问令牌',
  `last_access_time` bigint DEFAULT NULL COMMENT '最近访问时间',
  `last_access_ip` varchar(100) DEFAULT NULL COMMENT '最近访问IP地址',
  `update_time` bigint DEFAULT NULL COMMENT '令牌更新时间',
  `expire_time` bigint DEFAULT NULL COMMENT '令牌强制失效时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) 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) NOT NULL COMMENT '任务状态，init：未开始，running：开始执行，finish：执行结束',
  `summary` mediumtext COMMENT '实时摘要信息',
  `progress` double DEFAULT NULL COMMENT '执行进度',
  `import_file_name` varchar(100) DEFAULT NULL COMMENT '导入文件名',
  `import_file_path` varchar(500) DEFAULT NULL COMMENT '导入文件路径',
  `result_file_path` varchar(500) DEFAULT NULL COMMENT '导出文件路径',
  `report_file_path` varchar(500) 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 '结束时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='异步任务';

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

-- ----------------------------
-- Records of t_b_user
-- ----------------------------
BEGIN;
INSERT INTO `t_b_user` VALUES (1, 'sysadmin', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, NULL, 1600932652000, 1600932652000, '系统管理员', 'sysadmin', NULL, 1);
INSERT INTO `t_b_user` VALUES (3, 'i1', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '监考老师1', 1, NULL);
INSERT INTO `t_b_user` VALUES (4, 'i2', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '监考老师2', 1, NULL);
INSERT INTO `t_b_user` VALUES (5, 'i3', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '监考老师3', 1, NULL);
INSERT INTO `t_b_user` VALUES (6, 'i4', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '监考老师4', 1, NULL);
INSERT INTO `t_b_user` VALUES (7, 'admin1', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '管理员1', 1, NULL);
INSERT INTO `t_b_user` VALUES (8, 'x1', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, NULL, NULL, '巡考员1', 1, NULL);
INSERT INTO `t_b_user` VALUES (9, 'admin_zj', '1jdzWuniG6UMtoa3T6uNLA==', '18566261111', 1, 1, 1600932652000, 1600932652000, NULL, '管理员-zj', 1, 1);
INSERT INTO `t_b_user` VALUES (1100023423, 'sysadmin_wzj', '1jdzWuniG6UMtoa3T6uNLA==', '12', 1, NULL, 1600932652000, 1600932652000, '系统管理员', 'sysadmin', NULL, 1);
INSERT INTO `t_b_user` VALUES (18765092862558208, 'i5', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, 1600932652000, NULL, '监考老师5', 1, 2);
INSERT INTO `t_b_user` VALUES (18765093122605056, 'i6', '1jdzWuniG6UMtoa3T6uNLA==', NULL, 1, 1, 1600932652000, 1600932652000, NULL, '监考老师6', 1, 18765093122605056);
INSERT INTO `t_b_user` VALUES (24851522286256128, 'admin_wzj', '1jdzWuniG6UMtoa3T6uNLA==', '1234', 1, 1, 1600932652000, 1600932652000, NULL, 'admin_wzj', 24851522286256128, 7);
INSERT INTO `t_b_user` VALUES (29623477421998080, 'i11', '1jdzWuniG6UMtoa3T6uNLA==', '1111112222', 1, 1, 1600932652000, 1600932652000, NULL, 'i123232', 29623477421998080, 24851522286256128);
INSERT INTO `t_b_user` VALUES (37176770633400320, '123', 'i9Pko7W0jiwpL+R5ph3Qmg==', '111', 1, 1, 1600932652000, 1600932652000, NULL, '111', 7, NULL);
COMMIT;

-- ----------------------------
-- 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 COMMENT '角色编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色';

-- ----------------------------
-- Records of t_b_user_role
-- ----------------------------
BEGIN;
INSERT INTO `t_b_user_role` VALUES (1, 1, 'SUPER_ADMIN');
INSERT INTO `t_b_user_role` VALUES (2, 3, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (3, 4, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (4, 5, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (5, 6, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (6, 7, 'ADMIN');
INSERT INTO `t_b_user_role` VALUES (7, 8, 'INSPECTION');
INSERT INTO `t_b_user_role` VALUES (8, 1100023423, 'SUPER_ADMIN');
INSERT INTO `t_b_user_role` VALUES (9, 9, 'ADMIN');
INSERT INTO `t_b_user_role` VALUES (18765092992581632, 18765092862558208, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (25966594811232256, 18765093122605056, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (36135582094589952, 29623477421998080, 'INVIGILATE');
INSERT INTO `t_b_user_role` VALUES (37176452969398272, 24851522286256128, 'ADMIN');
INSERT INTO `t_b_user_role` VALUES (37176770633400321, 37176770633400320, 'ADMIN');
COMMIT;

-- ----------------------------
-- 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 '一个考试场次内人脸抓拍检测（D12）失败累计次数超过6次',
  `in_process_face_verify_config` mediumtext COMMENT '过程人脸验证参数配置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='全局配置';

-- ----------------------------
-- Records of t_e_config
-- ----------------------------
BEGIN;
INSERT INTO `t_e_config` VALUES (1, 0.1, 3, 3, 30, 3, 3, 1, 3, 6, '{\"faceDetectIntervalSeconds\":1,\"faceDetectContinueSeconds\":30,\"faceDetectWarningThreshold\":3,\"faceCompareIntervalSeconds\":2,\"faceCompareContinueSeconds\":60,\"faceCompareFailurePercent\":80,\"faceCompareWarningThreshold\":3,\"eyeCloseDetectIntervalSeconds\":900,\"eyeCloseDetectContinueSeconds\":60,\"eyeCloseDetectWarningThreshold\":6,\"realnessDetectIntervalSeconds\":120,\"forceFinishThreshold\":3,\"forceFinishCondition\":[\"faceDetect\",\"faceCompare\"]}');
COMMIT;

-- ----------------------------
-- 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 DEFAULT NULL COMMENT '机构ID',
  `code` varchar(50) NOT NULL COMMENT '批次编码，机构唯一',
  `name` varchar(100) NOT NULL 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 NULL 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` tinyint DEFAULT NULL COMMENT '是否开始监控转录，0：开启，1：不开启',
  `progress` double DEFAULT NULL COMMENT '算分进度',
  `mobile_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用移动端拍照答题，0：不开启，1：开启',
  `invigilate_verify` varchar(30) DEFAULT NULL COMMENT '监考人工审核，now：实时审核，later：事后审核',
  `monitor_status` varchar(30) DEFAULT 'NOT_START' COMMENT '监考状态，NOT_START：未开始，START：监考中，FINISHED：已结束',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_e_exam_orgId_code_Idx` (`org_id`,`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) DEFAULT NULL COMMENT '类型',
  `description` mediumtext COMMENT '描述',
  `status` tinyint DEFAULT NULL COMMENT '状态，0：处理，1：撤销',
  `remark` mediumtext 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 COMMENT '科目编码',
  `course_name` varchar(50) NOT NULL 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 NULL COMMENT '音频播放次数',
  `has_audio` varchar(30) DEFAULT NULL 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 '主键',
  `name` varchar(100) NOT NULL 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 '更新时间',
  `exam_id` bigint DEFAULT NULL COMMENT '考试批次id',
  `code` varchar(50) 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 NULL 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 '解密向量',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_e_exam_paper_examId_code_Idx` (`exam_id`,`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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_record_id` bigint NOT NULL COMMENT '考试记录ID',
  `exam_student_id` bigint NOT NULL COMMENT '考生id',
  `model` tinyint DEFAULT NULL COMMENT '重考方式，0：批次内，1：换批次',
  `reason` varchar(30) 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) DEFAULT NULL COMMENT '审批意见',
  `remark` varchar(1000) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT NULL COMMENT '重考id',
  `auditing_id` bigint DEFAULT NULL COMMENT '待审核人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='重考审核人表';

-- ----------------------------
-- Records of t_e_exam_reexam_auditing
-- ----------------------------
BEGIN;
INSERT INTO `t_e_exam_reexam_auditing` VALUES (31699380612366336, 31699379974832128, 7);
INSERT INTO `t_e_exam_reexam_auditing` VALUES (31699380612366337, 31699379974832128, 24851522286256128);
INSERT INTO `t_e_exam_reexam_auditing` VALUES (31699381887434752, 31699381321203712, 7);
INSERT INTO `t_e_exam_reexam_auditing` VALUES (31699381887434753, 31699381321203712, 24851522286256128);
COMMIT;

-- ----------------------------
-- 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 DEFAULT NULL COMMENT '场次id',
  `student_id` bigint NOT NULL COMMENT '学生id',
  `course_code` varchar(50) NOT NULL COMMENT '科目代码',
  `room_code` varchar(50) NOT NULL COMMENT '虚拟考场代码，考试唯一',
  `identity` varchar(50) NOT NULL COMMENT '证件号，机构内唯一',
  `name` varchar(50) NOT NULL 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT 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 '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) NOT NULL COMMENT '试卷名称',
  `total_score` double NOT NULL COMMENT '总分',
  `paper_path` varchar(100) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 COMMENT '证件号',
  `password` varchar(30) NOT NULL COMMENT '登陆密码，密文保存',
  `idcard_number` varchar(30) DEFAULT NULL COMMENT '身份证号',
  `mobile_number` varchar(30) DEFAULT NULL COMMENT '手机号',
  `name` varchar(30) NOT NULL COMMENT '姓名',
  `gender` varchar(20) DEFAULT NULL COMMENT '性别，man：男，woman：女',
  `base_photo_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) NOT NULL COMMENT '类型',
  `info` varchar(1000) DEFAULT NULL COMMENT '描述',
  `remark` mediumtext COMMENT '备注',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT NULL COMMENT '考试id',
  `exam_activity_id` bigint DEFAULT NULL COMMENT '场次id',
  `exam_student_id` bigint DEFAULT NULL COMMENT '考生id',
  `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
  `source` varchar(30) DEFAULT NULL COMMENT '状态',
  `live_url` varchar(200) DEFAULT NULL COMMENT '观看地址',
  `status` varchar(30) 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) DEFAULT NULL COMMENT '异常类型',
  `call_status` varchar(30) DEFAULT NULL COMMENT '通话状态',
  `monitor_key` varchar(50) DEFAULT NULL COMMENT '房间号',
  PRIMARY KEY (`id`),
  UNIQUE KEY `t_ie_exam_invigilate_call_recordId_source_Idx` (`exam_record_id`,`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT NULL COMMENT '考试id',
  `exam_activity_id` bigint DEFAULT NULL COMMENT '场次id',
  `exam_student_id` bigint DEFAULT NULL COMMENT '考生id',
  `exam_record_id` bigint NOT NULL COMMENT '考试记录id',
  `source` varchar(30) DEFAULT NULL COMMENT '监考视频源',
  `live_url` varchar(200) DEFAULT NULL COMMENT '观看地址',
  `status` varchar(30) 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 COMMENT '备注',
  `type` varchar(100) DEFAULT NULL COMMENT '异常类型',
  `call_status` varchar(30) DEFAULT NULL COMMENT '通话状态',
  `monitor_key` varchar(50) DEFAULT NULL COMMENT '房间号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) NOT NULL COMMENT '消息类型',
  `content` varchar(1000) NOT NULL COMMENT '消息内容',
  `send_time` bigint DEFAULT NULL COMMENT '发送时间',
  `receive_time` bigint DEFAULT NULL COMMENT '接收时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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_record_id` bigint NOT NULL COMMENT '考试记录ID',
  `exam_student_id` bigint NOT NULL COMMENT '考生id',
  `info` varchar(200) DEFAULT NULL COMMENT '异常信息',
  `type` varchar(30) DEFAULT NULL COMMENT '类别',
  `remark` varchar(200) 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 utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片url',
  `video_url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '视频url',
  `obj_id` bigint DEFAULT NULL COMMENT '业务id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 COMMENT '预警信息',
  `level` varchar(30) DEFAULT NULL COMMENT '预警级别',
  `type` varchar(30) DEFAULT NULL COMMENT '类别',
  `remark` mediumtext 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 utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片url',
  `video_url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '视频url',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监考预警信息';

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

-- ----------------------------
-- 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 DEFAULT NULL COMMENT '大题号',
  `sub_number` int DEFAULT 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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 DEFAULT NULL COMMENT '断点发生时间',
  `break_reason` varchar(30) DEFAULT NULL COMMENT '断点判定原因',
  `resume_reason` varchar(300) DEFAULT NULL COMMENT '提交异常原因',
  `prepare_time` bigint DEFAULT NULL COMMENT '恢复候考时间',
  `start_time` bigint DEFAULT NULL COMMENT '恢复开考时间',
  `entry_authentication_result` varchar(30) DEFAULT NULL COMMENT '恢复开考身份验证结果',
  `entry_authentication_id` bigint DEFAULT NULL COMMENT '恢复开考身份验证记录ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试断点记录';

-- ----------------------------
-- Table structure for t_oe_exam_monitor_exception_history
-- ----------------------------
DROP TABLE IF EXISTS `t_oe_exam_monitor_exception_history`;
CREATE TABLE `t_oe_exam_monitor_exception_history` (
  `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(300) NOT NULL COMMENT '开启监控的视频源',
  `type` varchar(30) DEFAULT NULL COMMENT '异常类型',
  `time` bigint DEFAULT NULL COMMENT '异常时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) DEFAULT NULL COMMENT '考试状态，first_prepare：首次候考，answering：正在答题，break_off：已中断，resume_prepare：断点恢复候考，finished：已结束考试，persisted：数据已保存',
  `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：正常',
  `monitor_live_url` varchar(100) DEFAULT NULL COMMENT '监控观看地址',
  `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：强制',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) DEFAULT NULL COMMENT 'first：初次开考，recover：恢复开考，process：过程中',
  `exception` varchar(30) DEFAULT NULL COMMENT '异常类型',
  `photo_url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片保存路径',
  `time` bigint DEFAULT NULL COMMENT '时间戳',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) NOT NULL COMMENT 'first：初次开考，recover：恢复开考，process：过程中',
  `actions` varchar(2000) 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) DEFAULT NULL COMMENT '异常类型',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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) NOT NULL COMMENT '试卷名称',
  `total_score` double DEFAULT NULL COMMENT '总分',
  `paper_path` varchar(100) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='模拟试卷';

SET FOREIGN_KEY_CHECKS = 1;
