-- MySQL dump 10.13  Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost    Database: stmms-ms-zj-1
-- ------------------------------------------------------
-- Server version	5.7.17-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `attachment`
--

DROP TABLE IF EXISTS `attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `attachment` (
  `id` bigint(64) NOT NULL AUTO_INCREMENT,
  `work_id` bigint(20) DEFAULT NULL,
  `subject` varchar(10) DEFAULT NULL,
  `exam_number` varchar(20) DEFAULT NULL,
  `file_path_local` varchar(512) NOT NULL,
  `file_name` varchar(128) NOT NULL,
  `file_type` varchar(8) DEFAULT NULL,
  `file_ext` varchar(16) DEFAULT NULL,
  `bucket` varchar(64) NOT NULL,
  `object_key` varchar(128) NOT NULL,
  `oss_name` varchar(500) NOT NULL,
  `oss_status` varchar(20) NOT NULL,
  `oss_fail_msg` varchar(500) DEFAULT NULL COMMENT '上传oss失败原因',
  `delete_status` varchar(20) DEFAULT NULL,
  `time` datetime NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `change_level`
--

DROP TABLE IF EXISTS `change_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `change_level` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `work_id` bigint(20) DEFAULT NULL,
  `subject` varchar(50) DEFAULT NULL,
  `paper_id` bigint(20) DEFAULT NULL,
  `original_level` varchar(45) DEFAULT NULL COMMENT '原档位',
  `audit_status` tinyint(1) DEFAULT NULL COMMENT '改档审核：0-申请，1-同意，2-不同意',
  `create_id` bigint(20) DEFAULT NULL COMMENT '申请改档用户id',
  `create_date` datetime DEFAULT NULL COMMENT '申请改档时间',
  `audit_id` bigint(20) DEFAULT NULL COMMENT '审核用户id',
  `audit_date` datetime DEFAULT NULL COMMENT '审核时间',
  `suggest_level` varchar(255) DEFAULT NULL COMMENT '建议档位',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='改档记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `exam_question`
--

DROP TABLE IF EXISTS `exam_question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exam_question` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `area_code` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `area_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `subject` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `work_id` bigint(20) NOT NULL,
  `is_test` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否试评,0:不是，1:数据已导入，2:试评中',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `exam_score_prop`
--

DROP TABLE IF EXISTS `exam_score_prop`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exam_score_prop` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `subject` varchar(50) DEFAULT NULL COMMENT '科目',
  `exclude` varchar(100) DEFAULT NULL COMMENT '打分阶段配置过滤档位(可选一个或多个档位，多个档位用","号隔开)',
  `task_sort` varchar(50) DEFAULT NULL COMMENT '打分阶段配置档位排序规则(可选random/paper，为paper时，score.level.exclude置为空)',
  `enable` bit(1) DEFAULT b'0' COMMENT '打分阶段配置是否启用(为false则不启用打分阶段分档)，0：不启用，1：启用',
  `work_id` bigint(20) DEFAULT NULL COMMENT '工作区id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='考试打分配置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `inspect_range`
--

DROP TABLE IF EXISTS `inspect_range`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inspect_range` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `condition` int(11) DEFAULT NULL,
  `enabled` bit(1) DEFAULT NULL,
  `student_count` int(11) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `work_id` bigint(20) DEFAULT NULL,
  `active` bit(1) NOT NULL,
  `editable` bit(1) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `inspect_student`
--

DROP TABLE IF EXISTS `inspect_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inspect_student` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `exam_number` varchar(255) NOT NULL,
  `inspect_range_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `inspect_task`
--

DROP TABLE IF EXISTS `inspect_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inspect_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `created_on` datetime DEFAULT NULL,
  `inspect_range_id` bigint(20) NOT NULL,
  `marker_id` bigint(20) NOT NULL,
  `marker_name` varchar(50) NOT NULL,
  `question_id` bigint(20) DEFAULT NULL,
  `subject` varchar(50) DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  `work_id` bigint(20) NOT NULL,
  `paper_id` bigint(20) NOT NULL,
  `level` varchar(255) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `FK4e9mfahf522t4ej4y4yd065dh` (`paper_id`) USING BTREE,
  CONSTRAINT `FK4e9mfahf522t4ej4y4yd065dh` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_1` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_2` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_3` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_4` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_5` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_6` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `inspect_task_ibfk_7` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `level`
--

DROP TABLE IF EXISTS `level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `interval_score` int(11) NOT NULL,
  `level_type` int(11) DEFAULT NULL,
  `level_value` int(11) NOT NULL,
  `max_score` int(11) NOT NULL,
  `min_score` int(11) NOT NULL,
  `pt` int(11) NOT NULL,
  `score_list` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `weight` int(11) NOT NULL,
  `work_id` bigint(20) DEFAULT NULL,
  `kdpt` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_level_workId_code` (`work_id`,`code`) USING BTREE,
  CONSTRAINT `FK3km0g7jbkt78oj20csqeh26f2` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_2` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_3` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_4` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_5` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_6` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `level_ibfk_7` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mark_log`
--

DROP TABLE IF EXISTS `mark_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mark_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_user_id` bigint(20) DEFAULT NULL COMMENT '操作人id',
  `create_user_name` varchar(100) DEFAULT NULL COMMENT '操作人名字',
  `create_role` varchar(50) DEFAULT NULL COMMENT '操作人角色',
  `subject` varchar(50) DEFAULT NULL COMMENT '科目',
  `exam_number` varchar(50) DEFAULT NULL COMMENT '准考证号',
  `student_name` varchar(100) DEFAULT NULL COMMENT '学生姓名',
  `login_time` datetime DEFAULT NULL COMMENT '登录时间（采集专用）',
  `logout_time` datetime DEFAULT NULL COMMENT '登出时间（采集专用）',
  `oper_type` int(11) DEFAULT NULL COMMENT '操作类型，1：分档，2：打分，3：回评档位，4：回评分数，5：档位打回，6：档位打回回评，7：一键定档，8：标准卷设置',
  `oper_data_before` varchar(255) DEFAULT NULL COMMENT '操作前数据',
  `oper_data_after` varchar(255) DEFAULT NULL COMMENT '操作后数据',
  `create_time` datetime DEFAULT NULL COMMENT '操作时间',
  `work_id` bigint(20) DEFAULT NULL COMMENT '考区id',
  `paper_id` bigint(20) DEFAULT NULL COMMENT '试卷id',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `stage` bigint(20) DEFAULT NULL COMMENT '试卷阶段，0：初始，1：分档，2：打分',
  `work_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `union_001_index` (`create_user_id`,`oper_type`,`subject`,`exam_number`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=243 DEFAULT CHARSET=utf8 COMMENT='操作日志';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mark_subject`
--

DROP TABLE IF EXISTS `mark_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mark_subject` (
  `id` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `collect_config` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `stage` int(11) DEFAULT NULL,
  `total_score` int(11) NOT NULL,
  `work_id` bigint(20) DEFAULT NULL,
  `sample_count` int(11) NOT NULL DEFAULT '100',
  `is_test` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否试评,0:不是，1:数据已导入，2:试评中',
  `is_formal` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否正评，0:不是，1:是',
  `all_level` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否全部根据档位分配完，0:不是，1:是',
  `enable` tinyint(1) DEFAULT '1' COMMENT '是否启用 0：禁用 1：启用',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `FK1tvc2mil1ebqgt08912t4hxqw` (`work_id`) USING BTREE,
  CONSTRAINT `FK1tvc2mil1ebqgt08912t4hxqw` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_2` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_3` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_4` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_5` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_6` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`),
  CONSTRAINT `mark_subject_ibfk_7` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mark_task`
--

DROP TABLE IF EXISTS `mark_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mark_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `created_on` datetime DEFAULT NULL,
  `is_rejected` bit(1) NOT NULL,
  `level_value` int(11) DEFAULT NULL,
  `marker_id` bigint(20) NOT NULL,
  `marker_name` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `origin_level` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `question_id` bigint(20) DEFAULT NULL,
  `result` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `stage` int(11) NOT NULL,
  `subject` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  `work_id` bigint(20) NOT NULL,
  `paper_id` bigint(20) NOT NULL,
  `random_seq` int(11) DEFAULT NULL,
  `secret_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `random_seq_new` bigint(20) DEFAULT NULL COMMENT '随机号',
  `is_active` bit(1) DEFAULT b'0' COMMENT '是否激活',
  `is_test` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否试评,0:不是，1:数据已导入，2:试评中',
  `batch_no` bigint(45) DEFAULT NULL COMMENT '批次号',
  `is_change_stage` tinyint(1) DEFAULT NULL COMMENT '是否改档',
  `serial_number` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '叫号序号',
  `display_number` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_mark_task_paper_id` (`paper_id`) USING BTREE,
  KEY `question_id` (`question_id`,`marker_id`,`stage`,`result`) USING BTREE,
  CONSTRAINT `FKa6xqlu9ml2e47x1o2u2yec7vm` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_1` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_2` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_3` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_4` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_5` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_6` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`),
  CONSTRAINT `mark_task_ibfk_7` FOREIGN KEY (`paper_id`) REFERENCES `paper` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mark_task_job`
--

DROP TABLE IF EXISTS `mark_task_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mark_task_job` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `data_object` varchar(4000) DEFAULT NULL COMMENT 'object',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `status` bit(1) DEFAULT b'0' COMMENT '状态，0：未记录，1：已记录',
  `work_id` bigint(20) DEFAULT NULL COMMENT '工作区id',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1 COMMENT='定时任务调度表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mark_user`
--

DROP TABLE IF EXISTS `mark_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mark_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `enabled` bit(1) NOT NULL,
  `last_login_time` datetime DEFAULT NULL,
  `login_name` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `pw_changed_count` int(11) NOT NULL,
  `session_id` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `group_id` bigint(20) DEFAULT NULL,
  `mark_right` int(11) DEFAULT NULL,
  `role` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `subject` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `work_id` bigint(20) NOT NULL,
  `inspect_sc` bit(1) DEFAULT NULL,
  `inspect_sm` bit(1) DEFAULT NULL,
  `inspect_sx` bit(1) DEFAULT NULL,
  `weight` double DEFAULT NULL,
  `one_click_level` bit(1) DEFAULT b'0' COMMENT '科组长是否开启一键定档',
  `standard_volume` bit(1) NOT NULL,
  `level_callback` bit(1) NOT NULL,
  `display_count` int(1) DEFAULT NULL COMMENT '显示数量：4-4张显示，6-6张显示，8-8张显示',
  `default_account` tinyint(1) DEFAULT NULL COMMENT '是否默认账号（采集账号）',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `UK_cyf7k1neuij8lma85x19omo07` (`login_name`) USING BTREE,
  KEY `FKinr4i9gbxj9njwo82s7cc89q5` (`group_id`) USING BTREE,
  CONSTRAINT `FKinr4i9gbxj9njwo82s7cc89q5` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_3` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_4` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_5` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_6` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`),
  CONSTRAINT `mark_user_ibfk_7` FOREIGN KEY (`group_id`) REFERENCES `marker_group` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `marker_group`
--

DROP TABLE IF EXISTS `marker_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `marker_group` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `subject` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `work_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `paper`
--

DROP TABLE IF EXISTS `paper`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `paper` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `area_code` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `exam_number` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `idx` bigint(20) DEFAULT NULL,
  `is_arbitrated` bit(1) NOT NULL,
  `is_manual` bit(1) NOT NULL,
  `is_rejected` bit(1) NOT NULL,
  `is_tagged` bit(1) NOT NULL,
  `level` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `mark_by_leader` bit(1) NOT NULL,
  `marked_logic` bit(1) NOT NULL,
  `question_id` bigint(20) NOT NULL,
  `question_name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `redo_level` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `score` double DEFAULT NULL,
  `secret_number` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `student_name` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `subject` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `updated_on` datetime DEFAULT NULL,
  `uploaded_count` int(11) NOT NULL,
  `uploaded_on` datetime DEFAULT NULL,
  `work_id` bigint(20) NOT NULL,
  `inspect_range` bigint(20) DEFAULT NULL,
  `inspect_score` double DEFAULT NULL,
  `source_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `inspect_level` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `inspector` bigint(20) DEFAULT NULL,
  `is_sample` bit(1) NOT NULL,
  `sheet_md5` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `slice_md5` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `random_seq` bigint(20) DEFAULT NULL COMMENT '随机号',
  `is_missing` bit(1) NOT NULL,
  `exam_room` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_test` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否试评,0:不是，1:数据已导入，2:试评中',
  `is_active` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否激活',
  `batch_no` bigint(45) DEFAULT NULL COMMENT '批次号',
  `score_batch_no` bigint(45) DEFAULT NULL COMMENT '打分任务发布批次号',
  `is_shift` bit(1) DEFAULT b'0' COMMENT '是否改档',
  `is_shift_score` bit(1) DEFAULT b'0' COMMENT '是否改档打分',
  `is_one_click` bit(1) DEFAULT b'0' COMMENT '是否一键定档',
  `is_rejected_by_leader` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_paper_index` (`idx`) USING BTREE,
  KEY `idx_paper_exam_number` (`exam_number`) USING BTREE,
  KEY `idx_paper_area_code` (`area_code`) USING BTREE,
  KEY `idx_paper_student_name` (`student_name`) USING BTREE,
  KEY `is_missing` (`is_missing`,`is_test`,`batch_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `param_setting`
--

DROP TABLE IF EXISTS `param_setting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `param_setting` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `work_id` bigint(10) DEFAULT NULL COMMENT '工作id',
  `package_scan` tinyint(1) DEFAULT NULL COMMENT '是否整包扫描1：是 0：否',
  `image_encrypt` tinyint(1) DEFAULT NULL COMMENT '是否加密1：是 0：否',
  `name_rule` tinyint(1) DEFAULT NULL COMMENT '图片命名规则（1：考号命名、0：随机码命名）',
  `paper_stage` tinyint(1) DEFAULT NULL COMMENT '试卷档位状态（1：已知、0：未知）',
  `deviation` int(2) DEFAULT NULL COMMENT '仲裁档位差',
  `auto_callback` tinyint(1) DEFAULT NULL COMMENT '是否自动打回（1：是、0：否）',
  `majority` tinyint(1) DEFAULT NULL COMMENT '是否过半定档（1：是、0：否）',
  `cumulative_error` int(3) DEFAULT NULL COMMENT '打回累计误差',
  `level_show_all_paper` tinyint(1) DEFAULT NULL COMMENT '分档阶段阅卷员是否显示所有试卷（1：是、0：否）',
  `round_up` tinyint(1) DEFAULT NULL COMMENT '分数处理方式（1：四舍五入、0：非零进一）',
  `change_stage` tinyint(1) DEFAULT NULL COMMENT '改档及改档打分（1：显示、0：不显示）',
  `score_show_all_paper` tinyint(1) DEFAULT NULL COMMENT '打分阶段阅卷员是否显示所有试卷（1：是、0：否）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='参数设置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shiwai`
--

DROP TABLE IF EXISTS `shiwai`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shiwai` (
  `姓名` varchar(255) DEFAULT NULL,
  `性别` varchar(255) DEFAULT NULL,
  `地区` varchar(255) DEFAULT NULL,
  `报名号(按顺序编号)` varchar(255) DEFAULT NULL,
  `准考证号` varchar(255) DEFAULT NULL,
  `考场号` varchar(255) DEFAULT NULL,
  `座位号` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `student`
--

DROP TABLE IF EXISTS `student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `area_code` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `area_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `exam_number` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `exam_room` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `school` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '学校',
  `is_absent` bit(1) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `upload_status` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `work_id` bigint(20) DEFAULT NULL,
  `source_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_test` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '是否试评,0:不是，1:数据已导入，2:试评中',
  `relate_exam_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '关联考号',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `exam_number` (`exam_number`,`work_id`,`is_test`) USING BTREE,
  KEY `idx_student_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_publish_setting`
--

DROP TABLE IF EXISTS `task_publish_setting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task_publish_setting` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `work_id` bigint(20) DEFAULT NULL,
  `question_id` bigint(45) DEFAULT NULL COMMENT '考区',
  `subject` varchar(50) DEFAULT NULL,
  `code` varchar(45) DEFAULT NULL COMMENT '档位',
  `total_count` int(11) DEFAULT NULL COMMENT '总数量',
  `success_count` int(11) DEFAULT NULL COMMENT '已评数量',
  `wait_count` varchar(45) DEFAULT NULL COMMENT '待评数量',
  `sort_rule` tinyint(1) DEFAULT NULL COMMENT '排序规则：0-乱序，1-定序',
  `display_number` tinyint(1) DEFAULT NULL COMMENT '是否显示序号：0-否，1-是',
  `task_count` int(11) DEFAULT NULL COMMENT '本次任务数',
  `batch_no` bigint(45) DEFAULT NULL,
  `publish_count` int(3) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='发布打分任务';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `work`
--

DROP TABLE IF EXISTS `work`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `work` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `active` bit(1) NOT NULL,
  `created_on` date DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-09-05 17:10:01
