scan_central_db.sql 21 KB

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