99c10f82f773d83b838ea6ac68ac06852d3e6056.svn-base 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 192.168.100.50
  4. Source Server Version : 50722
  5. Source Host : 192.168.100.50:3306
  6. Source Database : go
  7. Target Server Type : MYSQL
  8. Target Server Version : 50722
  9. File Encoding : 65001
  10. Date: 2019-02-20 14:03:31
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for menu
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `menu`;
  17. CREATE TABLE `menu` (
  18. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  19. `name` varchar(50) DEFAULT '' COMMENT '名字',
  20. `path` varchar(50) DEFAULT '' COMMENT '访问路径',
  21. `method` varchar(50) DEFAULT '' COMMENT '资源请求方式',
  22. `created_on` int(11) unsigned DEFAULT NULL COMMENT '创建时间',
  23. `modified_on` int(11) unsigned DEFAULT NULL COMMENT '更新时间',
  24. `deleted_on` int(11) unsigned DEFAULT '0' COMMENT '删除时间戳',
  25. PRIMARY KEY (`id`)
  26. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
  27. -- ----------------------------
  28. -- Records of menu
  29. -- ----------------------------
  30. INSERT INTO `menu` VALUES ('1', '查询所有菜单', '/api/v1/menus', 'GET', null, null, '0');
  31. INSERT INTO `menu` VALUES ('2', '查询单个菜单', '/api/v1/menus/:id', 'GET', null, null, '0');
  32. INSERT INTO `menu` VALUES ('3', '创建单个菜单', '/api/v1/menus', 'POST', null, null, '0');
  33. INSERT INTO `menu` VALUES ('4', '更新单个菜单', '/api/v1/menus/:id', 'PUT', null, null, '0');
  34. INSERT INTO `menu` VALUES ('5', '删除单个菜单', '/api/v1/menus/:id', 'DELETE', null, null, '0');
  35. INSERT INTO `menu` VALUES ('6', '查询所有用户', '/api/v1/users', 'GET', null, null, '0');
  36. INSERT INTO `menu` VALUES ('7', '查询单个用户', '/api/v1/users/:id', 'GET', null, null, '0');
  37. INSERT INTO `menu` VALUES ('8', '创建单个用户', '/api/v1/users', 'POST', null, null, '0');
  38. INSERT INTO `menu` VALUES ('9', '更新单个用户', '/api/v1/users/:id', 'PUT', null, null, '0');
  39. INSERT INTO `menu` VALUES ('10', '删除单个用户', '/api/v1/users/:id', 'DELETE', null, null, '0');
  40. INSERT INTO `menu` VALUES ('11', '查询所有角色', '/api/v1/roles', 'GET', null, null, '0');
  41. INSERT INTO `menu` VALUES ('12', '查询单个角色', '/api/v1/roles/:id', 'GET', null, null, '0');
  42. INSERT INTO `menu` VALUES ('13', '创建单个角色', '/api/v1/roles', 'POST', null, null, '0');
  43. INSERT INTO `menu` VALUES ('14', '更新单个角色', '/api/v1/roles/:id', 'PUT', null, null, '0');
  44. INSERT INTO `menu` VALUES ('15', '删除单个角色', '/api/v1/roles/:id', 'DELETE', null, null, '0');
  45. INSERT INTO `menu` VALUES ('16', '登录', '/auth', 'GET', null, null, '0');
  46. -- ----------------------------
  47. -- Table structure for role
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `role`;
  50. CREATE TABLE `role` (
  51. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  52. `name` varchar(50) DEFAULT '' COMMENT '名字',
  53. `created_on` int(11) unsigned DEFAULT NULL COMMENT '创建时间',
  54. `modified_on` int(11) unsigned DEFAULT NULL COMMENT '更新时间',
  55. `deleted_on` int(11) unsigned DEFAULT '0' COMMENT '删除时间戳',
  56. PRIMARY KEY (`id`)
  57. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  58. -- ----------------------------
  59. -- Records of role
  60. -- ----------------------------
  61. INSERT INTO `role` VALUES ('1', 'test', null, null, '0');
  62. -- ----------------------------
  63. -- Table structure for role_menu
  64. -- ----------------------------
  65. DROP TABLE IF EXISTS `role_menu`;
  66. CREATE TABLE `role_menu` (
  67. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  68. `role_id` int(11) unsigned DEFAULT NULL COMMENT '角色ID',
  69. `menu_id` int(11) unsigned DEFAULT NULL COMMENT '菜单ID',
  70. `deleted_on` int(11) unsigned DEFAULT '0' COMMENT '删除时间戳',
  71. PRIMARY KEY (`id`)
  72. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='用户_角色ID_管理';
  73. -- ----------------------------
  74. -- Records of role_menu
  75. -- ----------------------------
  76. INSERT INTO `role_menu` VALUES ('1', '1', '1', '0');
  77. INSERT INTO `role_menu` VALUES ('2', '1', '2', '0');
  78. INSERT INTO `role_menu` VALUES ('3', '1', '3', '0');
  79. INSERT INTO `role_menu` VALUES ('4', '1', '4', '0');
  80. INSERT INTO `role_menu` VALUES ('5', '1', '5', '0');
  81. INSERT INTO `role_menu` VALUES ('6', '1', '6', '0');
  82. INSERT INTO `role_menu` VALUES ('7', '1', '7', '0');
  83. INSERT INTO `role_menu` VALUES ('8', '1', '8', '0');
  84. INSERT INTO `role_menu` VALUES ('9', '1', '9', '0');
  85. INSERT INTO `role_menu` VALUES ('10', '1', '10', '0');
  86. INSERT INTO `role_menu` VALUES ('11', '1', '11', '0');
  87. INSERT INTO `role_menu` VALUES ('12', '1', '12', '0');
  88. INSERT INTO `role_menu` VALUES ('13', '1', '13', '0');
  89. INSERT INTO `role_menu` VALUES ('14', '1', '14', '0');
  90. INSERT INTO `role_menu` VALUES ('15', '1', '15', '0');
  91. -- ----------------------------
  92. -- Table structure for user
  93. -- ----------------------------
  94. DROP TABLE IF EXISTS `user`;
  95. CREATE TABLE `user` (
  96. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  97. `username` varchar(50) DEFAULT '' COMMENT '账号',
  98. `password` varchar(50) DEFAULT '' COMMENT '密码',
  99. `created_on` int(11) unsigned DEFAULT NULL COMMENT '创建时间',
  100. `modified_on` int(11) unsigned DEFAULT NULL COMMENT '更新时间',
  101. `deleted_on` int(11) unsigned DEFAULT '0' COMMENT '删除时间戳',
  102. PRIMARY KEY (`id`)
  103. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='用户管理';
  104. -- ----------------------------
  105. -- Records of user
  106. -- ----------------------------
  107. INSERT INTO `user` VALUES ('1', 'admin', 'e10adc3949ba59abbe56e057f20f883e', null, null, '0');
  108. INSERT INTO `user` VALUES ('2', 'zhuhongbin', 'e10adc3949ba59abbe56e057f20f883e', '1550642309', '1550642309', '0');
  109. -- ----------------------------
  110. -- Table structure for user_role
  111. -- ----------------------------
  112. DROP TABLE IF EXISTS `user_role`;
  113. CREATE TABLE `user_role` (
  114. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  115. `user_id` int(11) unsigned DEFAULT NULL COMMENT '用户ID',
  116. `role_id` int(11) unsigned DEFAULT NULL COMMENT '角色ID',
  117. `deleted_on` int(11) unsigned DEFAULT '0' COMMENT '删除时间戳',
  118. PRIMARY KEY (`id`)
  119. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='用户_角色ID_管理';
  120. -- ----------------------------
  121. -- Records of user_role
  122. -- ----------------------------
  123. INSERT INTO `user_role` VALUES ('1', '2', '1', '0');