scan_central_db.sql 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. CREATE TABLE IF NOT EXISTS `sc_student`
  2. (
  3. `id` bigint NOT NULL AUTO_INCREMENT,
  4. `exam_id` bigint NOT NULL,
  5. `exam_number` varchar(64) NOT NULL,
  6. `name` varchar(64) NOT NULL,
  7. `subject_code` varchar(64) NOT NULL,
  8. `package_code` varchar(64) DEFAULT NULL,
  9. `exam_site` varchar(64) DEFAULT NULL,
  10. `exam_site_name` varchar(64) DEFAULT NULL,
  11. `exam_room` varchar(64) DEFAULT NULL,
  12. `seat_number` varchar(16) DEFAULT NULL,
  13. `campus_name` varchar(64) DEFAULT NULL,
  14. `campus_code` varchar(64) DEFAULT NULL,
  15. `status` varchar(16) NOT NULL,
  16. `omr_absent` bit(1) NOT NULL,
  17. `question_filled` bit(1) NOT NULL,
  18. `subjective_filled` bit(1) NOT NULL,
  19. `assigned` bit(1) NOT NULL,
  20. `absent_suspect` bit(1) NOT NULL,
  21. `incomplete` bit(1) NOT NULL,
  22. `card_number` int DEFAULT NULL,
  23. `device` varchar(32) DEFAULT NULL,
  24. `paper_type` varchar(16) NOT NULL,
  25. `exam_status` varchar(32) DEFAULT NULL,
  26. `breach_code` varchar(32) DEFAULT NULL,
  27. `file_upload_status` varchar(16) DEFAULT NULL,
  28. `data_upload_status` varchar(16) DEFAULT NULL,
  29. `check_mark` bit(1) NOT NULL,
  30. `assigned_check_count` int DEFAULT NULL,
  31. `assigned_suspect` bit(1) NOT NULL,
  32. `creator_id` bigint DEFAULT NULL,
  33. `updater_id` bigint DEFAULT NULL,
  34. `create_time` bigint DEFAULT NULL,
  35. `update_time` bigint DEFAULT NULL,
  36. PRIMARY KEY (`id`),
  37. UNIQUE KEY `exam_student_subject` (`exam_id`, `exam_number`, `subject_code`),
  38. KEY `exam_assigned` (`exam_id`, `assigned`, `assigned_check_count`)
  39. ) ENGINE = InnoDB
  40. DEFAULT CHARSET = utf8mb4;
  41. -- ----------------------------
  42. -- Table structure for sc_answer_card
  43. -- ----------------------------
  44. CREATE TABLE IF NOT EXISTS `sc_answer_card`
  45. (
  46. `exam_id` bigint NOT NULL,
  47. `number` int NOT NULL,
  48. `code` varchar(128) DEFAULT NULL,
  49. `paper_count` int NOT NULL,
  50. `path` varchar(255) NOT NULL,
  51. `md5` varchar(32) NOT NULL,
  52. `source` varchar(16) NOT NULL,
  53. `need_adapte` bit(1) NOT NULL,
  54. `single_page` bit(1) NOT NULL,
  55. `slice_config` text NOT NULL,
  56. `dpi` int DEFAULT NULL,
  57. `slice_name` text DEFAULT NULL,
  58. `parameter` text DEFAULT NULL,
  59. `remark` varchar(255) DEFAULT NULL,
  60. `creator_id` bigint DEFAULT NULL,
  61. `updater_id` bigint DEFAULT NULL,
  62. `create_time` bigint DEFAULT NULL,
  63. `update_time` bigint DEFAULT NULL,
  64. PRIMARY KEY (`exam_id`, `number`)
  65. ) ENGINE = InnoDB
  66. DEFAULT CHARSET = utf8mb4;
  67. -- ----------------------------
  68. -- Table structure for sc_exam
  69. -- ----------------------------
  70. CREATE TABLE IF NOT EXISTS `sc_exam`
  71. (
  72. `id` bigint NOT NULL AUTO_INCREMENT,
  73. `name` varchar(128) NOT NULL,
  74. `enable` bit(1) NOT NULL,
  75. `mode` varchar(16) NOT NULL,
  76. `scan_by_package` bit(1) NOT NULL,
  77. `allow_unexist_paper` bit(1) NOT NULL,
  78. `answer_front_card_type` int NOT NULL,
  79. `enable_single_page_answer` bit(1) NOT NULL,
  80. `enable_upload` bit(1) NOT NULL,
  81. `enable_sync_verify` bit(1) NOT NULL,
  82. `exam_number_fill_count` int DEFAULT NULL,
  83. `paper_type_barcode_content` text DEFAULT NULL,
  84. `absent_barcode_content` varchar(16) DEFAULT NULL,
  85. `image_transfer_mode` varchar(32) DEFAULT NULL,
  86. `image_check_ratio` double DEFAULT NULL,
  87. `image_check_order` varchar(50) DEFAULT NULL,
  88. `scanner_assigned_max_count` int DEFAULT NULL,
  89. `scanner_assigned_verify_password` varchar(50) DEFAULT NULL,
  90. `year` int DEFAULT NULL,
  91. `year_half` int DEFAULT NULL,
  92. `data_sync_time` bigint DEFAULT NULL,
  93. `card_sync_time` bigint DEFAULT NULL,
  94. `creator_id` bigint DEFAULT NULL,
  95. `updater_id` bigint DEFAULT NULL,
  96. `create_time` bigint DEFAULT NULL,
  97. `update_time` bigint DEFAULT NULL,
  98. PRIMARY KEY (`id`)
  99. ) ENGINE = InnoDB
  100. DEFAULT CHARSET = utf8mb4;
  101. -- ----------------------------
  102. -- Table structure for sc_exam_summary
  103. -- ----------------------------
  104. CREATE TABLE IF NOT EXISTS `sc_exam_summary`
  105. (
  106. `id` bigint NOT NULL,
  107. `student_count` int(11) NOT NULL,
  108. `subject_count` int(11) NOT NULL,
  109. `batch_count` int(11) NOT NULL,
  110. `answer_scanned_count` int(11) NOT NULL,
  111. `answer_unexist_count` int(11) NOT NULL,
  112. `answer_manual_absent_count` int(11) NOT NULL,
  113. `answer_omr_absent_count` int(11) NOT NULL,
  114. `answer_absent_suspect_count` int(11) NOT NULL,
  115. `answer_incomplete_count` int(11) NOT NULL,
  116. `answer_assigned_count` int(11) NOT NULL,
  117. `answer_mismatch_count` int(11) NOT NULL,
  118. `answer_batch_count` int(11) NOT NULL,
  119. `package_total_count` int(11) NOT NULL,
  120. `package_scanned_count` int(11) NOT NULL,
  121. `student_answer_count` int(11) NOT NULL,
  122. `upload_progress` double NOT NULL,
  123. PRIMARY KEY (`id`)
  124. ) ENGINE = InnoDB
  125. DEFAULT CHARSET = utf8mb4;
  126. -- ----------------------------
  127. -- Table structure for sc_omr_task
  128. -- ----------------------------
  129. CREATE TABLE IF NOT EXISTS `sc_omr_task`
  130. (
  131. `id` bigint NOT NULL AUTO_INCREMENT,
  132. `exam_id` bigint NOT NULL,
  133. `group_id` bigint NOT NULL,
  134. `student_id` bigint NOT NULL,
  135. `paper_number` int NOT NULL,
  136. `paper_id` int NOT NULL,
  137. `card_number` int NOT NULL,
  138. `status` varchar(16) NOT NULL,
  139. `device` varchar(64) DEFAULT NULL,
  140. `pages` text NOT NULL,
  141. `creator_id` bigint DEFAULT NULL,
  142. `updater_id` bigint DEFAULT NULL,
  143. `create_time` bigint DEFAULT NULL,
  144. `update_time` bigint DEFAULT NULL,
  145. PRIMARY KEY (`id`),
  146. UNIQUE KEY `group_paper` (`group_id`, `paper_id`),
  147. KEY `exam_status` (`exam_id`, `status`, `student_id`),
  148. KEY `group_student` (`group_id`, `student_id`)
  149. ) ENGINE = InnoDB
  150. DEFAULT CHARSET = utf8mb4;
  151. -- ----------------------------
  152. -- Table structure for sc_package_card
  153. -- ----------------------------
  154. CREATE TABLE IF NOT EXISTS `sc_package_card`
  155. (
  156. `id` bigint NOT NULL AUTO_INCREMENT,
  157. `exam_id` bigint NOT NULL,
  158. `path` varchar(255) NOT NULL,
  159. `md5` varchar(32) NOT NULL,
  160. `source` varchar(16) NOT NULL,
  161. `creator_id` bigint DEFAULT NULL,
  162. `updater_id` bigint DEFAULT NULL,
  163. `create_time` bigint DEFAULT NULL,
  164. `update_time` bigint DEFAULT NULL,
  165. PRIMARY KEY (`id`),
  166. KEY `exam` (`exam_id`)
  167. ) ENGINE = InnoDB
  168. DEFAULT CHARSET = utf8mb4;
  169. -- ----------------------------
  170. -- Table structure for sc_package_task
  171. -- ----------------------------
  172. CREATE TABLE IF NOT EXISTS `sc_package_task`
  173. (
  174. `id` bigint NOT NULL AUTO_INCREMENT,
  175. `exam_id` bigint NOT NULL,
  176. `package_code` varchar(64) NOT NULL,
  177. `status` varchar(16) NOT NULL,
  178. `device` varchar(64) NOT NULL,
  179. `creator_id` bigint DEFAULT NULL,
  180. `updater_id` bigint DEFAULT NULL,
  181. `create_time` bigint DEFAULT NULL,
  182. `update_time` bigint DEFAULT NULL,
  183. PRIMARY KEY (`id`),
  184. KEY `exam_package` (`exam_id`, `package_code`)
  185. ) ENGINE = InnoDB
  186. DEFAULT CHARSET = utf8mb4;
  187. -- ----------------------------
  188. -- Table structure for sc_scanner
  189. -- ----------------------------
  190. CREATE TABLE IF NOT EXISTS `sc_scanner`
  191. (
  192. `device` varchar(64) NOT NULL,
  193. `device_name` varchar(200) NOT NULL,
  194. `last_login_time` bigint NOT NULL,
  195. `create_time` bigint DEFAULT NULL,
  196. `update_time` bigint DEFAULT NULL,
  197. PRIMARY KEY (`device`)
  198. ) ENGINE = InnoDB
  199. DEFAULT CHARSET = utf8mb4;
  200. -- ----------------------------
  201. -- Table structure for ss_system_config
  202. -- ----------------------------
  203. CREATE TABLE IF NOT EXISTS `sc_system_config`
  204. (
  205. `id` bigint NOT NULL AUTO_INCREMENT,
  206. `scanner_enable_login` bit(1) NOT NULL,
  207. `scanner_password` varchar(16) NOT NULL,
  208. `client_version` varchar(16) DEFAULT NULL,
  209. `client_uri` varchar(255) DEFAULT NULL,
  210. `client_md5` varchar(32) DEFAULT NULL,
  211. `client_update_time` bigint DEFAULT NULL,
  212. PRIMARY KEY (`id`)
  213. ) ENGINE = InnoDB
  214. DEFAULT CHARSET = utf8mb4;
  215. CREATE TABLE IF NOT EXISTS `sc_package_result`
  216. (
  217. `exam_id` bigint NOT NULL,
  218. `package_code` varchar(64) NOT NULL,
  219. `device` varchar(64) NOT NULL,
  220. `path` text NOT NULL,
  221. `assigned` bit(1) NOT NULL,
  222. `creator_id` bigint DEFAULT NULL,
  223. `updater_id` bigint DEFAULT NULL,
  224. `create_time` bigint DEFAULT NULL,
  225. `update_time` bigint DEFAULT NULL,
  226. `upload_time` bigint DEFAULT NULL,
  227. PRIMARY KEY (`exam_id`, `package_code`)
  228. ) ENGINE = InnoDB
  229. DEFAULT CHARSET = utf8mb4;
  230. CREATE TABLE IF NOT EXISTS `sc_scanner_card`
  231. (
  232. `exam_id` bigint NOT NULL,
  233. `device` varchar(64) NOT NULL,
  234. `card_number` int NOT NULL,
  235. `creator_id` bigint DEFAULT NULL,
  236. `updater_id` bigint DEFAULT NULL,
  237. `create_time` bigint DEFAULT NULL,
  238. `update_time` bigint DEFAULT NULL,
  239. PRIMARY KEY (`exam_id`, `device`)
  240. ) ENGINE = InnoDB
  241. DEFAULT CHARSET = utf8mb4;
  242. CREATE TABLE IF NOT EXISTS `sc_batch`
  243. (
  244. `id` bigint NOT NULL AUTO_INCREMENT,
  245. `exam_id` bigint NOT NULL,
  246. `device` varchar(64) NOT NULL,
  247. `package_code` varchar(64) DEFAULT NULL,
  248. `subject_code` varchar(64) DEFAULT NULL,
  249. `scan_count` int NOT NULL,
  250. `assigned_count` int NOT NULL,
  251. `status` varchar(16) NOT NULL,
  252. `verify_status` varchar(16) DEFAULT NULL,
  253. `check_status` varchar(16) DEFAULT NULL,
  254. `check_image_user_id` bigint DEFAULT NULL,
  255. `check_image_time` bigint DEFAULT NULL,
  256. `creator_id` bigint DEFAULT NULL,
  257. `updater_id` bigint DEFAULT NULL,
  258. `create_time` bigint DEFAULT NULL,
  259. `update_time` bigint DEFAULT NULL,
  260. PRIMARY KEY (`id`),
  261. KEY `exam_verify_status` (`exam_id`, `verify_status`)
  262. ) ENGINE = InnoDB
  263. DEFAULT CHARSET = utf8mb4;
  264. CREATE TABLE IF NOT EXISTS `sc_batch_paper`
  265. (
  266. `batch_id` bigint(20) NOT NULL,
  267. `student_id` bigint(20) NOT NULL,
  268. `paper_number` int(11) NOT NULL,
  269. `paper_id` bigint(20) NOT NULL,
  270. `card_number` int(11) NOT NULL,
  271. `assigned` bit(1) NOT NULL,
  272. `need_check` bit(1) NOT NULL,
  273. `creator_id` bigint DEFAULT NULL,
  274. `updater_id` bigint DEFAULT NULL,
  275. `create_time` bigint DEFAULT NULL,
  276. `update_time` bigint DEFAULT NULL,
  277. PRIMARY KEY (`batch_id`, `student_id`, `paper_number`),
  278. UNIQUE KEY `paper_id` (`paper_id`)
  279. ) ENGINE = InnoDB
  280. DEFAULT CHARSET = utf8mb4;
  281. CREATE TABLE IF NOT EXISTS `sc_paper`
  282. (
  283. `id` bigint NOT NULL AUTO_INCREMENT,
  284. `exam_id` bigint NOT NULL,
  285. `card_number` int NOT NULL,
  286. `number` int NOT NULL,
  287. `page_count` int NOT NULL,
  288. `mismatch` bit(1) NOT NULL,
  289. `assigned` bit(1) NOT NULL,
  290. `assigned_suspect` bit(1) NOT NULL,
  291. `question_filled` bit(1) NOT NULL,
  292. `subjective_filled` bit(1) NOT NULL,
  293. `omr_exam_number` varchar(255) NOT NULL,
  294. `creator_id` bigint DEFAULT NULL,
  295. `updater_id` bigint DEFAULT NULL,
  296. `create_time` bigint DEFAULT NULL,
  297. `update_time` bigint DEFAULT NULL,
  298. PRIMARY KEY (`id`),
  299. KEY `mismatch` (`exam_id`, `mismatch`)
  300. ) ENGINE = InnoDB
  301. DEFAULT CHARSET = utf8mb4;
  302. CREATE TABLE IF NOT EXISTS `sc_paper_page`
  303. (
  304. `paper_id` bigint NOT NULL,
  305. `page_index` int NOT NULL,
  306. `absent` text DEFAULT NULL,
  307. `breach` text DEFAULT NULL,
  308. `paper_type` text DEFAULT NULL,
  309. `question` text DEFAULT NULL,
  310. `selective` text DEFAULT NULL,
  311. `sheet_path` varchar(255) NOT NULL,
  312. `slice_path` text DEFAULT NULL,
  313. `recog_data` longtext DEFAULT NULL,
  314. `creator_id` bigint DEFAULT NULL,
  315. `updater_id` bigint DEFAULT NULL,
  316. `create_time` bigint DEFAULT NULL,
  317. `update_time` bigint DEFAULT NULL,
  318. PRIMARY KEY (`paper_id`, `page_index`)
  319. ) ENGINE = InnoDB
  320. DEFAULT CHARSET = utf8mb4;
  321. CREATE TABLE IF NOT EXISTS `sc_paper_structure`
  322. (
  323. `id` bigint NOT NULL AUTO_INCREMENT,
  324. `exam_id` bigint NOT NULL,
  325. `card_number` int NOT NULL,
  326. `paper_number` int NOT NULL,
  327. `page_index` int NOT NULL,
  328. `field` varchar(16) NOT NULL,
  329. `question_number` int NOT NULL,
  330. `single` bit(1) NOT NULL,
  331. `creator_id` bigint DEFAULT NULL,
  332. `updater_id` bigint DEFAULT NULL,
  333. `create_time` bigint DEFAULT NULL,
  334. `update_time` bigint DEFAULT NULL,
  335. PRIMARY KEY (`id`),
  336. UNIQUE KEY `IDX_PAPER_STRUCTURE_001` (`exam_id`, `card_number`, `paper_number`, `page_index`, `field`,
  337. `question_number`)
  338. ) ENGINE = InnoDB
  339. DEFAULT CHARSET = utf8mb4;
  340. CREATE TABLE IF NOT EXISTS `sc_question`
  341. (
  342. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  343. `exam_id` int(11) NOT NULL COMMENT '考试ID',
  344. `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
  345. `paper_type` varchar(8) NOT NULL COMMENT '试卷类型',
  346. `objective` tinyint(1) NOT NULL COMMENT '是否客观题',
  347. `main_number` int(11) NOT NULL COMMENT '大题号',
  348. `sub_number` varchar(32) NOT NULL COMMENT '小题号',
  349. `main_title` varchar(128) NOT NULL COMMENT '大题名称',
  350. `total_score` double DEFAULT NULL COMMENT '满分',
  351. `creator_id` bigint DEFAULT NULL,
  352. `updater_id` bigint DEFAULT NULL,
  353. `create_time` bigint DEFAULT NULL,
  354. `update_time` bigint DEFAULT NULL,
  355. PRIMARY KEY (`id`),
  356. UNIQUE KEY `index1` (`exam_id`, `subject_code`, `objective`, `paper_type`, `main_number`, `sub_number`)
  357. ) ENGINE = InnoDB
  358. DEFAULT CHARSET = utf8mb4 COMMENT ='小题信息表';
  359. CREATE TABLE IF NOT EXISTS `sc_omr_group`
  360. (
  361. `id` bigint NOT NULL AUTO_INCREMENT,
  362. `exam_id` bigint NOT NULL,
  363. `fixed` bit(1) NOT NULL,
  364. `stage` varchar(16) NOT NULL,
  365. `conditions` text NOT NULL,
  366. `total_count` int NOT NULL,
  367. `creator_id` bigint DEFAULT NULL,
  368. `updater_id` bigint DEFAULT NULL,
  369. `create_time` bigint DEFAULT NULL,
  370. `update_time` bigint DEFAULT NULL,
  371. PRIMARY KEY (`id`),
  372. KEY `exam_fixed` (`exam_id`, `fixed`)
  373. ) ENGINE = InnoDB
  374. DEFAULT CHARSET = utf8mb4;
  375. CREATE TABLE IF NOT EXISTS `sc_refix_batch`
  376. (
  377. `id` bigint NOT NULL AUTO_INCREMENT,
  378. `exam_id` bigint NOT NULL,
  379. `card_number` int NOT NULL,
  380. `conditions` text NOT NULL,
  381. `update_slice` bit(1) NOT NULL,
  382. `total_count` int NOT NULL,
  383. `sucess_count` int NOT NULL,
  384. `finished` bit(1) NOT NULL,
  385. `creator_id` bigint DEFAULT NULL,
  386. `updater_id` bigint DEFAULT NULL,
  387. `create_time` bigint DEFAULT NULL,
  388. `update_time` bigint DEFAULT NULL,
  389. PRIMARY KEY (`id`)
  390. ) ENGINE = InnoDB
  391. DEFAULT CHARSET = utf8mb4;
  392. CREATE TABLE IF NOT EXISTS `sc_student_paper`
  393. (
  394. `student_id` bigint NOT NULL,
  395. `paper_number` int NOT NULL,
  396. `paper_id` bigint NOT NULL,
  397. `create_time` bigint DEFAULT NULL,
  398. `update_time` bigint DEFAULT NULL,
  399. PRIMARY KEY (`student_id`, `paper_number`),
  400. UNIQUE KEY `paper_id` (`paper_id`)
  401. ) ENGINE = InnoDB
  402. DEFAULT CHARSET = utf8mb4;
  403. CREATE TABLE IF NOT EXISTS `sc_subject`
  404. (
  405. `exam_id` bigint NOT NULL,
  406. `code` varchar(64) NOT NULL,
  407. `name` varchar(64) NOT NULL,
  408. `paper_type_barcode_content` text DEFAULT NULL,
  409. `creator_id` bigint DEFAULT NULL,
  410. `updater_id` bigint DEFAULT NULL,
  411. `create_time` bigint DEFAULT NULL,
  412. `update_time` bigint DEFAULT NULL,
  413. PRIMARY KEY (`exam_id`, `code`)
  414. ) ENGINE = InnoDB
  415. DEFAULT CHARSET = utf8mb4;
  416. CREATE TABLE IF NOT EXISTS `sc_file_property`
  417. (
  418. `path` varchar(255) NOT NULL,
  419. `md5` varchar(32) NOT NULL,
  420. `exam_id` bigint NOT NULL,
  421. `file_size` bigint NOT NULL,
  422. `create_time` bigint DEFAULT NULL,
  423. `update_time` bigint DEFAULT NULL,
  424. PRIMARY KEY (`path`)
  425. ) ENGINE = InnoDB
  426. DEFAULT CHARSET = utf8mb4;
  427. CREATE TABLE IF NOT EXISTS `sc_user`
  428. (
  429. `id` int(11) NOT NULL AUTO_INCREMENT,
  430. `login_name` varchar(64) NOT NULL,
  431. `name` varchar(64) NOT NULL,
  432. `password` varchar(64) NOT NULL,
  433. `role` varchar(16) NOT NULL,
  434. `enable` tinyint(1) NOT NULL,
  435. `device` varchar(64) DEFAULT NULL,
  436. `creator_id` bigint DEFAULT NULL,
  437. `updater_id` bigint DEFAULT NULL,
  438. `create_time` bigint DEFAULT NULL,
  439. `update_time` bigint DEFAULT NULL,
  440. PRIMARY KEY (`id`),
  441. UNIQUE KEY `login_name` (`login_name`)
  442. ) ENGINE = InnoDB
  443. DEFAULT CHARSET = utf8mb4;
  444. CREATE TABLE IF NOT EXISTS `sc_adapte_file`
  445. (
  446. `exam_id` bigint NOT NULL,
  447. `card_number` int NOT NULL,
  448. `role` varchar(16) NOT NULL,
  449. `device` varchar(64) NOT NULL,
  450. `uri` varchar(255) NOT NULL,
  451. `md5` varchar(32) NOT NULL,
  452. `dpi` int DEFAULT NULL,
  453. `create_time` bigint DEFAULT NULL,
  454. `update_time` bigint DEFAULT NULL,
  455. PRIMARY KEY (`exam_id`, `card_number`, `role`, `device`)
  456. ) ENGINE = InnoDB
  457. DEFAULT CHARSET = utf8mb4;
  458. CREATE TABLE IF NOT EXISTS `sc_student_answer_task`
  459. (
  460. `id` bigint NOT NULL AUTO_INCREMENT,
  461. `exam_id` bigint NOT NULL,
  462. `group_id` bigint NOT NULL,
  463. `student_id` bigint NOT NULL,
  464. `status` varchar(16) NOT NULL,
  465. `device` varchar(64) DEFAULT NULL,
  466. `creator_id` bigint DEFAULT NULL,
  467. `updater_id` bigint DEFAULT NULL,
  468. `create_time` bigint DEFAULT NULL,
  469. `update_time` bigint DEFAULT NULL,
  470. PRIMARY KEY (`id`),
  471. UNIQUE KEY `group_student` (`group_id`, `student_id`),
  472. KEY `exam_status` (`exam_id`, `student_id`, `status`)
  473. ) ENGINE = InnoDB
  474. DEFAULT CHARSET = utf8mb4;
  475. CREATE TABLE IF NOT EXISTS `sc_student_answer_group`
  476. (
  477. `id` bigint NOT NULL AUTO_INCREMENT,
  478. `exam_id` bigint NOT NULL,
  479. `conditions` text NOT NULL,
  480. `total_count` int NOT NULL,
  481. `creator_id` bigint DEFAULT NULL,
  482. `updater_id` bigint DEFAULT NULL,
  483. `create_time` bigint DEFAULT NULL,
  484. `update_time` bigint DEFAULT NULL,
  485. PRIMARY KEY (`id`)
  486. ) ENGINE = InnoDB
  487. DEFAULT CHARSET = utf8mb4;
  488. CREATE TABLE IF NOT EXISTS `sc_answer_card_subject`
  489. (
  490. `exam_id` bigint NOT NULL,
  491. `card_number` int NOT NULL,
  492. `subject_code` varchar(64) NOT NULL,
  493. `create_time` bigint DEFAULT NULL,
  494. `update_time` bigint DEFAULT NULL,
  495. PRIMARY KEY (`exam_id`, `card_number`, `subject_code`)
  496. ) ENGINE = InnoDB
  497. DEFAULT CHARSET = utf8mb4;
  498. -- ----------------------------
  499. -- Table structure for sc_assigned_check_history
  500. -- ----------------------------
  501. CREATE TABLE IF NOT EXISTS `sc_assigned_check_history`
  502. (
  503. `id` bigint NOT NULL AUTO_INCREMENT,
  504. `exam_id` bigint NOT NULL,
  505. `student_id` bigint NOT NULL,
  506. `user_id` bigint NOT NULL,
  507. `creator_id` bigint DEFAULT NULL,
  508. `updater_id` bigint DEFAULT NULL,
  509. `create_time` bigint DEFAULT NULL,
  510. `update_time` bigint DEFAULT NULL,
  511. PRIMARY KEY (`id`),
  512. UNIQUE KEY `student_user` (`student_id`, `user_id`),
  513. KEY `student` (`student_id`)
  514. ) ENGINE = InnoDB
  515. DEFAULT CHARSET = utf8mb4;
  516. CREATE TABLE IF NOT EXISTS `sc_mark_site`
  517. (
  518. `id` bigint NOT NULL AUTO_INCREMENT,
  519. `exam_id` bigint NOT NULL,
  520. `subject_code` varchar(100) NOT NULL,
  521. `paper_type` varchar(100) NOT NULL,
  522. `odd_number` varchar(100) NOT NULL,
  523. `even_number` varchar(100) NOT NULL,
  524. `creator_id` bigint DEFAULT NULL,
  525. `updater_id` bigint DEFAULT NULL,
  526. `create_time` bigint DEFAULT NULL,
  527. `update_time` bigint DEFAULT NULL,
  528. PRIMARY KEY (`id`),
  529. UNIQUE KEY `exam_subject_paper` (`exam_id`, `subject_code`, `paper_type`)
  530. ) ENGINE = InnoDB
  531. DEFAULT CHARSET = utf8mb4;