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

-- ----------------------------
-- Table structure for gdpu_jwxt_jgdmb
-- ----------------------------
CREATE TABLE IF NOT EXISTS `gdpu_jwxt_jgdmb` (
  `id` int NOT NULL AUTO_INCREMENT,
  `jg_id` varchar(45) DEFAULT NULL COMMENT '机构ID',
  `jgmc` varchar(100) DEFAULT NULL COMMENT '机构名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for gdpu_jwxt_jyzr
-- ----------------------------
CREATE TABLE IF NOT EXISTS `gdpu_jwxt_jyzr` (
  `id` int NOT NULL AUTO_INCREMENT,
  `jzgh` varchar(45) DEFAULT NULL COMMENT '教职工号',
  `jwjsmc` varchar(45) DEFAULT NULL COMMENT '角色名称',
  `xm` varchar(45) DEFAULT NULL COMMENT '姓名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for gdpu_jwxt_jzgxxb
-- ----------------------------
CREATE TABLE IF NOT EXISTS `gdpu_jwxt_jzgxxb` (
  `id` int NOT NULL AUTO_INCREMENT,
  `jzgh` varchar(45) DEFAULT NULL COMMENT '教职工号',
  `xm` varchar(45) DEFAULT NULL COMMENT '姓名',
  `jgmc` varchar(45) DEFAULT NULL COMMENT '机构名称',
  `jg_id` varchar(45) DEFAULT NULL COMMENT '机构ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for gdpu_jwxt_kcdmb
-- ----------------------------
CREATE TABLE IF NOT EXISTS `gdpu_jwxt_kcdmb` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kch` varchar(45) DEFAULT NULL COMMENT '课程号',
  `kcmc` varchar(100) DEFAULT NULL COMMENT '课程名称',
  `kkbmdm` varchar(45) DEFAULT NULL COMMENT '开课部门代码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Table structure for gdpu_zt_xsxx
-- ----------------------------
CREATE TABLE IF NOT EXISTS `gdpu_zt_xsxx` (
  `id` int NOT NULL AUTO_INCREMENT,
  `xm` varchar(100) DEFAULT NULL COMMENT '姓名',
  `xh` varchar(45) DEFAULT NULL COMMENT '学号',
  `ssyx` varchar(100) DEFAULT NULL COMMENT '所属院系',
  `impmarjor` varchar(100) DEFAULT NULL COMMENT '专业',
  `zydm` varchar(45) DEFAULT NULL COMMENT '专业代码',
  `bjmc` varchar(100) DEFAULT NULL COMMENT '班级名称',
  `bjdm` varchar(45) DEFAULT NULL COMMENT '班级代码',
  `rylx` varchar(45) DEFAULT NULL COMMENT '人员类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

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

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

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

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

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

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

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

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

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

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

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

-- ----------------------------
-- Table structure for student_score
-- ----------------------------
CREATE TABLE IF NOT EXISTS `student_score` (
 `exam_id` bigint NOT NULL COMMENT '考试ID',
 `course_code` varchar(255) NOT NULL COMMENT '课程代码',
 `course_name` varchar(255) DEFAULT NULL COMMENT '课程名称',
 `course_paper_id` varchar(255) NOT NULL COMMENT '课程试卷号',
 `student_code` varchar(30) NOT NULL COMMENT '学号',
 `student_name` varchar(100) DEFAULT NULL COMMENT '姓名',
 `total_score` double(10,2) DEFAULT NULL COMMENT '总分',
  `objective_score_list` mediumtext COMMENT '客观题分数详情',
  `subjective_score_list` mediumtext COMMENT '主观题分数详情',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`exam_id`,`course_paper_id`,`student_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

-- ----------------------------
-- View structure for course
-- ----------------------------
DROP VIEW IF EXISTS `course`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `course` AS select `gjk`.`kch` AS `课程代码`,`gjk`.`kcmc` AS `课程名称`,`gjj`.`jgmc` AS `开课学院` from (`gdpu_jwxt_kcdmb` `gjk` left join `gdpu_jwxt_jgdmb` `gjj` on((`gjk`.`kkbmdm` = `gjj`.`jg_id`)));

-- ----------------------------
-- View structure for org
-- ----------------------------
DROP VIEW IF EXISTS `org`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `org` AS select `gdpu_jwxt_jgdmb`.`jg_id` AS `机构ID`,`gdpu_jwxt_jgdmb`.`jgmc` AS `机构名称` from `gdpu_jwxt_jgdmb`;

-- ----------------------------
-- View structure for student
-- ----------------------------
DROP VIEW IF EXISTS `student`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `student` AS select `gdpu_zt_xsxx`.`xm` AS `姓名`,`gdpu_zt_xsxx`.`xh` AS `学号`,`gdpu_zt_xsxx`.`ssyx` AS `学院`,`gdpu_zt_xsxx`.`impmarjor` AS `专业`,`gdpu_zt_xsxx`.`zydm` AS `专业代码`,`gdpu_zt_xsxx`.`bjmc` AS `班级名称`,`gdpu_zt_xsxx`.`bjdm` AS `班级代码`,`gdpu_zt_xsxx`.`rylx` AS `人员类型` from `gdpu_zt_xsxx`;

-- ----------------------------
-- View structure for user_zr
-- ----------------------------
DROP VIEW IF EXISTS `user_zr`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `user_zr` AS select `a`.`jzgh` AS `工号`,`a`.`xm` AS `姓名`,`a`.`jgmc` AS `组织架构`,`b`.`jwjsmc` AS `角色名称` from (`gdpu_jwxt_jzgxxb` `a` left join `gdpu_jwxt_jyzr` `b` on((`a`.`jzgh` = `b`.`jzgh`)));

