db-schema.sql 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. DROP TABLE ec_prt_project;
  2. DROP TABLE ec_prt_project_backup_setting;
  3. DROP TABLE ec_prt_project_other_setting;
  4. DROP TABLE ec_prt_project_statistic;
  5. DROP TABLE ec_prt_course_statistic;
  6. DROP TABLE ec_prt_course_paper;
  7. DROP TABLE ec_prt_template;
  8. DROP TABLE ec_prt_exam_structure;
  9. DROP TABLE ec_prt_objective_question_structure;
  10. DROP TABLE ec_prt_subjective_question_structure;
  11. CREATE TABLE ec_prt_course_paper (
  12. id bigint(20) NOT NULL AUTO_INCREMENT,
  13. creation_time datetime DEFAULT NULL,
  14. update_time datetime DEFAULT NULL,
  15. answer_html_url varchar(255) DEFAULT NULL,
  16. answer_pdf_url varchar(255) DEFAULT NULL,
  17. converted bit(1) DEFAULT NULL,
  18. course_code varchar(50) DEFAULT NULL,
  19. course_id bigint(20) DEFAULT NULL,
  20. course_name varchar(50) DEFAULT NULL,
  21. exam_id bigint(20) DEFAULT NULL,
  22. org_id bigint(20) DEFAULT NULL,
  23. paper_html_url varchar(255) DEFAULT NULL,
  24. paper_id varchar(50) DEFAULT NULL,
  25. paper_name varchar(100) DEFAULT NULL,
  26. paper_p int(11) DEFAULT NULL,
  27. paper_pdf_url varchar(255) DEFAULT NULL,
  28. PRIMARY KEY (id),
  29. UNIQUE KEY INDEX_PRT_COURSE_PAPER_03 (exam_id, paper_id),
  30. KEY INDEX_PRT_COURSE_PAPER_01 (org_id),
  31. KEY INDEX_PRT_COURSE_PAPER_02 (exam_id)
  32. )
  33. ENGINE = InnoDB
  34. DEFAULT CHARSET = utf8;
  35. CREATE TABLE ec_prt_course_statistic (
  36. id bigint(20) NOT NULL AUTO_INCREMENT,
  37. creation_time datetime DEFAULT NULL,
  38. update_time datetime DEFAULT NULL,
  39. course_code varchar(50) DEFAULT NULL,
  40. course_id bigint(20) DEFAULT NULL,
  41. course_name varchar(50) DEFAULT NULL,
  42. exam_id bigint(20) DEFAULT NULL,
  43. org_id bigint(20) DEFAULT NULL,
  44. paper_status int(11) DEFAULT NULL,
  45. paper_type varchar(50) DEFAULT NULL,
  46. total_student int(11) DEFAULT NULL,
  47. course_paper_id bigint(20) DEFAULT NULL,
  48. PRIMARY KEY (id),
  49. KEY INDEX_PRT_COURSE_STATISTIC_01 (org_id),
  50. KEY INDEX_PRT_COURSE_STATISTIC_02 (exam_id),
  51. KEY INDEX_PRT_COURSE_STATISTIC_03 (course_id),
  52. KEY FK7nnn568j5img7r3fjbsni2t25 (course_paper_id),
  53. CONSTRAINT FK7nnn568j5img7r3fjbsni2t25 FOREIGN KEY (course_paper_id) REFERENCES ec_prt_course_paper (id)
  54. )
  55. ENGINE = InnoDB
  56. DEFAULT CHARSET = utf8;
  57. CREATE TABLE ec_prt_exam_structure (
  58. id bigint(20) NOT NULL AUTO_INCREMENT,
  59. creation_time datetime DEFAULT NULL,
  60. update_time datetime DEFAULT NULL,
  61. exam_id bigint(20) DEFAULT NULL,
  62. exam_name varchar(100) DEFAULT NULL,
  63. exam_type varchar(50) DEFAULT NULL,
  64. org_id bigint(20) DEFAULT NULL,
  65. org_name varchar(100) DEFAULT NULL,
  66. struct varchar(500) DEFAULT NULL,
  67. PRIMARY KEY (id),
  68. UNIQUE KEY INDEX_PRT_EXAM_STRUCTURE_01 (org_id, exam_id)
  69. )
  70. ENGINE = InnoDB
  71. DEFAULT CHARSET = utf8;
  72. CREATE TABLE ec_prt_objective_question_structure (
  73. id bigint(20) NOT NULL AUTO_INCREMENT,
  74. creation_time datetime DEFAULT NULL,
  75. update_time datetime DEFAULT NULL,
  76. answer varchar(50) DEFAULT NULL,
  77. course_code varchar(50) DEFAULT NULL,
  78. course_id bigint(20) DEFAULT NULL,
  79. course_name varchar(50) DEFAULT NULL,
  80. exam_id bigint(20) DEFAULT NULL,
  81. paper_id varchar(50) DEFAULT NULL,
  82. paper_name varchar(100) DEFAULT NULL,
  83. question_type varchar(50) DEFAULT NULL,
  84. section_num int(11) DEFAULT NULL,
  85. unit_num int(11) DEFAULT NULL,
  86. unit_score double DEFAULT NULL,
  87. PRIMARY KEY (id),
  88. KEY INDEX_PRT_OBJECTIVE_QUESTION_01 (exam_id),
  89. KEY INDEX_PRT_OBJECTIVE_QUESTION_02 (course_id),
  90. KEY INDEX_PRT_OBJECTIVE_QUESTION_03 (paper_id)
  91. )
  92. ENGINE = InnoDB
  93. DEFAULT CHARSET = utf8;
  94. CREATE TABLE ec_prt_project (
  95. id bigint(20) NOT NULL AUTO_INCREMENT,
  96. creation_time datetime DEFAULT NULL,
  97. update_time datetime DEFAULT NULL,
  98. completed bit(1) DEFAULT NULL,
  99. exam_id bigint(20) DEFAULT NULL,
  100. exam_name varchar(100) DEFAULT NULL,
  101. mail_end_time datetime DEFAULT NULL,
  102. mail_start_time datetime DEFAULT NULL,
  103. org_id bigint(20) DEFAULT NULL,
  104. org_name varchar(100) DEFAULT NULL,
  105. pm_id bigint(20) DEFAULT NULL,
  106. pm_name varchar(50) DEFAULT NULL,
  107. prepare_end_time datetime DEFAULT NULL,
  108. prepare_start_time datetime DEFAULT NULL,
  109. print_end_time datetime DEFAULT NULL,
  110. print_start_time datetime DEFAULT NULL,
  111. supplier_id bigint(20) DEFAULT NULL,
  112. supplier_name varchar(50) DEFAULT NULL,
  113. PRIMARY KEY (id),
  114. UNIQUE KEY INDEX_PRT_PROJECT_01 (org_id, exam_id)
  115. )
  116. ENGINE = InnoDB
  117. DEFAULT CHARSET = utf8;
  118. CREATE TABLE ec_prt_project_backup_setting (
  119. id bigint(20) NOT NULL AUTO_INCREMENT,
  120. creation_time datetime DEFAULT NULL,
  121. update_time datetime DEFAULT NULL,
  122. alone_pkg_max double DEFAULT NULL,
  123. alone_pkg_min double DEFAULT NULL,
  124. alone_pkg_percent double DEFAULT NULL,
  125. each_pkg_max double DEFAULT NULL,
  126. each_pkg_min double DEFAULT NULL,
  127. each_pkg_percent double DEFAULT NULL,
  128. group_type varchar(255) DEFAULT NULL,
  129. need_alone_pkg bit(1) DEFAULT NULL,
  130. need_each_pkg bit(1) DEFAULT NULL,
  131. project_id bigint(20) DEFAULT NULL,
  132. PRIMARY KEY (id),
  133. UNIQUE KEY INDEX_PRT_PROJECT_BACKUP_01 (project_id)
  134. )
  135. ENGINE = InnoDB
  136. DEFAULT CHARSET = utf8;
  137. CREATE TABLE ec_prt_project_other_setting (
  138. id bigint(20) NOT NULL AUTO_INCREMENT,
  139. creation_time datetime DEFAULT NULL,
  140. update_time datetime DEFAULT NULL,
  141. project_id bigint(20) DEFAULT NULL,
  142. remark varchar(2000) DEFAULT NULL,
  143. PRIMARY KEY (id),
  144. KEY INDEX_PRT_PROJECT_OTHER_01 (project_id)
  145. )
  146. ENGINE = InnoDB
  147. DEFAULT CHARSET = utf8;
  148. CREATE TABLE ec_prt_project_statistic (
  149. id bigint(20) NOT NULL AUTO_INCREMENT,
  150. creation_time datetime DEFAULT NULL,
  151. update_time datetime DEFAULT NULL,
  152. backupa3 int(11) DEFAULT NULL,
  153. backupa4 int(11) DEFAULT NULL,
  154. normala3 int(11) DEFAULT NULL,
  155. normala4 int(11) DEFAULT NULL,
  156. project_id bigint(20) DEFAULT NULL,
  157. total_course int(11) DEFAULT NULL,
  158. total_paper int(11) DEFAULT NULL,
  159. total_pkg int(11) DEFAULT NULL,
  160. total_student int(11) DEFAULT NULL,
  161. PRIMARY KEY (id),
  162. UNIQUE KEY INDEX_PRT_PROJECT_STATISTIC_01 (project_id)
  163. )
  164. ENGINE = InnoDB
  165. DEFAULT CHARSET = utf8;
  166. CREATE TABLE ec_prt_subjective_question_structure (
  167. id bigint(20) NOT NULL AUTO_INCREMENT,
  168. creation_time datetime DEFAULT NULL,
  169. update_time datetime DEFAULT NULL,
  170. course_code varchar(50) DEFAULT NULL,
  171. course_id bigint(20) DEFAULT NULL,
  172. course_name varchar(50) DEFAULT NULL,
  173. exam_id bigint(20) DEFAULT NULL,
  174. paper_id varchar(50) DEFAULT NULL,
  175. paper_name varchar(100) DEFAULT NULL,
  176. section_name varchar(100) DEFAULT NULL,
  177. section_num int(11) DEFAULT NULL,
  178. unit_num int(11) DEFAULT NULL,
  179. unit_score double DEFAULT NULL,
  180. PRIMARY KEY (id),
  181. KEY INDEX_PRT_SUBJECTIVE_QUESTION_01 (exam_id),
  182. KEY INDEX_PRT_SUBJECTIVE_QUESTION_02 (course_id),
  183. KEY INDEX_PRT_SUBJECTIVE_QUESTION_03 (paper_id)
  184. )
  185. ENGINE = InnoDB
  186. DEFAULT CHARSET = utf8;
  187. CREATE TABLE ec_prt_template (
  188. id bigint(20) NOT NULL AUTO_INCREMENT,
  189. creation_time datetime DEFAULT NULL,
  190. update_time datetime DEFAULT NULL,
  191. exam_id bigint(20) DEFAULT NULL,
  192. file_name varchar(255) DEFAULT NULL,
  193. file_url varchar(255) DEFAULT NULL,
  194. org_id bigint(20) DEFAULT NULL,
  195. template_type int(11) DEFAULT NULL,
  196. PRIMARY KEY (id),
  197. KEY INDEX_PRT_TEMPLATE_01 (org_id),
  198. KEY INDEX_PRT_TEMPLATE_02 (exam_id)
  199. )
  200. ENGINE = InnoDB
  201. DEFAULT CHARSET = utf8;