default.sql 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : hxh
  4. Source Server Type : MySQL
  5. Source Server Version : 80017
  6. Source Host : localhost:3306
  7. Source Schema : base-in-back-end
  8. Target Server Type : MySQL
  9. Target Server Version : 80017
  10. File Encoding : 65001
  11. Date: 23/09/2020 20:46:33
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for paper
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `paper`;
  19. CREATE TABLE `paper` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '试卷名',
  22. `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '试卷学科',
  23. `groupName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '年级分类',
  24. `gradeName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '年级',
  25. `type` int(11) NULL DEFAULT NULL COMMENT '试卷类型(1为练习,2为考试)',
  26. PRIMARY KEY (`id`) USING BTREE
  27. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  28. -- ----------------------------
  29. -- Records of paper
  30. -- ----------------------------
  31. INSERT INTO `paper` VALUES (1, '数学1', '数学', '小学', '一年级', 1);
  32. INSERT INTO `paper` VALUES (2, '1', '1', '1', '1', 1);
  33. INSERT INTO `paper` VALUES (3, '2', '2', '3', '2', 2);
  34. INSERT INTO `paper` VALUES (4, '3', '2', '2', '2', 2);
  35. INSERT INTO `paper` VALUES (5, '5', '55', '5', '5', 5);
  36. INSERT INTO `paper` VALUES (6, 'sss', '数学', '小学', '一年级', 1);
  37. -- ----------------------------
  38. -- Table structure for paper_item
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `paper_item`;
  41. CREATE TABLE `paper_item` (
  42. `id` int(11) NOT NULL AUTO_INCREMENT,
  43. `pid` int(11) NULL DEFAULT NULL COMMENT 'paper主键',
  44. `sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  45. PRIMARY KEY (`id`) USING BTREE,
  46. INDEX `paperId外加按`(`pid`) USING BTREE,
  47. CONSTRAINT `paperId外加按` FOREIGN KEY (`pid`) REFERENCES `paper` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
  48. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  49. -- ----------------------------
  50. -- Records of paper_item
  51. -- ----------------------------
  52. INSERT INTO `paper_item` VALUES (1, 1, '755191767824859136');
  53. INSERT INTO `paper_item` VALUES (2, 1, '755116421201002496');
  54. INSERT INTO `paper_item` VALUES (3, 1, '746404364570066944');
  55. INSERT INTO `paper_item` VALUES (4, 1, '746404343267196928');
  56. INSERT INTO `paper_item` VALUES (5, 1, '746404354461794304');
  57. INSERT INTO `paper_item` VALUES (6, 1, '746404357817237504');
  58. INSERT INTO `paper_item` VALUES (7, 1, '746404370169462784');
  59. -- ----------------------------
  60. -- Table structure for user
  61. -- ----------------------------
  62. DROP TABLE IF EXISTS `user`;
  63. CREATE TABLE `user` (
  64. `id` int(11) NOT NULL AUTO_INCREMENT,
  65. `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  66. `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  67. `nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  68. PRIMARY KEY (`id`) USING BTREE,
  69. UNIQUE INDEX `账号唯一`(`username`) USING BTREE
  70. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  71. -- ----------------------------
  72. -- Records of user
  73. -- ----------------------------
  74. INSERT INTO `user` VALUES (1, 'xiaoming', '123456', '小明');
  75. INSERT INTO `user` VALUES (2, 'xiaochen', '2121', '2323');
  76. -- ----------------------------
  77. -- Table structure for wrongbook
  78. -- ----------------------------
  79. DROP TABLE IF EXISTS `wrongbook`;
  80. CREATE TABLE `wrongbook` (
  81. `groupName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  82. `gradeName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  83. `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  84. `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  85. `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  86. `uid` int(11) NOT NULL,
  87. PRIMARY KEY (`groupName`, `gradeName`, `subject`, `uid`) USING BTREE,
  88. INDEX `user外键`(`uid`) USING BTREE,
  89. INDEX `groupName`(`groupName`) USING BTREE,
  90. INDEX `gradeName`(`gradeName`) USING BTREE,
  91. INDEX `subject`(`subject`) USING BTREE,
  92. CONSTRAINT `user外键` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
  93. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  94. -- ----------------------------
  95. -- Records of wrongbook
  96. -- ----------------------------
  97. INSERT INTO `wrongbook` VALUES ('小学', '一年级', '数学', '数学1', '记录错题', 1);
  98. INSERT INTO `wrongbook` VALUES ('小学', '一年级', '英语', '数学1', '记录错题', 1);
  99. INSERT INTO `wrongbook` VALUES ('小学', '一年级', '语文', '数学1', '记录错题', 1);
  100. INSERT INTO `wrongbook` VALUES ('小学', '三年级', '数学', '数学1', '记录错题', 1);
  101. INSERT INTO `wrongbook` VALUES ('小学', '三年级', '英语', '数学1', '记录错题', 1);
  102. INSERT INTO `wrongbook` VALUES ('小学', '三年级', '语文', '数学1', '记录错题', 1);
  103. INSERT INTO `wrongbook` VALUES ('小学', '二年级', '数学', '数学1', '记录错题', 1);
  104. INSERT INTO `wrongbook` VALUES ('小学', '二年级', '英语', '数学1', '记录错题', 1);
  105. INSERT INTO `wrongbook` VALUES ('小学', '二年级', '语文', '数学1', '记录错题', 1);
  106. INSERT INTO `wrongbook` VALUES ('小学', '五年级', '数学', '数学1', '记录错题', 1);
  107. INSERT INTO `wrongbook` VALUES ('小学', '五年级', '英语', '数学1', '记录错题', 1);
  108. INSERT INTO `wrongbook` VALUES ('小学', '五年级', '语文', '数学1', '记录错题', 1);
  109. INSERT INTO `wrongbook` VALUES ('小学', '六年级', '数学', '数学1', '记录错题', 1);
  110. INSERT INTO `wrongbook` VALUES ('小学', '六年级', '英语', '数学1', '记录错题', 1);
  111. INSERT INTO `wrongbook` VALUES ('小学', '六年级', '语文', '数学1', '记录错题', 1);
  112. INSERT INTO `wrongbook` VALUES ('小学', '四年级', '数学', '数学1', '记录错题', 1);
  113. INSERT INTO `wrongbook` VALUES ('小学', '四年级', '英语', '数学1', '记录错题', 1);
  114. INSERT INTO `wrongbook` VALUES ('小学', '四年级', '语文', '数学1', '记录错题', 1);
  115. -- ----------------------------
  116. -- Table structure for wrongbook_item
  117. -- ----------------------------
  118. DROP TABLE IF EXISTS `wrongbook_item`;
  119. CREATE TABLE `wrongbook_item` (
  120. `id` int(11) NOT NULL AUTO_INCREMENT,
  121. `sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  122. `groupName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  123. `gradeName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  124. `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  125. `uid` int(11) NULL DEFAULT NULL,
  126. PRIMARY KEY (`id`) USING BTREE,
  127. INDEX `groupName外键`(`groupName`) USING BTREE,
  128. INDEX `gradeName外键`(`gradeName`) USING BTREE,
  129. INDEX `subject外键`(`subject`) USING BTREE,
  130. INDEX `uid外键`(`uid`) USING BTREE,
  131. CONSTRAINT `gradeName外键` FOREIGN KEY (`gradeName`) REFERENCES `wrongbook` (`gradeName`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  132. CONSTRAINT `groupName外键` FOREIGN KEY (`groupName`) REFERENCES `wrongbook` (`groupName`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  133. CONSTRAINT `subject外键` FOREIGN KEY (`subject`) REFERENCES `wrongbook` (`subject`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  134. CONSTRAINT `uid外键` FOREIGN KEY (`uid`) REFERENCES `wrongbook` (`uid`) ON DELETE RESTRICT ON UPDATE RESTRICT
  135. ) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  136. -- ----------------------------
  137. -- Records of wrongbook_item
  138. -- ----------------------------
  139. INSERT INTO `wrongbook_item` VALUES (1, '755191767824859136', '小学', '一年级', '数学', 1);
  140. INSERT INTO `wrongbook_item` VALUES (12, '755116420047568896', '小学', '一年级', '数学', 1);
  141. SET FOREIGN_KEY_CHECKS = 1;