xiaoan_user.sql 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : 192.168.0.163_xiaoan_sit
  4. Source Server Type : MySQL
  5. Source Server Version : 50708
  6. Source Host : 192.168.0.163:3306
  7. Source Schema : 4dkankan_v2
  8. Target Server Type : MySQL
  9. Target Server Version : 50708
  10. File Encoding : 65001
  11. Date: 10/04/2020 11:08:19
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for tb_department
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `tb_department`;
  19. CREATE TABLE `tb_department` (
  20. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  21. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  22. `rec_status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态,A:激活,I:禁用',
  23. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  24. `num` int(50) NOT NULL COMMENT '部门代号',
  25. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门名称',
  26. PRIMARY KEY (`id`) USING BTREE
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  28. -- ----------------------------
  29. -- Records of tb_department
  30. -- ----------------------------
  31. INSERT INTO `tb_department` VALUES (1, '2020-02-27 15:57:10', 'A', '2020-04-08 09:25:27', 1, '测试部门');
  32. INSERT INTO `tb_department` VALUES (3, '2020-03-10 15:16:19', 'A', '2020-03-10 15:16:19', 2, '开发部2');
  33. INSERT INTO `tb_department` VALUES (7, '2020-03-17 16:26:19', 'A', '2020-04-01 18:23:54', 3, 'web开发');
  34. INSERT INTO `tb_department` VALUES (13, '2020-04-08 09:25:35', 'A', '2020-04-08 09:25:35', 4, '123');
  35. INSERT INTO `tb_department` VALUES (14, '2020-04-09 17:15:46', 'A', '2020-04-09 17:16:19', 5, '设计部23123123123112312312312311');
  36. -- Table structure for tb_resource
  37. -- ----------------------------
  38. DROP TABLE IF EXISTS `tb_resource`;
  39. CREATE TABLE `tb_resource` (
  40. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  41. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  42. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  43. `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源描述',
  44. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源名称',
  45. `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源地址',
  46. `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '父资源id',
  47. `resource_type` enum('menu','button') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源类型',
  48. `resource_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源key',
  49. `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录的状态,A: 生效,I: 禁用',
  50. `sort` int(6) NULL DEFAULT NULL COMMENT '排序',
  51. PRIMARY KEY (`id`) USING BTREE,
  52. INDEX `FKf5ra2gn0xedeida2op8097sr5`(`parent_id`) USING BTREE,
  53. CONSTRAINT `FKf5ra2gn0xedeida2op8097sr5` FOREIGN KEY (`parent_id`) REFERENCES `tb_resource` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
  54. ) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '资源表' ROW_FORMAT = Dynamic;
  55. -- ----------------------------
  56. -- Records of tb_resource
  57. -- ----------------------------
  58. INSERT INTO `tb_resource` VALUES (1, '2018-05-10 17:18:36', '2018-05-10 17:22:42', NULL, '首页', NULL, NULL, 'menu', 'system', 'A', 1);
  59. INSERT INTO `tb_resource` VALUES (2, '2018-05-11 10:05:41', '2018-12-04 11:22:02', NULL, '部门信息', NULL, NULL, 'menu', 'admin', 'A', 100);
  60. INSERT INTO `tb_resource` VALUES (3, '2018-05-14 14:09:07', '2018-05-14 14:09:10', NULL, '用户管理', NULL, NULL, 'menu', 'admin', 'A', 200);
  61. INSERT INTO `tb_resource` VALUES (4, '2018-05-14 15:08:06', '2018-05-14 15:08:08', NULL, '角色权限', NULL, NULL, 'menu', 'admin', 'A', 300);
  62. INSERT INTO `tb_resource` VALUES (5, '2018-07-27 16:30:51', '2018-07-27 16:30:51', NULL, '场景管理', NULL, NULL, 'menu', 'admin:scene:list', 'I', 400);
  63. INSERT INTO `tb_resource` VALUES (6, '2019-03-29 11:36:57', '2019-03-29 11:36:57', NULL, '数据统计', NULL, NULL, 'menu', 'admin', 'A', 500);
  64. INSERT INTO `tb_resource` VALUES (7, NULL, NULL, NULL, '操作日志', NULL, NULL, 'menu', 'admin', 'A', 600);
  65. INSERT INTO `tb_resource` VALUES (8, NULL, NULL, NULL, '问题反馈', NULL, NULL, 'menu', 'admin:issue:list', 'A', 700);
  66. INSERT INTO `tb_resource` VALUES (9, NULL, NULL, NULL, '个人中心', NULL, NULL, 'menu', 'system', 'A', 800);
  67. INSERT INTO `tb_resource` VALUES (10, NULL, NULL, NULL, '我的场景', NULL, NULL, 'menu', 'admin:scene:list', 'A', 810);
  68. INSERT INTO `tb_resource` VALUES (11, NULL, NULL, NULL, '我的相机', NULL, NULL, 'menu', 'admin:camera:list', 'A', 820);
  69. INSERT INTO `tb_resource` VALUES (12, NULL, NULL, NULL, '部门新增', NULL, 2, 'button', 'admin', 'A', 101);
  70. INSERT INTO `tb_resource` VALUES (13, NULL, NULL, NULL, '部门删除', NULL, 2, 'button', 'admin', 'A', 102);
  71. INSERT INTO `tb_resource` VALUES (14, NULL, NULL, NULL, '用户新增', NULL, 3, 'button', 'admin:user:add', 'A', 201);
  72. INSERT INTO `tb_resource` VALUES (15, NULL, NULL, NULL, '用户编辑', NULL, 3, 'button', 'admin:user:edit', 'A', 202);
  73. INSERT INTO `tb_resource` VALUES (16, NULL, NULL, NULL, '重置密码', NULL, 3, 'button', 'admin:user:resetPass', 'A', 203);
  74. INSERT INTO `tb_resource` VALUES (17, NULL, NULL, NULL, '角色新增', NULL, 4, 'button', 'admin:role:add', 'A', 301);
  75. INSERT INTO `tb_resource` VALUES (18, NULL, NULL, NULL, '角色授权', NULL, 4, 'button', 'admin:role:edit', 'A', 302);
  76. INSERT INTO `tb_resource` VALUES (19, NULL, NULL, NULL, '问题新增', NULL, 8, 'button', 'admin:issue:add', 'A', 701);
  77. INSERT INTO `tb_resource` VALUES (20, NULL, NULL, NULL, '问题回复', NULL, 8, 'button', 'admin:issue:reply', 'A', 702);
  78. INSERT INTO `tb_resource` VALUES (21, NULL, NULL, NULL, '问题删除', NULL, 8, 'button', 'admin:issue:remove', 'A', 703);
  79. INSERT INTO `tb_resource` VALUES (22, NULL, NULL, NULL, '场景删除', NULL, 10, 'button', 'admin:scene:remove', 'A', 811);
  80. INSERT INTO `tb_resource` VALUES (23, NULL, NULL, NULL, '场景编辑', NULL, 10, 'button', 'admin:scene:edit', 'A', 812);
  81. INSERT INTO `tb_resource` VALUES (24, NULL, NULL, NULL, '新增相机', NULL, 11, 'button', 'admin:camera:add', 'A', 821);
  82. INSERT INTO `tb_resource` VALUES (25, NULL, NULL, NULL, '角色删除', NULL, 4, 'button', 'admin:role:remove', 'A', 303);
  83. -- ----------------------------
  84. -- Table structure for tb_role
  85. -- ----------------------------
  86. DROP TABLE IF EXISTS `tb_role`;
  87. CREATE TABLE `tb_role` (
  88. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  89. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  90. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  91. `role_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色描述',
  92. `role_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名',
  93. `role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色key',
  94. `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录的状态,A: 生效,I: 禁用',
  95. `sort` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  96. PRIMARY KEY (`id`) USING BTREE
  97. ) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;
  98. -- ----------------------------
  99. -- Records of tb_role
  100. -- ----------------------------
  101. INSERT INTO `tb_role` VALUES (1, '2018-05-11 10:02:27', '2020-04-02 11:44:35', '所有权限', '超级管理员', 'admin', 'A', '1');
  102. INSERT INTO `tb_role` VALUES (2, '2019-11-12 09:10:25', '2020-04-09 14:04:38', '指定模块增删改', '普通用户', 'normal', 'A', '2');
  103. INSERT INTO `tb_role` VALUES (6, '2020-04-02 17:15:04', '2020-04-09 14:02:54', '', 'testRole', 'normal', 'A', NULL);
  104. INSERT INTO `tb_role` VALUES (8, '2020-04-03 12:21:13', '2020-04-09 14:04:15', '', 'AAA', 'normal', 'A', NULL);
  105. INSERT INTO `tb_role` VALUES (9, '2020-04-07 17:07:38', '2020-04-09 18:26:48', '具备所有权限', 'test超管账户', 'normal', 'A', NULL);
  106. INSERT INTO `tb_role` VALUES (10, '2020-04-07 17:09:41', '2020-04-09 18:26:39', '场景编辑 管理 ', 'test普通用户', 'normal', 'A', NULL);
  107. INSERT INTO `tb_role` VALUES (11, '2020-04-08 09:45:07', '2020-04-08 09:45:07', '32231123', '只有首页', 'normal', 'A', NULL);
  108. -- ----------------------------
  109. -- Table structure for tb_role_resource
  110. -- ----------------------------
  111. DROP TABLE IF EXISTS `tb_role_resource`;
  112. CREATE TABLE `tb_role_resource` (
  113. `role_id` bigint(20) NOT NULL COMMENT '角色表id',
  114. `resource_id` bigint(20) NOT NULL COMMENT '资源表id',
  115. PRIMARY KEY (`role_id`, `resource_id`) USING BTREE,
  116. INDEX `FK868kc8iic48ilv5npa80ut6qo`(`resource_id`) USING BTREE,
  117. CONSTRAINT `tb_role_resource_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `tb_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  118. CONSTRAINT `tb_role_resource_ibfk_2` FOREIGN KEY (`resource_id`) REFERENCES `tb_resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  119. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色资源关系表' ROW_FORMAT = Dynamic;
  120. -- ----------------------------
  121. -- Records of tb_role_resource
  122. -- ----------------------------
  123. INSERT INTO `tb_role_resource` VALUES (1, 1);
  124. INSERT INTO `tb_role_resource` VALUES (2, 1);
  125. INSERT INTO `tb_role_resource` VALUES (8, 1);
  126. INSERT INTO `tb_role_resource` VALUES (9, 1);
  127. INSERT INTO `tb_role_resource` VALUES (10, 1);
  128. INSERT INTO `tb_role_resource` VALUES (11, 1);
  129. INSERT INTO `tb_role_resource` VALUES (1, 2);
  130. INSERT INTO `tb_role_resource` VALUES (1, 3);
  131. INSERT INTO `tb_role_resource` VALUES (1, 4);
  132. INSERT INTO `tb_role_resource` VALUES (1, 6);
  133. INSERT INTO `tb_role_resource` VALUES (1, 7);
  134. INSERT INTO `tb_role_resource` VALUES (1, 8);
  135. INSERT INTO `tb_role_resource` VALUES (2, 8);
  136. INSERT INTO `tb_role_resource` VALUES (6, 8);
  137. INSERT INTO `tb_role_resource` VALUES (9, 8);
  138. INSERT INTO `tb_role_resource` VALUES (10, 8);
  139. INSERT INTO `tb_role_resource` VALUES (1, 9);
  140. INSERT INTO `tb_role_resource` VALUES (2, 9);
  141. INSERT INTO `tb_role_resource` VALUES (6, 9);
  142. INSERT INTO `tb_role_resource` VALUES (8, 9);
  143. INSERT INTO `tb_role_resource` VALUES (9, 9);
  144. INSERT INTO `tb_role_resource` VALUES (10, 9);
  145. INSERT INTO `tb_role_resource` VALUES (1, 10);
  146. INSERT INTO `tb_role_resource` VALUES (2, 10);
  147. INSERT INTO `tb_role_resource` VALUES (6, 10);
  148. INSERT INTO `tb_role_resource` VALUES (8, 10);
  149. INSERT INTO `tb_role_resource` VALUES (9, 10);
  150. INSERT INTO `tb_role_resource` VALUES (10, 10);
  151. INSERT INTO `tb_role_resource` VALUES (1, 11);
  152. INSERT INTO `tb_role_resource` VALUES (2, 11);
  153. INSERT INTO `tb_role_resource` VALUES (6, 11);
  154. INSERT INTO `tb_role_resource` VALUES (8, 11);
  155. INSERT INTO `tb_role_resource` VALUES (9, 11);
  156. INSERT INTO `tb_role_resource` VALUES (10, 11);
  157. INSERT INTO `tb_role_resource` VALUES (1, 12);
  158. INSERT INTO `tb_role_resource` VALUES (1, 13);
  159. INSERT INTO `tb_role_resource` VALUES (1, 14);
  160. INSERT INTO `tb_role_resource` VALUES (1, 15);
  161. INSERT INTO `tb_role_resource` VALUES (1, 16);
  162. INSERT INTO `tb_role_resource` VALUES (1, 17);
  163. INSERT INTO `tb_role_resource` VALUES (1, 18);
  164. INSERT INTO `tb_role_resource` VALUES (1, 19);
  165. INSERT INTO `tb_role_resource` VALUES (2, 19);
  166. INSERT INTO `tb_role_resource` VALUES (6, 19);
  167. INSERT INTO `tb_role_resource` VALUES (9, 19);
  168. INSERT INTO `tb_role_resource` VALUES (10, 19);
  169. INSERT INTO `tb_role_resource` VALUES (1, 20);
  170. INSERT INTO `tb_role_resource` VALUES (6, 20);
  171. INSERT INTO `tb_role_resource` VALUES (9, 20);
  172. INSERT INTO `tb_role_resource` VALUES (10, 20);
  173. INSERT INTO `tb_role_resource` VALUES (1, 21);
  174. INSERT INTO `tb_role_resource` VALUES (6, 21);
  175. INSERT INTO `tb_role_resource` VALUES (9, 21);
  176. INSERT INTO `tb_role_resource` VALUES (10, 21);
  177. INSERT INTO `tb_role_resource` VALUES (1, 22);
  178. INSERT INTO `tb_role_resource` VALUES (2, 22);
  179. INSERT INTO `tb_role_resource` VALUES (6, 22);
  180. INSERT INTO `tb_role_resource` VALUES (8, 22);
  181. INSERT INTO `tb_role_resource` VALUES (9, 22);
  182. INSERT INTO `tb_role_resource` VALUES (10, 22);
  183. INSERT INTO `tb_role_resource` VALUES (1, 23);
  184. INSERT INTO `tb_role_resource` VALUES (2, 23);
  185. INSERT INTO `tb_role_resource` VALUES (6, 23);
  186. INSERT INTO `tb_role_resource` VALUES (8, 23);
  187. INSERT INTO `tb_role_resource` VALUES (9, 23);
  188. INSERT INTO `tb_role_resource` VALUES (10, 23);
  189. INSERT INTO `tb_role_resource` VALUES (1, 24);
  190. INSERT INTO `tb_role_resource` VALUES (2, 24);
  191. INSERT INTO `tb_role_resource` VALUES (6, 24);
  192. INSERT INTO `tb_role_resource` VALUES (8, 24);
  193. INSERT INTO `tb_role_resource` VALUES (9, 24);
  194. INSERT INTO `tb_role_resource` VALUES (10, 24);
  195. INSERT INTO `tb_role_resource` VALUES (1, 25);
  196. -- ----------------------------
  197. -- Table structure for tb_user
  198. -- ----------------------------
  199. DROP TABLE IF EXISTS `tb_user`;
  200. CREATE TABLE `tb_user` (
  201. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  202. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  203. `rec_status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态,0:激活,1:禁用',
  204. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  205. `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录密码',
  206. `real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
  207. `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号,用户号',
  208. `department_id` bigint(20) NULL DEFAULT NULL COMMENT '部门id',
  209. `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  210. `user_num` int(255) NULL DEFAULT NULL COMMENT '用户代号',
  211. `sex` tinyint(4) NULL DEFAULT NULL COMMENT '性别, 0:男, 1:女',
  212. `status` int(11) NULL DEFAULT NULL,
  213. `view_count` int(11) NULL DEFAULT 0 COMMENT '登录次数',
  214. `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
  215. PRIMARY KEY (`id`) USING BTREE
  216. ) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
  217. -- ----------------------------
  218. -- Records of tb_user
  219. -- ----------------------------
  220. INSERT INTO `tb_user` VALUES (1, '2020-03-17 15:19:23', 'A', '2020-04-10 10:27:34', 'ebbbf6e8b86a8711ed006913d3b908dc', '伟浩(超级管理员)', 'owen', 1, '38@qq.com', 1, 0, 0, 102, '15015981234');
  221. INSERT INTO `tb_user` VALUES (2, '2020-03-25 14:51:00', 'A', '2020-04-09 17:18:32', '5ceaedeb368e10b4', 'zhiguang', 'zhiguang', 3, '38@qq.com', 2, 0, 0, 25, '13700001234');
  222. INSERT INTO `tb_user` VALUES (3, '2020-04-01 14:04:26', 'A', '2020-04-09 17:24:11', 'e7e2fc8bd858494a2fe39df56f9fc061', '13138102395', '13138102395', 1, '38@qq.com', 3, 0, 0, 13, '13700001234');
  223. INSERT INTO `tb_user` VALUES (4, '2020-04-01 14:04:35', 'A', '2020-04-09 15:18:41', 'c9b2440b2e0bd0ca259e323b5ed1ea8c', '13112311178', '13112311178', 1, '38@qq.com', 4, 0, 0, 84, '13700001234');
  224. INSERT INTO `tb_user` VALUES (5, '2020-04-01 14:54:31', 'A', '2020-04-09 14:11:56', '015bafd4fd53b9173ff70515044074a3', '超级管理员', '15088889999', 1, '38@qq.com', 7, 0, 0, 2, '15088889999');
  225. INSERT INTO `tb_user` VALUES (42, '2020-04-01 15:28:26', 'A', '2020-04-09 18:27:06', 'ff73953c9e1380bba421cb7d85b5b2c7', '13112311179', '13112311179', 1, '123@qq.com', 5, 1, 0, 20, '13112311179');
  226. INSERT INTO `tb_user` VALUES (43, '2020-04-01 15:58:36', 'A', '2020-04-01 16:05:43', 'ad8b100332a73b080450f7a48e0dfb38', '18826490500', '18826490500', 3, '111@qq.com', 6, 0, 0, 1, '18826490500');
  227. INSERT INTO `tb_user` VALUES (46, '2020-04-02 17:15:53', 'A', '2020-04-09 14:55:07', 'f6f591035e3d3e28711dc8c74c4b6cb2', 'weihao', 'hao', 7, '38@qq.com', 8, 0, 0, 23, '15012345678');
  228. INSERT INTO `tb_user` VALUES (51, '2020-04-09 17:19:41', 'A', '2020-04-09 17:27:23', '61e026a8939e8da1a93a47ac4227edc7', '123123311231231', 'test', 14, 'qqweq@qq.com', 9, 0, 0, 0, '13112311176');
  229. -- ----------------------------
  230. -- Table structure for tb_user_role
  231. -- ----------------------------
  232. DROP TABLE IF EXISTS `tb_user_role`;
  233. CREATE TABLE `tb_user_role` (
  234. `user_id` bigint(20) NOT NULL COMMENT '用户表id',
  235. `role_id` bigint(20) NOT NULL COMMENT '角色表id',
  236. PRIMARY KEY (`user_id`, `role_id`) USING BTREE,
  237. INDEX `role_id`(`role_id`) USING BTREE,
  238. CONSTRAINT `tb_user_role_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `tb_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  239. CONSTRAINT `tb_user_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `tb_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  240. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户角色关系表' ROW_FORMAT = Dynamic;
  241. -- ----------------------------
  242. -- Records of tb_user_role
  243. -- ----------------------------
  244. INSERT INTO `tb_user_role` VALUES (1, 1);
  245. INSERT INTO `tb_user_role` VALUES (2, 1);
  246. INSERT INTO `tb_user_role` VALUES (5, 1);
  247. INSERT INTO `tb_user_role` VALUES (43, 2);
  248. INSERT INTO `tb_user_role` VALUES (51, 2);
  249. INSERT INTO `tb_user_role` VALUES (46, 6);
  250. INSERT INTO `tb_user_role` VALUES (3, 9);
  251. INSERT INTO `tb_user_role` VALUES (4, 9);
  252. INSERT INTO `tb_user_role` VALUES (42, 10);
  253. SET FOREIGN_KEY_CHECKS = 1;