/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : localhost:3306
 Source Schema         : 2

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

 Date: 12/10/2022 16:08:40
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for basic_attachment
-- ----------------------------
DROP TABLE IF EXISTS `basic_attachment`;
CREATE TABLE `basic_attachment`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名',
  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件类型',
  `size` int(11) NOT NULL COMMENT '单位（KB）',
  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件md5值',
  `path` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '存储路径',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  `obj_id` bigint(20) NULL DEFAULT NULL COMMENT '关联业务id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '所有附件记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for basic_message
-- ----------------------------
DROP TABLE IF EXISTS `basic_message`;
CREATE TABLE `basic_message`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `user_id` bigint(20) NOT NULL COMMENT '消息接收人用户',
  `user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
  `mobile_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话号码',
  `paper_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '试卷编号',
  `course_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程代码',
  `message_type` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息类型',
  `business_operate` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '业务操作',
  `business_id` bigint(20) NULL DEFAULT NULL COMMENT '业务id',
  `template_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息模板代码',
  `variable_params` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '变量参数内容',
  `template_content` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '模板内容',
  `send_status` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息发送状态',
  `send_result` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息发送结果',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  `resend_count` int(11) NULL DEFAULT NULL COMMENT '重试次数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for basic_operation_log
-- ----------------------------
DROP TABLE IF EXISTS `basic_operation_log`;
CREATE TABLE `basic_operation_log`  (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `detail` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '日志详情',
  `level` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志等级（PRIMARY(\"一级日志：敏感信息\"),SECONDARY(\"二级日志：重要信息\"),TERTIARY(\"三级日志：次要信息\"),QUATERNARY(\"四级日志：普通信息\")）',
  `operation_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作类型（UN_KNOW(\"未知\"),SELECT(\"查询\"),EDIT(\"新增或更新\"),DELETE(\"删除\")）',
  `operation_unit` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作对象（略）',
  `system_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志系统类型',
  `url` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求地址url',
  `clazz_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类名称',
  `method` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方法名称',
  `args` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '参数',
  `run_time` bigint(20) NULL DEFAULT NULL COMMENT '方法运行时间',
  `run_status` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方法运行状态',
  `return_value` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法返回值',
  `user_id` bigint(20) NOT NULL COMMENT '用户对象id',
  `user_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '日志记录时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '基础日志记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for basic_school
-- ----------------------------
DROP TABLE IF EXISTS `basic_school`;
CREATE TABLE `basic_school`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学校编码',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学校名称',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，false：停用，true：启用',
  `access_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '访问key',
  `access_secret` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '访问秘钥',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  `logo` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学校logo',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学校表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of basic_school
-- ----------------------------
INSERT INTO `basic_school` VALUES (137, 'test-school-3', '测试学校3', 1, '0315b78010974ce4baedd8005dc2b834', 'XwaMV27j1c39rHBBucSSJYvUmf7SGdNi', NULL, NULL, 1663730130108, NULL, 1663730130108, 'https://solar-file.qmth.com.cn/org/logo/137.png');
INSERT INTO `basic_school` VALUES (140, 'test-school-4', '测试学校4', 1, '55f9c0f7766b43179c9ae72bd7f63e51', 'Xl9hpKayJdCFstcsvb1mQGE9itpfT4XC', NULL, NULL, 1663730130108, NULL, 1663730130108, 'https://solar-file.qmth.com.cn/org/logo/140.png');
INSERT INTO `basic_school` VALUES (141, 'test-school-5', '测试学校5', 1, '1931ccc07f694c389d0ac75d39d65b75', '71h98GLJMm7BA6Q3aq13ubTFfNjdoymu', NULL, NULL, 1663730130108, NULL, 1663730130108, NULL);
INSERT INTO `basic_school` VALUES (295137669741019136, 'test-school-1', '测试学校_1', 1, '41a9c68b71c9486db62de90980bd7e9a', 'yhe22bNXMRljatkvJA4f56by9dIAJBjv', NULL, NULL, 1661307104104, NULL, 1661307104104, 'https://solar-file.qmth.com.cn/org/logo/1.png');
INSERT INTO `basic_school` VALUES (295137670185615360, 'test-school-2', '测试学校_2', 1, 'd81badf113d1450c9f554809e1282ae1', 'dmILQXiRESNasxUylMNGl05R0JsaVb9t', NULL, NULL, 1661307104104, NULL, 1661307104104, 'https://solar-file.qmth.com.cn/org/logo/2.png');

-- ----------------------------
-- Table structure for basic_semester
-- ----------------------------
DROP TABLE IF EXISTS `basic_semester`;
CREATE TABLE `basic_semester`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学期名称',
  `code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学期编码',
  `enable` tinyint(4) NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `semester_schoolId_name_idx`(`school_id`, `name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学期字典表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for basic_student
-- ----------------------------
DROP TABLE IF EXISTS `basic_student`;
CREATE TABLE `basic_student`  (
  `id` bigint(20) NOT NULL COMMENT '学生id',
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `student_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学生姓名',
  `student_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学生编号',
  `phone_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话号码',
  `belong_org_id` bigint(20) NULL DEFAULT NULL COMMENT '所属院系',
  `major_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '专业',
  `clazz_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '行政班',
  `enable` tinyint(4) NULL DEFAULT 1 COMMENT '可用状态（1：可用，0：不可用）',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '可操作人机构id',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `student_schoolId_code_orgId_idx`(`school_id`, `student_code`, `belong_org_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学校id' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for basic_verify_code
-- ----------------------------
DROP TABLE IF EXISTS `basic_verify_code`;
CREATE TABLE `basic_verify_code`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `mobile_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号',
  `expire_time` bigint(20) NOT NULL COMMENT '到期时间',
  `valid_period` int(11) NOT NULL COMMENT '单位（分）',
  `verify_code` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '4位数字',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '短信验证码记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for paper_archives
-- ----------------------------
DROP TABLE IF EXISTS `paper_archives`;
CREATE TABLE `paper_archives`  (
  `id` bigint(20) NOT NULL,
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `semester_id` bigint(20) NOT NULL COMMENT '学期id',
  `manager_org_id` bigint(20) NOT NULL COMMENT '档案管理部门Id',
  `archives_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '档案名称',
  `archives_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '档案编号',
  `archives_type_id` bigint(20) NOT NULL COMMENT '档案类型id',
  `manager_id` bigint(20) NOT NULL COMMENT '档案管理员',
  `warning_time` bigint(20) NULL DEFAULT NULL COMMENT '档案到期预警时间',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '档案管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for paper_archives_type
-- ----------------------------
DROP TABLE IF EXISTS `paper_archives_type`;
CREATE TABLE `paper_archives_type`  (
  `id` bigint(20) NOT NULL,
  `school_id` bigint(20) NOT NULL,
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型名称',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '档案类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for paper_library
-- ----------------------------
DROP TABLE IF EXISTS `paper_library`;
CREATE TABLE `paper_library`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `paper_scan_task_id` bigint(20) NULL DEFAULT NULL COMMENT '扫描任务Id',
  `path` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '存储路径',
  `paper_scan_task_detail_id` bigint(20) NULL DEFAULT NULL COMMENT '扫描任务详情表id',
  `user_id` bigint(20) NULL DEFAULT NULL COMMENT '数据检验员id',
  `sequence` int(11) NULL DEFAULT NULL COMMENT '图片序号',
  `words_result` MEDIUMTEXT NULL DEFAULT NULL COMMENT 'OCR识别结果',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_paper_scan_detail_id`(`paper_scan_task_detail_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图片库' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for paper_scan_task
-- ----------------------------
DROP TABLE IF EXISTS `paper_scan_task`;
CREATE TABLE `paper_scan_task`  (
  `id` bigint(20) NOT NULL,
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `paper_archives_id` bigint(20) NOT NULL COMMENT '档案表iid',
  `scan_task_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '扫描任务名称',
  `course_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程名称',
  `teacher_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任课教师',
  `teach_clazz_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '教学班名称',
  `scan_user_id` bigint(20) NULL DEFAULT NULL COMMENT '扫描员id',
  `student_count` int(11) NULL DEFAULT 0 COMMENT '扫描量（份）',
  `scan_count` int(11) NULL DEFAULT 0 COMMENT '扫描数量',
  `enable` TINYINT(1) NULL DEFAULT 0 COMMENT '任务是否已关闭（1-是，0-否）',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '扫描任务表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for paper_scan_task_detail
-- ----------------------------
DROP TABLE IF EXISTS `paper_scan_task_detail`;
CREATE TABLE `paper_scan_task_detail`  (
  `id` bigint(20) NOT NULL,
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `paper_scan_task_id` bigint(20) NOT NULL COMMENT '扫描任务id',
  `student_id` bigint(20) NOT NULL COMMENT '学生id',
  `is_bind` tinyint(1) NULL DEFAULT 0 COMMENT '是否绑定图片（大于1张）',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '扫描任务详情表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `config_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '参数键名',
  `config_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '参数名称',
  `config_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数键值',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '参数表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO `sys_config` VALUES (1, NULL, NULL, 'sys.user.initPassword', '初始密码', '123456', NULL, 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (3, NULL, NULL, 'sys.code.enable', '是否启用短信验证码', 'true', 'true-启用，false-禁用', 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (4, NULL, NULL, 'sys.message.enable', '是否启用短信消息提示', 'true', 'true-启用，false-禁用', 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (5, NULL, NULL, 'sys.message.resendCount', '失败短信重试次数', '3', NULL, 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (7, NULL, NULL, 'sys.txt.charset', 'txt文件编码', 'gbk', NULL, 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (8, NULL, NULL, 'sys.pdf.size.list', '全局pdf格式清单', '[A3, A4, A5, B3, B4, B5, 8K]', NULL, 1, NULL, NULL, NULL);
INSERT INTO `sys_config` VALUES (299491705395085312, 295137670185615360, NULL, 'pdf.size.list', 'pdf格式清单', '[A3, A4, A5, B3, B4, B5, 8K]', NULL, 1, 1662345186862, NULL, 1665559958113);

-- ----------------------------
-- Table structure for sys_org
-- ----------------------------
DROP TABLE IF EXISTS `sys_org`;
CREATE TABLE `sys_org`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型，SCHOOL：学校，COLLEGE：学院，FACULTY：院系，TEACHING_ROOM：教研室，PRINTING_HOUSE：印刷厂',
  `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构代码',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '机构名称',
  `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '上级机构id',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '修改时间',
  `historic_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史机构名称',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `org_schoolId_name_idx`(`school_id`, `name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学校组织架构' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_org
-- ----------------------------
INSERT INTO `sys_org` VALUES (295137669791350784, 295137669741019136, 'SCHOOL', NULL, '测试学校_1', NULL, 1, NULL, 1661307104111, NULL, 1661307104111, NULL);
INSERT INTO `sys_org` VALUES (295137670219169792, 295137670185615360, 'SCHOOL', NULL, '测试学校_2', NULL, 1, NULL, 1661307104111, NULL, 1661307104111, NULL);
INSERT INTO `sys_org` VALUES (305300575916916736, 137, 'SCHOOL', NULL, '测试学校3', NULL, 1, NULL, 1663730130114, NULL, 1663730130114, NULL);
INSERT INTO `sys_org` VALUES (305300576797720576, 140, 'SCHOOL', NULL, '测试学校4', NULL, 1, NULL, 1663730130114, NULL, 1663730130114, NULL);
INSERT INTO `sys_org` VALUES (305300577615609856, 141, 'SCHOOL', NULL, '测试学校5', NULL, 1, NULL, 1663730130114, NULL, 1663730130114, NULL);

-- ----------------------------
-- Table structure for sys_privilege
-- ----------------------------
DROP TABLE IF EXISTS `sys_privilege`;
CREATE TABLE `sys_privilege`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
  `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'URL地址',
  `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型，MENU：菜单，BUTTON：按钮，LINK：链接，URL：接口地址，LIST：列表，CONDITION：查询条件，TAB：选项卡',
  `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '上级菜单',
  `sequence` int(11) NOT NULL COMMENT '序号',
  `property` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性，NO_AUTH：无需鉴权，AUTH：鉴权，SYS：系统公用',
  `related` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '关联属性，type为URL且property为AUTH才有',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  `default_auth` tinyint(4) NULL DEFAULT 1 COMMENT '默认权限，0：否，1：是',
  `front_display` tinyint(1) NULL DEFAULT 1 COMMENT '是否前端展示',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_privilege
-- ----------------------------
INSERT INTO `sys_privilege` VALUES (1, '基础配置', 'base', 'MENU', NULL, 2, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (2, '用户管理', 'user', 'MENU', 1, 1, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (4, '组织架构', 'OrganizationManage', 'MENU', 2, 1, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (5, '用户管理', 'UserManage', 'MENU', 2, 2, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (6, '角色管理', 'RoleManage', 'MENU', 2, 3, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (7, '权限管理', 'MenuManage', 'MENU', 129, 6, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (8, '档案管理', 'archives', 'MENU', 1, 2, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (9, '档案管理', 'ArchivesManage', 'MENU', 8, 1, NULL, '27,34,35,37,410', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (10, '列表', 'List', 'LIST', 9, 1, 'AUTH', '15', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (11, '新增', 'Add', 'BUTTON', 9, 2, 'AUTH', '16', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (12, '编辑', 'Edit', 'LINK', 9, 3, 'AUTH', '16', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (13, '查看', 'Detail', 'LINK', 9, 4, 'AUTH', '17,29', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (14, '删除', 'Delete', 'LINK', 9, 5, 'AUTH', '18', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (15, '查询接口', '/api/admin/paper/archives/page', 'URL', 9, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (16, '新增/编辑接口', '/api/admin/paper/archives/save', 'URL', 9, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (17, '查看详情接口', '/api/admin/paper/archives/page_detail', 'URL', 9, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (18, '删除接口', '/api/admin/paper/archives/delete', 'URL', 9, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (19, '数据检查', 'library', 'MENU', 1, 4, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (20, '数据检查', 'LibraryManage', 'MENU', 19, 1, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (21, '列表', 'List', 'LIST', 20, 1, 'AUTH', '23,24,25,26,29,410', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (22, '开始处理', 'Deal', 'BUTTON', 20, 2, 'AUTH', '27,28,34,35', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (23, '未处理接口', '/api/admin/paper/library/page_unbind', 'URL', 20, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (24, '未处理数量接口', '/api/admin/paper/library/count_unbind', 'URL', 20, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (25, '已处理接口', '/api/admin/paper/library/page_bind', 'URL', 20, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (26, '已处理数量接口', '/api/admin/paper/library/count_bind', 'URL', 20, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (27, '绑定接口', '/api/admin/paper/library/bind', 'URL', 20, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (28, '开始处理接口', '/api/admin/paper/library/get_bind_data', 'URL', 20, 6, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (29, '查询考生图片集合接口', '/api/admin/paper/library/list_student_picture', 'URL', 20, 7, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (30, '查询条件', 'Condition', 'CONDITION', 9, 3, 'AUTH', '15', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (31, '查询条件', 'Condition', 'CONDITION', 20, 3, 'AUTH', '23,24,25,26', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (32, '查询', 'Select', 'BUTTON', 9, 1, 'AUTH', '15', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (33, '查询', 'Select', 'BUTTON', 20, 1, 'AUTH', '23,24,25,26', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (34, '根据扫描任务ID查询学生', '/api/admin/paper/library/page_student', 'URL', 20, 7, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (35, 'ocr识别', '/api/admin/paper/library/ocr', 'URL', 20, 8, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (36, '所有任务考生信息', 'Select', 'BUTTON', 20, 3, 'AUTH', '37', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (37, '所有任务考生信息', '/api/admin/paper/library/list_by_student_code', 'URL', 20, 9, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (38, '批量下载', 'Download', 'BUTTON', 9, 6, 'AUTH', '39', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (39, '批量下载', '/api/admin/paper/archives/paper_download', 'URL', 9, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (49, '查询条件-档案管理员', '/api/admin/common/manager_user/query', 'URL', 149, 10, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (50, '查询条件-学期', '/api/admin/common/semester/query', 'URL', 149, 8, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (51, '查询条件-档案', '/api/admin/common/archives/query', 'URL', 149, 8, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (52, '查询条件-档案管理部门', '/api/admin/common/manager_org/query', 'URL', 149, 10, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (53, '查询条件-档案类型', '/api/admin/common/archives_type/query', 'URL', 149, 11, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (54, '查询条件-课程', '/api/admin/common/course/query', 'URL', 149, 12, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (55, '查询条件-教学班', '/api/admin/common/teach_clazz/query', 'URL', 149, 13, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (56, '查询条件-扫描任务', '/api/admin/common/scan_task/query', 'URL', 149, 14, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (57, '查询条件-学生查询条件级联查询（学生学院-专业-班级）', '/api/admin/common/basic_student/condition', 'URL', 149, 15, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (70, '异步任务查询', '/api/admin/data/t_b_task/query', 'URL', 149, 9, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (77, '查询', '/api/admin/sys/user/list', 'URL', 5, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (78, '新增/修改', '/api/admin/sys/user/save', 'URL', 5, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (79, '启用/禁用', '/api/admin/sys/user/enable', 'URL', 5, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (80, '重置密码', '/api/admin/sys/user/reset_password', 'URL', 5, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (81, '导入用户', '/api/admin/sys/user/import', 'URL', 5, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (82, '绑定角色', '/api/admin/sys/user/bind_roles', 'URL', 5, 6, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (83, '查询', '/api/admin/sys/role/list', 'URL', 6, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (84, '删除', '/api/admin/sys/role/remove', 'URL', 6, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (85, '新增/修改', '/api/admin/sys/role/save', 'URL', 6, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (86, '启用/禁用', '/api/admin/sys/role/enable', 'URL', 6, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (87, '用户已绑定角色列表', '/api/admin/sys/role/get_user_roles', 'URL', 5, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (88, '查询', '/api/admin/sys/privilege/list', 'URL', 7, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (89, '新增/修改', '/api/admin/sys/privilege/save', 'URL', 7, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (90, '删除', '/api/admin/sys/privilege/remove', 'URL', 7, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (91, '角色已绑定权限列表', '/api/admin/sys/privilege/get_role_privileges', 'URL', 6, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (92, '查询', '/api/admin/sys/org/list', 'URL', 4, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (93, '新增/修改', '/api/admin/sys/org/save', 'URL', 4, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (94, '删除', '/api/admin/sys/org/remove', 'URL', 4, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (95, '启用/禁用', '/api/admin/sys/org/enable', 'URL', 4, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (111, '扫描管理', 'scanTask', 'MENU', 1, 3, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (112, '系统管理', 'data', 'MENU', 1, 5, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (129, '公共接口', 'common', 'MENU', NULL, 11, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (130, '用户登录相关', 'login', 'MENU', 129, 1, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (131, '用户登录', '/api/admin/common/login', 'URL', 130, 1, 'NO_AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (132, '查询用户权限', '/api/admin/common/get_menu', 'URL', 130, 2, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (133, '发送验证码', '/api/admin/common/get_verify_code', 'URL', 130, 3, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (134, '修改密码', '/api/admin/sys/user/update_password', 'URL', 130, 4, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (135, '用户登出', '/api/admin/common/logout', 'URL', 130, 5, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (136, '模糊查询', 'query', 'MENU', 129, 2, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (144, '文件相关', 'file', 'MENU', 129, 3, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (145, '文件上传', '/api/admin/common/file/upload', 'URL', 144, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (146, '文件查询', '/api/admin/common/file/get_one', 'URL', 144, 2, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (147, '文件下载', '/api/admin/common/file/download', 'URL', 144, 3, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (148, '文件预览', '/api/admin/common/file/preview', 'URL', 144, 4, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (149, '系统相关', 'sys', 'MENU', 129, 4, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (150, '查询枚举类型', '/api/admin/common/get_enums', 'URL', 149, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (151, '查询学校列表', '/api/admin/common/school/list', 'URL', 149, 2, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (152, '查询系统参数', '/api/admin/common/sys_config/get_one', 'URL', 149, 3, 'NO_AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (153, '根据学校代码查询学校信息', '/api/admin/common/school/query_by_school_code', 'URL', 149, 4, 'NO_AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (154, '其他', 'other', 'MENU', 129, 5, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (155, '用户导入（异步）', '/api/admin/sys/user/async/import', 'URL', 154, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (156, '用户导出', '/api/admin/sys/user/export', 'URL', 154, 2, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (179, '查询考务规则', '/api/admin/basic/exam_rule/list', 'URL', 149, 5, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (180, '查询可设置权限列表', '/api/admin/sys/privilege/list_auth', 'URL', 6, 6, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (181, '超管中心', 'admin', 'MENU', 129, 7, NULL, NULL, 0, 1, 1);
INSERT INTO `sys_privilege` VALUES (182, '查询客服', '/api/admin/sys/user/list_customer', 'URL', 181, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (183, '新增客服', '/api/admin/sys/user/save_customer', 'URL', 181, 2, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (184, '查询用户可绑定角色', '/api/admin/sys/role/list_to_user', 'URL', 5, 7, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (185, '删除', 'Delete', 'LINK', 5, 6, 'AUTH', '186', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (186, '删除', '/api/admin/sys/user/remove', 'URL', 5, 8, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (195, '获取服务器时间', '/api/admin/common/get_system_time', 'URL', 129, 2, 'NO_AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (200, '客户端', 'client', 'MENU', NULL, 1, NULL, '202,203,204,205', 1, 0, 0);
INSERT INTO `sys_privilege` VALUES (201, '客户端登录', '/api/admin/client/user/login', 'URL', NULL, 1, 'NO_AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (202, '任务查询', '/api/admin/client/task/page', 'URL', 200, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (203, '开始扫描', '/api/admin/client/bind/user', 'URL', 200, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (204, '上传图片', '/api/admin/client/picture/upload', 'URL', 200, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (205, '开启/关闭', '/api/admin/client/task/enable', 'URL', 200, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (217, '查询', 'Select', 'BUTTON', 5, 1, 'AUTH', '77', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (218, '新增用户', 'Add', 'BUTTON', 5, 2, 'AUTH', '78', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (219, '编辑', 'Edit', 'LINK', 5, 1, 'AUTH', '78', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (220, '启用&禁用', 'Enable', 'LINK', 5, 2, 'AUTH', '79', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (221, '列表', 'List', 'LIST', 5, 1, 'AUTH', '77', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (222, '查询条件', 'Condition', 'CONDITION', 5, 1, 'AUTH', '184,87', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (223, '重置密码', 'Reset', 'LINK', 5, 3, 'AUTH', '80', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (225, '子部门', 'Add', 'LINK', 4, 1, 'AUTH', '93', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (226, '修改', 'Edit', 'LINK', 4, 2, 'AUTH', '93', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (227, '删除', 'Delete', 'LINK', 4, 3, 'AUTH', '94', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (228, '树形列表', 'List', 'LIST', 4, 1, 'AUTH', '92', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (229, '查询', 'Select', 'BUTTON', 6, 1, 'AUTH', '83,88', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (230, '添加角色', 'Add', 'BUTTON', 6, 2, 'AUTH', '85,89', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (231, '编辑', 'Edit', 'LINK', 6, 1, 'AUTH', '83,91', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (232, '删除', 'Delete', 'LINK', 6, 2, 'AUTH', '84,90', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (233, '列表', 'List', 'LIST', 6, 1, 'AUTH', '83', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (234, '查询条件', 'Condition', 'CONDITION', 4, 1, 'AUTH', '92', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (235, '查询条件', 'Condition', 'CONDITION', 6, 1, 'AUTH', '83', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (243, '批量导入', 'Export', 'BUTTON', 5, 3, 'AUTH', '81', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (244, '扫描任务管理', 'ScanTaskManage', 'MENU', 111, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (245, '新增/编辑', '/api/admin/paper/scan_task/save', 'URL', 244, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (246, '查询', '/api/admin/paper/scan_task/query', 'URL', 244, 2, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (247, '批量删除（物理）', '/api/admin/paper/scan_task/delete_batch', 'URL', 244, 3, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (248, '批量导入（异步）', '/api/admin/paper/scan_task/scan_task_import', 'URL', 244, 4, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (249, '任务详情查询', '/api/admin/paper/scan_task/task_detail_page', 'URL', 244, 5, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (250, '清除数据', '/api/admin/paper/scan_task/clear_scan_data', 'URL', 244, 6, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (251, '解绑扫描员', '/api/admin/paper/scan_task/unbind_scanner', 'URL', 244, 7, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (252, '绑定进度详情', '/api/admin/paper/scan_task/bind_progress_detail', 'URL', 244, 8, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (253, '释放正在绑定的任务', '/api/admin/paper/scan_task/release_binding_task', 'URL', 244, 9, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (254, '查询', 'Select', 'BUTTON', 244, 1, 'AUTH', '246', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (255, '列表', 'List', 'LIST', 244, 2, 'AUTH', '246', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (256, '删除', 'Delete', 'LINK', 244, 3, 'AUTH', '247', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (257, '查看详情', 'ScanTaskDetail', 'LINK', 244, 4, 'AUTH', '249', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (258, '清除数据', 'ClearScanData', 'LINK', 244, 5, 'AUTH', '250', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (259, '解绑扫描员', 'UnbindScanner', 'LINK', 244, 6, 'AUTH', '251', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (260, '绑定进度详情', 'ProgressDetail', 'LINK', 244, 7, 'AUTH', '252,253', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (262, '批量删除', 'DeleteBatch', 'BUTTON', 244, 9, 'AUTH', '247', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (263, '导入扫描任务', 'Import', 'BUTTON', 244, 10, 'AUTH', '248', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (264, '查询条件', 'Condition', 'CONDITION', 244, 11, 'AUTH', '246', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (358, '学生管理', 'StudentManage', 'MENU', 2, 6, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (362, '查询', '/api/admin/basic/student/query', 'URL', 358, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (363, '增/编辑', '/api/admin/basic/student/save', 'URL', 358, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (364, '批量删除（逻辑）', '/api/admin/basic/student/delete_batch', 'URL', 358, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (365, '批量导入（异步）', '/api/admin/basic/student/data_import', 'URL', 358, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (370, '获取系统编码', '/api/admin/common/get_code', 'URL', 149, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (371, '根据类型查询机构', '/api/admin/sys/org/find_by_type', 'URL', 4, 5, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (377, '查询', 'Select', 'BUTTON', 358, 1, 'AUTH', '362,462', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (378, '列表', 'List', 'LIST', 358, 1, 'AUTH', '362', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (379, '新增', 'Add', 'BUTTON', 358, 1, 'AUTH', '359,363,462', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (380, '编辑', 'Edit', 'LINK', 358, 1, 'AUTH', '359,363', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (381, '删除', 'Delete', 'LINK', 358, 1, 'AUTH', '364', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (382, '批量导入', 'Import', 'BUTTON', 358, 2, 'AUTH', '365', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (400, '查询条件', 'Condition', 'CONDITION', 358, 1, 'AUTH', '377', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (401, '档案类型管理', 'ArchivesTypeManage', 'MENU', 112, 3, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (402, '列表', 'List', 'LIST', 401, 1, 'AUTH', '406', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (403, '新增类型', 'Add', 'BUTTON', 401, 2, 'AUTH', '407', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (404, '编辑', 'Edit', 'LINK', 401, 3, 'AUTH', '407', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (405, '删除', 'Delete', 'LINK', 401, 4, 'AUTH', '408', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (406, '查询接口', '/api/admin/paper/archives_type/page', 'URL', 401, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (407, '新增/编辑接口', '/api/admin/paper/archives_type/save', 'URL', 401, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (408, '删除接口', '/api/admin/paper/archives_type/delete', 'URL', 401, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (409, '系统设置', 'SystemSetting', 'MENU', 112, 1, NULL, '410,411', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (410, '查询', '/api/admin/sys/setting/get', 'URL', 409, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (411, '新增/修改', '/api/admin/sys/setting/save', 'URL', 409, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (507, '菜单管理', 'MenuManage', 'MENU', 1, 7, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (508, '自定义菜单', 'CustomMenu', 'MENU', 507, 1, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (510, '学期管理', 'SemesterManage', 'MENU', 112, 2, NULL, NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (511, '新建学期', 'Add', 'BUTTON', 510, 1, 'AUTH', '534', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (512, '编辑', 'Edit', 'LINK', 510, 1, 'AUTH', '534', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (513, '删除', 'Delete', 'LINK', 510, 2, 'AUTH', '535', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (514, '列表', 'List', 'LIST', 510, 1, 'AUTH', '533', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (527, '查询自定义菜单权限', '/api/admin/menu/custom/list', 'URL', 508, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (528, '学校已绑定自定义菜单权限列表', '/api/admin/menu/custom/get_school_custom_privileges', 'URL', 508, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (529, '学校新增/修改自定义菜单权限', '/api/admin/menu/custom/save', 'URL', 508, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (530, '查询', 'Select', 'BUTTON', 508, 1, 'AUTH', '527,528', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (531, '保存', 'Save', 'BUTTON', 508, 2, 'AUTH', '529', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (533, '查询', '/api/admin/basic/semester/page', 'URL', 510, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (534, '新增/编辑', '/api/admin/basic/semester/save', 'URL', 510, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (535, '删除', '/api/admin/basic/semester/delete', 'URL', 510, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (539, '共用接口-查询字典', '/api/admin/common/get_dictionary', 'URL', 149, 7, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (547, '阅卷试卷上传待办计数接口', '/api/admin/work/structure/task/ready_count', 'URL', 16, 7, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (548, '阅卷试卷上传待办接口', '/api/admin/work/structure/task/ready', 'URL', 16, 8, 'SYS', '490', 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (549, '短信日志', 'SmsManage', 'MENU', 112, 4, NULL, NULL, 1, 0, 0);
INSERT INTO `sys_privilege` VALUES (550, '查询', 'Select', 'BUTTON', 549, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (551, '查询', '/api/admin/basic/message/list', 'URL', 550, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (552, '查询短信类型', '/api/admin/basic/message/list_message_types', 'URL', 550, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (553, '短信失败重发', '/api/admin/basic/message/resend', 'URL', 550, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (554, '查询条件', 'Condition', 'CONDITION', 549, 1, 'AUTH', NULL, 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (555, '列表', 'List', 'LIST', 549, 1, 'AUTH', '551,552', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (556, '短信失败重发', 'Send', 'LINK', 549, 1, 'AUTH', '553', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (558, '模糊查询', '/api/admin/basic/semester/list', 'URL', 510, 1, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (564, '考试试卷文件上传接口', '/api/admin/common/file/exam_paper_upload', 'URL', 144, 5, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (569, '根据条件删除（物理）', '/api/admin/basic/student/delete_by_condition', 'URL', 358, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (570, '根据条件删除', 'Delete', 'BUTTON', 358, 1, 'AUTH', '569', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (634, '发送验证码（绑定手机号）', '/api/admin/common/get_verify_code_for_bind', 'URL', 130, 3, 'SYS', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (647, '成员管理', 'Manager', 'LINK', 6, 3, 'AUTH', '648,649', 1, 0, 1);
INSERT INTO `sys_privilege` VALUES (648, '新增/修改', '/api/admin/sys/role/group/save', 'URL', 647, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (649, '查询', '/api/admin/sys/role/group/list', 'URL', 647, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (675, '授权配置', 'AuthManage', 'MENU', 1, 6, NULL, NULL, 1, 0, 0);
INSERT INTO `sys_privilege` VALUES (676, '授权配置-导出硬件信息按钮', 'Export', 'BUTTON', 675, 1, 'AUTH', '677,678,679', 1, 0, 0);
INSERT INTO `sys_privilege` VALUES (677, '导出硬件信息', '/api/admin/auth/export/device/info', 'URL', 676, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` VALUES (678, '离线激活', '/api/admin/auth/offline/activation', 'URL', 676, 2, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` VALUES (679, '查询激活信息', '/api/admin/auth/select', 'URL', 676, 3, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` VALUES (757, '导入组织架构', '/api/admin/sys/org/import', 'URL', 4, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO `sys_privilege` VALUES (758, '导入组织架构', 'Import', 'BUTTON', 4, 4, 'AUTH', '757', 1, 0, 1);

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色类别，ADMIN：超级管理员，SCHOOL_ADMIN：管理员：EXAM_TEACHER：考务老师，QUESTION_TEACHER：命题老师，CUSTOMER：客服人员，PRINTER：印刷人员，CUSTOM：自定义',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '修改时间',
  `default_role` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否系统内置角色，1：是，0：不是',
  `source` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色来源，ANALYSIS：教研分析',
  `interpret` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '角色说明',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `role_schoolId_name_idx`(`school_id`, `name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, NULL, NULL, '系统管理员', 1, 'ADMIN', NULL, NULL, NULL, NULL, 1, NULL, '系统内置');
INSERT INTO `sys_role` VALUES (2, NULL, NULL, '档案管理员', 1, 'ARCHIVIST', 1, 1665561494512, NULL, 1665561494512, 1, 'SYS', '系统内置');
INSERT INTO `sys_role` VALUES (3, NULL, NULL, '扫描员', 1, 'SCANNER', 1, 1665560162947, NULL, 1665560162947, 1, 'SYS', '系统内置');
INSERT INTO `sys_role` VALUES (4, NULL, NULL, '数据校验员', 1, 'DATA_CHECKER', 1, 1665561477787, NULL, 1665561477787, 1, 'SYS', '系统内置');
INSERT INTO `sys_role` VALUES (299491950845755392, 295137670185615360, NULL, '学校管理员', 1, NULL, 1, 1662345245376, 1, 1665561842010, 0, NULL, '1');

-- ----------------------------
-- Table structure for sys_role_group_member
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_group_member`;
CREATE TABLE `sys_role_group_member`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `role_id` bigint(20) NOT NULL COMMENT '角色id',
  `user_id` bigint(20) NOT NULL COMMENT '用户id',
  `member_id` bigint(20) NOT NULL COMMENT '成员id',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `role_group_roleId_memberId_idx`(`role_id`, `member_id`, `enable`) USING BTREE,
  INDEX `role_group_member_idx`(`role_id`, `user_id`, `member_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色组成员表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_role_privilege
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_privilege`;
CREATE TABLE `sys_role_privilege`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `role_id` bigint(20) NOT NULL COMMENT '角色id',
  `privilege_id` bigint(20) NOT NULL COMMENT '菜单id',
  `enable` tinyint(4) NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role_privilege
-- ----------------------------
INSERT INTO `sys_role_privilege` VALUES (1580099964134551553, 3, 1, 1);
INSERT INTO `sys_role_privilege` VALUES (1580099964201660418, 3, 200, 1);
INSERT INTO `sys_role_privilege` VALUES (1580099964201660419, 3, 202, 1);
INSERT INTO `sys_role_privilege` VALUES (1580099964201660420, 3, 203, 1);
INSERT INTO `sys_role_privilege` VALUES (1580099964201660421, 3, 204, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479023554562, 4, 1, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479023554563, 4, 19, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479023554564, 4, 20, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479023554565, 4, 21, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274818, 4, 22, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274819, 4, 23, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274820, 4, 24, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274821, 4, 25, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274822, 4, 26, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274823, 4, 27, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274824, 4, 28, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274825, 4, 29, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274826, 4, 31, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274827, 4, 33, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105479082274828, 4, 35, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549148123137, 2, 1, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549148123138, 2, 8, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549148123139, 2, 9, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549148123140, 2, 10, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549148123141, 2, 11, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843394, 2, 12, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843395, 2, 13, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843396, 2, 14, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843397, 2, 15, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843398, 2, 16, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843399, 2, 17, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843400, 2, 18, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843401, 2, 29, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843402, 2, 30, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006756843522, 299491950845755392, 256, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175170, 299491950845755392, 512, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175171, 299491950845755392, 1, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175172, 299491950845755392, 257, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175173, 299491950845755392, 513, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175174, 299491950845755392, 2, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175175, 299491950845755392, 258, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175176, 299491950845755392, 514, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175177, 299491950845755392, 259, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175178, 299491950845755392, 4, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175179, 299491950845755392, 260, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175180, 299491950845755392, 5, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175181, 299491950845755392, 6, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175182, 299491950845755392, 262, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175183, 299491950845755392, 263, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175184, 299491950845755392, 8, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175185, 299491950845755392, 264, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175186, 299491950845755392, 9, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175187, 299491950845755392, 10, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175188, 299491950845755392, 11, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175189, 299491950845755392, 12, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175190, 299491950845755392, 13, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175191, 299491950845755392, 14, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175192, 299491950845755392, 15, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175193, 299491950845755392, 16, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175194, 299491950845755392, 17, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175195, 299491950845755392, 18, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107006807175196, 299491950845755392, 19, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222017, 299491950845755392, 20, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222018, 299491950845755392, 533, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222019, 299491950845755392, 21, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222020, 299491950845755392, 534, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222021, 299491950845755392, 22, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007067222022, 299491950845755392, 23, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657473, 299491950845755392, 535, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657474, 299491950845755392, 24, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657475, 299491950845755392, 25, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657476, 299491950845755392, 26, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657477, 299491950845755392, 27, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657478, 299491950845755392, 28, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657479, 299491950845755392, 29, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657480, 299491950845755392, 30, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657481, 299491950845755392, 31, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657482, 299491950845755392, 549, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657483, 299491950845755392, 550, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657484, 299491950845755392, 551, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657485, 299491950845755392, 552, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007335657486, 299491950845755392, 553, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377729, 299491950845755392, 554, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377730, 299491950845755392, 555, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377731, 299491950845755392, 556, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377732, 299491950845755392, 569, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377733, 299491950845755392, 570, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377734, 299491950845755392, 77, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377735, 299491950845755392, 78, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377736, 299491950845755392, 79, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377737, 299491950845755392, 80, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377738, 299491950845755392, 81, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377739, 299491950845755392, 83, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377740, 299491950845755392, 84, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377741, 299491950845755392, 85, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377742, 299491950845755392, 87, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007394377743, 299491950845755392, 88, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097986, 299491950845755392, 89, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097987, 299491950845755392, 90, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097988, 299491950845755392, 91, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097989, 299491950845755392, 92, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097990, 299491950845755392, 93, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097991, 299491950845755392, 94, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097992, 299491950845755392, 358, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097993, 299491950845755392, 359, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097994, 299491950845755392, 362, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097995, 299491950845755392, 363, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097996, 299491950845755392, 364, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097997, 299491950845755392, 365, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097998, 299491950845755392, 111, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453097999, 299491950845755392, 112, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098000, 299491950845755392, 377, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098001, 299491950845755392, 378, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098002, 299491950845755392, 379, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098003, 299491950845755392, 380, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098004, 299491950845755392, 381, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098005, 299491950845755392, 382, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098006, 299491950845755392, 647, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098007, 299491950845755392, 648, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098008, 299491950845755392, 649, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098009, 299491950845755392, 400, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007453098010, 299491950845755392, 401, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818242, 299491950845755392, 402, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818243, 299491950845755392, 403, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818244, 299491950845755392, 404, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818245, 299491950845755392, 405, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818246, 299491950845755392, 406, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818247, 299491950845755392, 407, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818248, 299491950845755392, 408, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818249, 299491950845755392, 409, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818250, 299491950845755392, 184, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818251, 299491950845755392, 185, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818252, 299491950845755392, 186, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818253, 299491950845755392, 200, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818254, 299491950845755392, 202, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818255, 299491950845755392, 203, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818256, 299491950845755392, 204, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818257, 299491950845755392, 462, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818258, 299491950845755392, 217, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818259, 299491950845755392, 218, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818260, 299491950845755392, 219, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818261, 299491950845755392, 220, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818262, 299491950845755392, 221, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818263, 299491950845755392, 222, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818264, 299491950845755392, 223, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818265, 299491950845755392, 225, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818266, 299491950845755392, 226, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007511818267, 299491950845755392, 227, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732801, 299491950845755392, 228, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732802, 299491950845755392, 229, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732803, 299491950845755392, 230, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732804, 299491950845755392, 231, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732805, 299491950845755392, 232, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732806, 299491950845755392, 233, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732807, 299491950845755392, 234, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732808, 299491950845755392, 235, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732809, 299491950845755392, 243, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732810, 299491950845755392, 244, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732811, 299491950845755392, 757, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732812, 299491950845755392, 246, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732813, 299491950845755392, 758, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732814, 299491950845755392, 247, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732815, 299491950845755392, 248, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732816, 299491950845755392, 249, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732817, 299491950845755392, 250, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732818, 299491950845755392, 251, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732819, 299491950845755392, 252, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732820, 299491950845755392, 254, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732821, 299491950845755392, 510, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732822, 299491950845755392, 255, 1);
INSERT INTO `sys_role_privilege` VALUES (1580107007574732823, 299491950845755392, 511, 1);
INSERT INTO `sys_role_privilege` VALUES (1580105549206843403, 2, 32, 1);



-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
  `login_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
  `real_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
  `code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工号',
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
  `mobile_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  `pwd_count` tinyint(4) NULL DEFAULT 0 COMMENT '密码修改次数，默认为0',
  `pwd_update_time` bigint(20) NULL DEFAULT NULL COMMENT '密码修改时间',
  `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `update_id` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` bigint(20) NULL DEFAULT NULL COMMENT '修改时间',
  `historic_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '历史用户名称',
  `identify_area` VARCHAR(300) NULL DEFAULT NULL COMMENT '识别区域，坐标数组，可传多个',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_schoolId_loginName_idx`(`school_id`, `login_name`) USING BTREE,
  UNIQUE INDEX `uq_school_id_mobile_number`(`school_id`, `mobile_number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, NULL, 'sysadmin', 'sysadmin', NULL, 'MTIzNDU2', NULL, NULL, 1, 1, 1629353956868, NULL, NULL, NULL, NULL, 1629353956881, NULL, NULL);
INSERT INTO `sys_user` VALUES (299492059637612544, 295137670185615360, 'admin', '学校管理员', '111111', 'MTIzNDU2', '19999999999', 295137670219169792, 1, 1, 1662345495740, NULL, 1, 1662345271337, NULL, 1662431297425, NULL, NULL);

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `user_id` bigint(20) NOT NULL COMMENT '用户id',
  `role_id` bigint(20) NOT NULL COMMENT '角色id',
  `privilege_id` bigint(20) NULL DEFAULT NULL COMMENT '权限id',
  `enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否启用，0：停用，1：启用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1, 1, NULL, 1);
INSERT INTO `sys_user_role` VALUES (299492059771830272, 299492059637612544, 299491950845755392, NULL, 1);

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

-- ----------------------------
-- Table structure for t_b_task
-- ----------------------------
DROP TABLE IF EXISTS `t_b_task`;
CREATE TABLE `t_b_task`  (
     `id` bigint(20) NOT NULL COMMENT '主键',
     `school_id` bigint(20) NULL DEFAULT NULL COMMENT '学校id',
     `org_id` bigint(20) NULL DEFAULT NULL COMMENT '机构id',
     `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务类型，USER_IMPORT：用户导入，\nQUESTION_MISSION_BATCH_CREATE：批量新建命题任务，\nSAMPLE_EXPORT：导出审核样本，\nPAPER_DOWNLOAD：卷库下载，\nEXAMINATION_IMPORT：考务数据导入，\nEXAMINATION_EXPORT：考务数据导出，\nPRINT_PDF_DOWNLOAD：批量下载pdf，\nCREATE_PDF：生成pdf，\nCOURSE_IMPORT：课程导入',
     `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务状态，INIT：未开始，RUNNING：进行中，FINISH：已完成',
     `summary` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '实时摘要信息',
     `result` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据结果，SUCCESS：成功，ERROR：失败',
     `import_file_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导入文件名',
     `import_file_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导入文件路径',
     `export_file_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '导出文件路径',
     `txt_file_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报告路径',
     `remark` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
     `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
     `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
     `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
     `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '导入导出任务表' ROW_FORMAT = Dynamic;

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

-- ----------------------------
-- Table structure for t_school_privilege
-- ----------------------------
DROP TABLE IF EXISTS `t_school_privilege`;
CREATE TABLE `t_school_privilege`  (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `school_id` bigint(20) NOT NULL COMMENT '学校id',
  `privilege_id` bigint(20) NOT NULL COMMENT '菜单权限id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学校菜单权限表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_school_privilege
-- ----------------------------
INSERT INTO `t_school_privilege` VALUES (1580099104713273345, 295137670185615360, 1);
INSERT INTO `t_school_privilege` VALUES (1580099104730050562, 295137670185615360, 2);
INSERT INTO `t_school_privilege` VALUES (1580099104730050563, 295137670185615360, 4);
INSERT INTO `t_school_privilege` VALUES (1580099104730050564, 295137670185615360, 234);
INSERT INTO `t_school_privilege` VALUES (1580099104730050565, 295137670185615360, 758);
INSERT INTO `t_school_privilege` VALUES (1580099104730050566, 295137670185615360, 228);
INSERT INTO `t_school_privilege` VALUES (1580099104730050567, 295137670185615360, 225);
INSERT INTO `t_school_privilege` VALUES (1580099104730050568, 295137670185615360, 226);
INSERT INTO `t_school_privilege` VALUES (1580099104730050569, 295137670185615360, 227);
INSERT INTO `t_school_privilege` VALUES (1580099104730050570, 295137670185615360, 5);
INSERT INTO `t_school_privilege` VALUES (1580099104730050571, 295137670185615360, 222);
INSERT INTO `t_school_privilege` VALUES (1580099104730050572, 295137670185615360, 217);
INSERT INTO `t_school_privilege` VALUES (1580099104730050573, 295137670185615360, 218);
INSERT INTO `t_school_privilege` VALUES (1580099104730050574, 295137670185615360, 243);
INSERT INTO `t_school_privilege` VALUES (1580099104730050575, 295137670185615360, 221);
INSERT INTO `t_school_privilege` VALUES (1580099104730050576, 295137670185615360, 219);
INSERT INTO `t_school_privilege` VALUES (1580099104730050577, 295137670185615360, 220);
INSERT INTO `t_school_privilege` VALUES (1580099104730050578, 295137670185615360, 223);
INSERT INTO `t_school_privilege` VALUES (1580099104730050579, 295137670185615360, 185);
INSERT INTO `t_school_privilege` VALUES (1580099104730050580, 295137670185615360, 6);
INSERT INTO `t_school_privilege` VALUES (1580099104730050581, 295137670185615360, 235);
INSERT INTO `t_school_privilege` VALUES (1580099104730050582, 295137670185615360, 229);
INSERT INTO `t_school_privilege` VALUES (1580099104730050583, 295137670185615360, 230);
INSERT INTO `t_school_privilege` VALUES (1580099104730050584, 295137670185615360, 233);
INSERT INTO `t_school_privilege` VALUES (1580099104784576513, 295137670185615360, 231);
INSERT INTO `t_school_privilege` VALUES (1580099104784576514, 295137670185615360, 232);
INSERT INTO `t_school_privilege` VALUES (1580099104784576515, 295137670185615360, 647);
INSERT INTO `t_school_privilege` VALUES (1580099104784576516, 295137670185615360, 358);
INSERT INTO `t_school_privilege` VALUES (1580099104784576517, 295137670185615360, 400);
INSERT INTO `t_school_privilege` VALUES (1580099104784576518, 295137670185615360, 570);
INSERT INTO `t_school_privilege` VALUES (1580099104784576519, 295137670185615360, 377);
INSERT INTO `t_school_privilege` VALUES (1580099104784576520, 295137670185615360, 379);
INSERT INTO `t_school_privilege` VALUES (1580099104784576521, 295137670185615360, 382);
INSERT INTO `t_school_privilege` VALUES (1580099104784576522, 295137670185615360, 378);
INSERT INTO `t_school_privilege` VALUES (1580099104784576523, 295137670185615360, 380);
INSERT INTO `t_school_privilege` VALUES (1580099104784576524, 295137670185615360, 381);
INSERT INTO `t_school_privilege` VALUES (1580099104784576525, 295137670185615360, 200);
INSERT INTO `t_school_privilege` VALUES (1580099104784576526, 295137670185615360, 8);
INSERT INTO `t_school_privilege` VALUES (1580099104784576527, 295137670185615360, 9);
INSERT INTO `t_school_privilege` VALUES (1580099104784576528, 295137670185615360, 30);
INSERT INTO `t_school_privilege` VALUES (1580099104784576529, 295137670185615360, 11);
INSERT INTO `t_school_privilege` VALUES (1580099104784576530, 295137670185615360, 10);
INSERT INTO `t_school_privilege` VALUES (1580099104784576531, 295137670185615360, 12);
INSERT INTO `t_school_privilege` VALUES (1580099104784576532, 295137670185615360, 13);
INSERT INTO `t_school_privilege` VALUES (1580099104784576533, 295137670185615360, 14);
INSERT INTO `t_school_privilege` VALUES (1580099104784576534, 295137670185615360, 111);
INSERT INTO `t_school_privilege` VALUES (1580099104784576535, 295137670185615360, 244);
INSERT INTO `t_school_privilege` VALUES (1580099104784576536, 295137670185615360, 264);
INSERT INTO `t_school_privilege` VALUES (1580099104784576537, 295137670185615360, 254);
INSERT INTO `t_school_privilege` VALUES (1580099104784576538, 295137670185615360, 262);
INSERT INTO `t_school_privilege` VALUES (1580099104784576539, 295137670185615360, 263);
INSERT INTO `t_school_privilege` VALUES (1580099104784576540, 295137670185615360, 255);
INSERT INTO `t_school_privilege` VALUES (1580099104784576541, 295137670185615360, 256);
INSERT INTO `t_school_privilege` VALUES (1580099104784576542, 295137670185615360, 257);
INSERT INTO `t_school_privilege` VALUES (1580099104784576543, 295137670185615360, 258);
INSERT INTO `t_school_privilege` VALUES (1580099104851685377, 295137670185615360, 259);
INSERT INTO `t_school_privilege` VALUES (1580099104851685378, 295137670185615360, 260);
INSERT INTO `t_school_privilege` VALUES (1580099104851685379, 295137670185615360, 19);
INSERT INTO `t_school_privilege` VALUES (1580099104851685380, 295137670185615360, 20);
INSERT INTO `t_school_privilege` VALUES (1580099104851685381, 295137670185615360, 31);
INSERT INTO `t_school_privilege` VALUES (1580099104851685382, 295137670185615360, 22);
INSERT INTO `t_school_privilege` VALUES (1580099104851685383, 295137670185615360, 21);
INSERT INTO `t_school_privilege` VALUES (1580099104851685384, 295137670185615360, 112);
INSERT INTO `t_school_privilege` VALUES (1580099104851685385, 295137670185615360, 409);
INSERT INTO `t_school_privilege` VALUES (1580099104851685386, 295137670185615360, 510);
INSERT INTO `t_school_privilege` VALUES (1580099104851685387, 295137670185615360, 511);
INSERT INTO `t_school_privilege` VALUES (1580099104851685388, 295137670185615360, 514);
INSERT INTO `t_school_privilege` VALUES (1580099104851685389, 295137670185615360, 512);
INSERT INTO `t_school_privilege` VALUES (1580099104851685390, 295137670185615360, 513);
INSERT INTO `t_school_privilege` VALUES (1580099104851685391, 295137670185615360, 401);
INSERT INTO `t_school_privilege` VALUES (1580099104851685392, 295137670185615360, 403);
INSERT INTO `t_school_privilege` VALUES (1580099104851685393, 295137670185615360, 402);
INSERT INTO `t_school_privilege` VALUES (1580099104851685394, 295137670185615360, 404);
INSERT INTO `t_school_privilege` VALUES (1580099104851685395, 295137670185615360, 405);
INSERT INTO `t_school_privilege` VALUES (1580099104851685396, 295137670185615360, 549);
INSERT INTO `t_school_privilege` VALUES (1580099104851685397, 295137670185615360, 554);
INSERT INTO `t_school_privilege` VALUES (1580099104851685398, 295137670185615360, 550);
INSERT INTO `t_school_privilege` VALUES (1580099104851685399, 295137670185615360, 555);
INSERT INTO `t_school_privilege` VALUES (1580099104851685400, 295137670185615360, 556);
INSERT INTO `t_school_privilege` VALUES (1580487393517547546, 295137670185615360, 32);
INSERT INTO `t_school_privilege` VALUES (1580487393584656405, 295137670185615360, 33);
INSERT INTO `t_school_privilege` VALUES (1580487393584656406, 295137670185615360, 36);


DROP TABLE IF EXISTS `sys_setting`;
CREATE TABLE `sys_setting` (
      `id` BIGINT(20) NOT NULL,
      `school_id` BIGINT(20) NOT NULL COMMENT '学校Id',
      `open_ocr` TINYINT(1) NULL DEFAULT 0 COMMENT '是否开启ocr识别，默认否（0）',
      `create_id` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
      `create_time` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
      `update_id` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
      `update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统设置' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
