xzs-mysql.sql 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for t_exam_paper
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `t_exam_paper`;
  7. CREATE TABLE `t_exam_paper` (
  8. `id` int NOT NULL AUTO_INCREMENT,
  9. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  10. `subject_id` int NULL DEFAULT NULL,
  11. `paper_type` int NULL DEFAULT NULL,
  12. `grade_level` int NULL DEFAULT NULL,
  13. `score` int NULL DEFAULT NULL,
  14. `question_count` int NULL DEFAULT NULL,
  15. `suggest_time` int NULL DEFAULT NULL,
  16. `limit_start_time` datetime NULL DEFAULT NULL,
  17. `limit_end_time` datetime NULL DEFAULT NULL,
  18. `frame_text_content_id` int NULL DEFAULT NULL,
  19. `create_user` int NULL DEFAULT NULL,
  20. `create_time` datetime NULL DEFAULT NULL,
  21. `deleted` bit(1) NULL DEFAULT NULL,
  22. `task_exam_id` int NULL DEFAULT NULL,
  23. PRIMARY KEY (`id`) USING BTREE
  24. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  25. -- ----------------------------
  26. -- Records of t_exam_paper
  27. -- ----------------------------
  28. -- ----------------------------
  29. -- Table structure for t_exam_paper_answer
  30. -- ----------------------------
  31. DROP TABLE IF EXISTS `t_exam_paper_answer`;
  32. CREATE TABLE `t_exam_paper_answer` (
  33. `id` int NOT NULL AUTO_INCREMENT,
  34. `exam_paper_id` int NULL DEFAULT NULL,
  35. `paper_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  36. `paper_type` int NULL DEFAULT NULL,
  37. `subject_id` int NULL DEFAULT NULL,
  38. `system_score` int NULL DEFAULT NULL,
  39. `user_score` int NULL DEFAULT NULL,
  40. `paper_score` int NULL DEFAULT NULL,
  41. `question_correct` int NULL DEFAULT NULL,
  42. `question_count` int NULL DEFAULT NULL,
  43. `do_time` int NULL DEFAULT NULL,
  44. `status` int NULL DEFAULT NULL,
  45. `create_user` int NULL DEFAULT NULL,
  46. `create_time` datetime NULL DEFAULT NULL,
  47. `task_exam_id` int NULL DEFAULT NULL,
  48. PRIMARY KEY (`id`) USING BTREE
  49. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  50. -- ----------------------------
  51. -- Records of t_exam_paper_answer
  52. -- ----------------------------
  53. -- ----------------------------
  54. -- Table structure for t_exam_paper_question_customer_answer
  55. -- ----------------------------
  56. DROP TABLE IF EXISTS `t_exam_paper_question_customer_answer`;
  57. CREATE TABLE `t_exam_paper_question_customer_answer` (
  58. `id` int NOT NULL AUTO_INCREMENT,
  59. `question_id` int NULL DEFAULT NULL,
  60. `exam_paper_id` int NULL DEFAULT NULL,
  61. `exam_paper_answer_id` int NULL DEFAULT NULL,
  62. `question_type` int NULL DEFAULT NULL,
  63. `subject_id` int NULL DEFAULT NULL,
  64. `customer_score` int NULL DEFAULT NULL,
  65. `question_score` int NULL DEFAULT NULL,
  66. `question_text_content_id` int NULL DEFAULT NULL,
  67. `answer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  68. `text_content_id` int NULL DEFAULT NULL,
  69. `do_right` bit(1) NULL DEFAULT NULL,
  70. `create_user` int NULL DEFAULT NULL,
  71. `create_time` datetime NULL DEFAULT NULL,
  72. `item_order` int NULL DEFAULT NULL,
  73. PRIMARY KEY (`id`) USING BTREE
  74. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  75. -- ----------------------------
  76. -- Records of t_exam_paper_question_customer_answer
  77. -- ----------------------------
  78. -- ----------------------------
  79. -- Table structure for t_message
  80. -- ----------------------------
  81. DROP TABLE IF EXISTS `t_message`;
  82. CREATE TABLE `t_message` (
  83. `id` int NOT NULL AUTO_INCREMENT,
  84. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  85. `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  86. `create_time` datetime NULL DEFAULT NULL,
  87. `send_user_id` int NULL DEFAULT NULL,
  88. `send_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  89. `send_real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  90. `receive_user_count` int NULL DEFAULT NULL,
  91. `read_count` int NULL DEFAULT NULL,
  92. PRIMARY KEY (`id`) USING BTREE
  93. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  94. -- ----------------------------
  95. -- Records of t_message
  96. -- ----------------------------
  97. -- ----------------------------
  98. -- Table structure for t_message_user
  99. -- ----------------------------
  100. DROP TABLE IF EXISTS `t_message_user`;
  101. CREATE TABLE `t_message_user` (
  102. `id` int NOT NULL AUTO_INCREMENT,
  103. `message_id` int NULL DEFAULT NULL,
  104. `receive_user_id` int NULL DEFAULT NULL,
  105. `receive_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  106. `receive_real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  107. `readed` bit(1) NULL DEFAULT NULL,
  108. `create_time` datetime NULL DEFAULT NULL,
  109. `read_time` datetime NULL DEFAULT NULL,
  110. PRIMARY KEY (`id`) USING BTREE
  111. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  112. -- ----------------------------
  113. -- Records of t_message_user
  114. -- ----------------------------
  115. -- ----------------------------
  116. -- Table structure for t_question
  117. -- ----------------------------
  118. DROP TABLE IF EXISTS `t_question`;
  119. CREATE TABLE `t_question` (
  120. `id` int NOT NULL AUTO_INCREMENT,
  121. `question_type` int NULL DEFAULT NULL,
  122. `subject_id` int NULL DEFAULT NULL,
  123. `score` int NULL DEFAULT NULL,
  124. `grade_level` int NULL DEFAULT NULL,
  125. `difficult` int NULL DEFAULT NULL,
  126. `correct` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  127. `info_text_content_id` int NULL DEFAULT NULL,
  128. `create_user` int NULL DEFAULT NULL,
  129. `status` int NULL DEFAULT NULL,
  130. `create_time` datetime NULL DEFAULT NULL,
  131. `deleted` bit(1) NULL DEFAULT NULL,
  132. PRIMARY KEY (`id`) USING BTREE
  133. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  134. -- ----------------------------
  135. -- Records of t_question
  136. -- ----------------------------
  137. -- ----------------------------
  138. -- Table structure for t_subject
  139. -- ----------------------------
  140. DROP TABLE IF EXISTS `t_subject`;
  141. CREATE TABLE `t_subject` (
  142. `id` int NOT NULL AUTO_INCREMENT,
  143. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  144. `level` int NULL DEFAULT NULL,
  145. `level_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  146. `item_order` int NULL DEFAULT NULL,
  147. `deleted` bit(1) NULL DEFAULT NULL,
  148. PRIMARY KEY (`id`) USING BTREE
  149. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  150. -- ----------------------------
  151. -- Records of t_subject
  152. -- ----------------------------
  153. -- ----------------------------
  154. -- Table structure for t_task_exam
  155. -- ----------------------------
  156. DROP TABLE IF EXISTS `t_task_exam`;
  157. CREATE TABLE `t_task_exam` (
  158. `id` int NOT NULL AUTO_INCREMENT,
  159. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  160. `grade_level` int NULL DEFAULT NULL,
  161. `frame_text_content_id` int NULL DEFAULT NULL,
  162. `create_user` int NULL DEFAULT NULL,
  163. `create_time` datetime NULL DEFAULT NULL,
  164. `deleted` bit(1) NULL DEFAULT NULL,
  165. `create_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  166. PRIMARY KEY (`id`) USING BTREE
  167. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  168. -- ----------------------------
  169. -- Records of t_task_exam
  170. -- ----------------------------
  171. -- ----------------------------
  172. -- Table structure for t_task_exam_customer_answer
  173. -- ----------------------------
  174. DROP TABLE IF EXISTS `t_task_exam_customer_answer`;
  175. CREATE TABLE `t_task_exam_customer_answer` (
  176. `id` int NOT NULL AUTO_INCREMENT,
  177. `task_exam_id` int NULL DEFAULT NULL,
  178. `create_user` int NULL DEFAULT NULL,
  179. `create_time` datetime NULL DEFAULT NULL,
  180. `text_content_id` int NULL DEFAULT NULL,
  181. PRIMARY KEY (`id`) USING BTREE
  182. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  183. -- ----------------------------
  184. -- Records of t_task_exam_customer_answer
  185. -- ----------------------------
  186. -- ----------------------------
  187. -- Table structure for t_text_content
  188. -- ----------------------------
  189. DROP TABLE IF EXISTS `t_text_content`;
  190. CREATE TABLE `t_text_content` (
  191. `id` int NOT NULL AUTO_INCREMENT,
  192. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  193. `create_time` datetime NULL DEFAULT NULL,
  194. PRIMARY KEY (`id`) USING BTREE
  195. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  196. -- ----------------------------
  197. -- Records of t_text_content
  198. -- ----------------------------
  199. -- ----------------------------
  200. -- Table structure for t_user
  201. -- ----------------------------
  202. DROP TABLE IF EXISTS `t_user`;
  203. CREATE TABLE `t_user` (
  204. `id` int NOT NULL AUTO_INCREMENT,
  205. `user_uuid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  206. `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  207. `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  208. `real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  209. `age` int NULL DEFAULT NULL,
  210. `sex` int NULL DEFAULT NULL,
  211. `birth_day` datetime NULL DEFAULT NULL,
  212. `user_level` int NULL DEFAULT NULL,
  213. `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  214. `role` int NULL DEFAULT NULL,
  215. `status` int NULL DEFAULT NULL,
  216. `image_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  217. `create_time` datetime NULL DEFAULT NULL,
  218. `modify_time` datetime NULL DEFAULT NULL,
  219. `last_active_time` datetime NULL DEFAULT NULL,
  220. `deleted` bit(1) NULL DEFAULT NULL,
  221. `wx_open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  222. PRIMARY KEY (`id`) USING BTREE
  223. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  224. -- ----------------------------
  225. -- Records of t_user
  226. -- ----------------------------
  227. INSERT INTO `t_user` VALUES (1, 'd2d29da2-dcb3-4013-b874-727626236f47', 'student', 'D1AGFL+Gx37t0NPG4d6biYP5Z31cNbwhK5w1lUeiHB2zagqbk8efYfSjYoh1Z/j1dkiRjHU+b0EpwzCh8IGsksJjzD65ci5LsnodQVf4Uj6D3pwoscXGqmkjjpzvSJbx42swwNTA+QoDU8YLo7JhtbUK2X0qCjFGpd+8eJ5BGvk=', '学生', 18, 1, '2019-09-01 16:00:00', 1, '19171171610', 1, 1, 'https://www.mindskip.net:9008/image/ba607a75-83ba-4530-8e23-660b72dc4953/头像.jpg', '2019-09-07 18:55:02', '2020-02-04 08:26:54', NULL, b'0', NULL);
  228. INSERT INTO `t_user` VALUES (2, '52045f5f-a13f-4ccc-93dd-f7ee8270ad4c', 'admin', 'D1AGFL+Gx37t0NPG4d6biYP5Z31cNbwhK5w1lUeiHB2zagqbk8efYfSjYoh1Z/j1dkiRjHU+b0EpwzCh8IGsksJjzD65ci5LsnodQVf4Uj6D3pwoscXGqmkjjpzvSJbx42swwNTA+QoDU8YLo7JhtbUK2X0qCjFGpd+8eJ5BGvk=', '管理员', 30, 1, '2019-09-07 18:56:07', NULL, NULL, 3, 1, NULL, '2019-09-07 18:56:21', NULL, NULL, b'0', NULL);
  229. -- ----------------------------
  230. -- Table structure for t_user_event_log
  231. -- ----------------------------
  232. DROP TABLE IF EXISTS `t_user_event_log`;
  233. CREATE TABLE `t_user_event_log` (
  234. `id` int NOT NULL AUTO_INCREMENT,
  235. `user_id` int NULL DEFAULT NULL,
  236. `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  237. `real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  238. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  239. `create_time` datetime NULL DEFAULT NULL,
  240. PRIMARY KEY (`id`) USING BTREE
  241. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  242. -- ----------------------------
  243. -- Records of t_user_event_log
  244. -- ----------------------------
  245. -- ----------------------------
  246. -- Table structure for t_user_token
  247. -- ----------------------------
  248. DROP TABLE IF EXISTS `t_user_token`;
  249. CREATE TABLE `t_user_token` (
  250. `id` int NOT NULL AUTO_INCREMENT,
  251. `token` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  252. `user_id` int NULL DEFAULT NULL,
  253. `wx_open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  254. `create_time` datetime NULL DEFAULT NULL,
  255. `end_time` datetime NULL DEFAULT NULL,
  256. `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  257. PRIMARY KEY (`id`) USING BTREE
  258. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
  259. -- ----------------------------
  260. -- Records of t_user_token
  261. -- ----------------------------
  262. SET FOREIGN_KEY_CHECKS = 1;