awesome_admin_v2.sql 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : 微球
  4. Source Server Type : MySQL
  5. Source Server Version : 50616
  6. Source Host : rdsave1o67m1ido6gwp6public.mysql.rds.aliyuncs.com:3306
  7. Source Schema : awesome_admin_v2
  8. Target Server Type : MySQL
  9. Target Server Version : 50616
  10. File Encoding : 65001
  11. Date: 07/08/2020 17:51:04
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for authority
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `authority`;
  19. CREATE TABLE `authority` (
  20. `name` varchar(50) NOT NULL,
  21. `description` varchar(50) NOT NULL,
  22. PRIMARY KEY (`name`)
  23. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  24. -- ----------------------------
  25. -- Records of authority
  26. -- ----------------------------
  27. BEGIN;
  28. INSERT INTO `authority` VALUES ('ROLE_ADMIN', '管理员');
  29. INSERT INTO `authority` VALUES ('ROLE_DEV', '开发者');
  30. INSERT INTO `authority` VALUES ('ROLE_USER', '普通用户');
  31. COMMIT;
  32. -- ----------------------------
  33. -- Table structure for child
  34. -- ----------------------------
  35. DROP TABLE IF EXISTS `child`;
  36. CREATE TABLE `child` (
  37. `id` bigint(20) NOT NULL,
  38. `created_at` datetime DEFAULT NULL,
  39. `created_by` varchar(255) DEFAULT NULL,
  40. `modified_at` datetime DEFAULT NULL,
  41. `modified_by` varchar(255) DEFAULT NULL,
  42. `child_name` varchar(255) DEFAULT NULL,
  43. `parent_id` bigint(20) DEFAULT NULL,
  44. PRIMARY KEY (`id`),
  45. KEY `FK7dag1cncltpyhoc2mbwka356h` (`parent_id`),
  46. CONSTRAINT `FK7dag1cncltpyhoc2mbwka356h` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)
  47. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  48. -- ----------------------------
  49. -- Records of child
  50. -- ----------------------------
  51. BEGIN;
  52. INSERT INTO `child` VALUES (3, '2019-12-25 11:17:02', 'system', '2019-12-25 11:17:02', 'system', '222', 2);
  53. INSERT INTO `child` VALUES (5, '2019-12-25 11:18:19', 'system', '2019-12-25 11:18:19', 'system', '222', 4);
  54. INSERT INTO `child` VALUES (7, '2019-12-25 14:50:50', 'system', '2019-12-25 14:50:50', 'system', '222', 6);
  55. COMMIT;
  56. -- ----------------------------
  57. -- Table structure for city
  58. -- ----------------------------
  59. DROP TABLE IF EXISTS `city`;
  60. CREATE TABLE `city` (
  61. `id` bigint(20) NOT NULL,
  62. `created_at` datetime DEFAULT NULL,
  63. `created_by` varchar(255) DEFAULT NULL,
  64. `modified_at` datetime DEFAULT NULL,
  65. `modified_by` varchar(255) DEFAULT NULL,
  66. `name` varchar(255) DEFAULT NULL,
  67. `remark` varchar(255) DEFAULT NULL,
  68. PRIMARY KEY (`id`)
  69. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  70. -- ----------------------------
  71. -- Table structure for district
  72. -- ----------------------------
  73. DROP TABLE IF EXISTS `district`;
  74. CREATE TABLE `district` (
  75. `id` bigint(20) NOT NULL,
  76. `created_at` datetime DEFAULT NULL,
  77. `created_by` varchar(255) DEFAULT NULL,
  78. `modified_at` datetime DEFAULT NULL,
  79. `modified_by` varchar(255) DEFAULT NULL,
  80. `full_name` varchar(255) DEFAULT NULL,
  81. `lat` double NOT NULL,
  82. `leaf` bit(1) NOT NULL,
  83. `level` int(11) NOT NULL,
  84. `lng` double NOT NULL,
  85. `name` varchar(255) DEFAULT NULL,
  86. `parent` bigint(20) DEFAULT NULL,
  87. `pinyin` varchar(255) DEFAULT NULL,
  88. `child_count` int(11) NOT NULL,
  89. `city_code` varchar(10) DEFAULT NULL,
  90. `city_count` int(11) NOT NULL,
  91. `district_count` int(11) NOT NULL,
  92. `street_count` int(11) NOT NULL,
  93. `del` bit(1) NOT NULL,
  94. PRIMARY KEY (`id`)
  95. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  96. -- ----------------------------
  97. -- Table structure for guid_package
  98. -- ----------------------------
  99. DROP TABLE IF EXISTS `guid_package`;
  100. CREATE TABLE `guid_package` (
  101. `id` bigint(20) NOT NULL,
  102. `created_at` datetime DEFAULT NULL,
  103. `created_by` varchar(255) DEFAULT NULL,
  104. `modified_at` datetime DEFAULT NULL,
  105. `modified_by` varchar(255) DEFAULT NULL,
  106. `name` varchar(255) DEFAULT NULL,
  107. `price` decimal(10,2) DEFAULT NULL,
  108. PRIMARY KEY (`id`)
  109. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  110. -- ----------------------------
  111. -- Table structure for guide
  112. -- ----------------------------
  113. DROP TABLE IF EXISTS `guide`;
  114. CREATE TABLE `guide` (
  115. `id` bigint(20) NOT NULL,
  116. `created_at` datetime DEFAULT NULL,
  117. `created_by` varchar(255) DEFAULT NULL,
  118. `modified_at` datetime DEFAULT NULL,
  119. `modified_by` varchar(255) DEFAULT NULL,
  120. `pic` varchar(255) DEFAULT NULL,
  121. `sort` int(11) NOT NULL,
  122. `text` text,
  123. `type` varchar(255) DEFAULT NULL,
  124. `video` varchar(255) DEFAULT NULL,
  125. `voice` varchar(255) DEFAULT NULL,
  126. PRIMARY KEY (`id`)
  127. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  128. -- ----------------------------
  129. -- Table structure for hibernate_sequence
  130. -- ----------------------------
  131. DROP TABLE IF EXISTS `hibernate_sequence`;
  132. CREATE TABLE `hibernate_sequence` (
  133. `next_val` bigint(20) DEFAULT NULL
  134. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  135. -- ----------------------------
  136. -- Records of hibernate_sequence
  137. -- ----------------------------
  138. BEGIN;
  139. INSERT INTO `hibernate_sequence` VALUES (15);
  140. INSERT INTO `hibernate_sequence` VALUES (15);
  141. INSERT INTO `hibernate_sequence` VALUES (15);
  142. COMMIT;
  143. -- ----------------------------
  144. -- Table structure for menu
  145. -- ----------------------------
  146. DROP TABLE IF EXISTS `menu`;
  147. CREATE TABLE `menu` (
  148. `id` bigint(20) NOT NULL,
  149. `created_at` datetime DEFAULT NULL,
  150. `created_by` varchar(255) DEFAULT NULL,
  151. `modified_at` datetime DEFAULT NULL,
  152. `modified_by` varchar(255) DEFAULT NULL,
  153. `active` bit(1) DEFAULT NULL,
  154. `enabled` bit(1) DEFAULT NULL,
  155. `icon` varchar(255) DEFAULT NULL,
  156. `name` varchar(255) DEFAULT NULL,
  157. `parent` bigint(20) DEFAULT NULL,
  158. `path` varchar(255) DEFAULT NULL,
  159. `root` bit(1) DEFAULT NULL,
  160. `sort` int(11) DEFAULT NULL,
  161. `category` varchar(255) DEFAULT NULL,
  162. `del` bit(1) NOT NULL,
  163. PRIMARY KEY (`id`)
  164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  165. -- ----------------------------
  166. -- Records of menu
  167. -- ----------------------------
  168. BEGIN;
  169. INSERT INTO `menu` VALUES (3, NULL, NULL, '2020-07-31 14:31:40', '管理员(1)', b'1', b'1', 'fas fa-desktop', '开发', 2, '', b'1', 4, '开发', b'0');
  170. INSERT INTO `menu` VALUES (4, NULL, NULL, '2020-07-31 14:31:51', '管理员(1)', b'1', b'1', 'fas fa-code', '代码生成', 3, '/genCodeList', b'0', 5, '开发', b'0');
  171. INSERT INTO `menu` VALUES (5, NULL, NULL, '2020-07-31 14:31:56', '管理员(1)', b'1', b'1', 'fas fa-bug', '接口调试', 3, '/api', b'0', 6, '开发', b'0');
  172. INSERT INTO `menu` VALUES (6, NULL, NULL, '2020-07-09 15:01:05', '管理员(1)', b'1', b'1', 'fas fa-user', '用户管理', 2, '/userList', b'1', 2, '用户', b'0');
  173. INSERT INTO `menu` VALUES (8, '2020-07-09 15:01:40', NULL, '2020-07-09 15:01:45', '管理员(1)', b'1', b'1', '', '菜单权限', 9, '/menuAuthority', b'0', 8, NULL, b'0');
  174. INSERT INTO `menu` VALUES (9, NULL, NULL, '2020-07-09 15:01:10', '管理员(1)', b'1', b'1', 'fas fa-cog', '配置', 2, '', b'1', 3, '系统', b'0');
  175. INSERT INTO `menu` VALUES (10, NULL, NULL, '2020-07-29 16:54:21', '管理员(1)', b'1', b'1', '', '菜单配置', 9, '/menus', b'0', 7, '系统', b'0');
  176. INSERT INTO `menu` VALUES (14, NULL, NULL, '2020-07-09 15:01:45', '管理员(1)', b'1', b'1', '', '参数配置', 9, '/sysConfigList', b'0', 9, '系统', b'0');
  177. COMMIT;
  178. -- ----------------------------
  179. -- Table structure for menu_authority
  180. -- ----------------------------
  181. DROP TABLE IF EXISTS `menu_authority`;
  182. CREATE TABLE `menu_authority` (
  183. `menu_id` bigint(20) NOT NULL,
  184. `authority` varchar(50) NOT NULL,
  185. PRIMARY KEY (`menu_id`,`authority`),
  186. KEY `FKlj7sftrck7uk1kcjsy0doo56` (`authority`),
  187. CONSTRAINT `FK4hopjqfvkhdagmk110y1jk17q` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`),
  188. CONSTRAINT `FKlj7sftrck7uk1kcjsy0doo56` FOREIGN KEY (`authority`) REFERENCES `authority` (`name`)
  189. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  190. -- ----------------------------
  191. -- Records of menu_authority
  192. -- ----------------------------
  193. BEGIN;
  194. INSERT INTO `menu_authority` VALUES (6, 'ROLE_ADMIN');
  195. INSERT INTO `menu_authority` VALUES (8, 'ROLE_ADMIN');
  196. INSERT INTO `menu_authority` VALUES (9, 'ROLE_ADMIN');
  197. INSERT INTO `menu_authority` VALUES (10, 'ROLE_ADMIN');
  198. INSERT INTO `menu_authority` VALUES (14, 'ROLE_ADMIN');
  199. INSERT INTO `menu_authority` VALUES (3, 'ROLE_DEV');
  200. INSERT INTO `menu_authority` VALUES (4, 'ROLE_DEV');
  201. INSERT INTO `menu_authority` VALUES (5, 'ROLE_DEV');
  202. COMMIT;
  203. -- ----------------------------
  204. -- Table structure for parent
  205. -- ----------------------------
  206. DROP TABLE IF EXISTS `parent`;
  207. CREATE TABLE `parent` (
  208. `id` bigint(20) NOT NULL,
  209. `created_at` datetime DEFAULT NULL,
  210. `created_by` varchar(255) DEFAULT NULL,
  211. `modified_at` datetime DEFAULT NULL,
  212. `modified_by` varchar(255) DEFAULT NULL,
  213. `parent_name` varchar(255) DEFAULT NULL,
  214. PRIMARY KEY (`id`)
  215. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  216. -- ----------------------------
  217. -- Records of parent
  218. -- ----------------------------
  219. BEGIN;
  220. INSERT INTO `parent` VALUES (2, '2019-12-25 11:17:02', 'system', '2019-12-25 11:17:02', 'system', '111');
  221. INSERT INTO `parent` VALUES (4, '2019-12-25 11:18:19', 'system', '2019-12-25 11:18:19', 'system', '111');
  222. INSERT INTO `parent` VALUES (6, '2019-12-25 14:50:49', 'system', '2019-12-25 14:50:49', 'system', '111');
  223. COMMIT;
  224. -- ----------------------------
  225. -- Table structure for scenic
  226. -- ----------------------------
  227. DROP TABLE IF EXISTS `scenic`;
  228. CREATE TABLE `scenic` (
  229. `id` bigint(20) NOT NULL,
  230. `created_at` datetime DEFAULT NULL,
  231. `created_by` varchar(255) DEFAULT NULL,
  232. `modified_at` datetime DEFAULT NULL,
  233. `modified_by` varchar(255) DEFAULT NULL,
  234. `city_id` bigint(20) DEFAULT NULL,
  235. `name` varchar(255) DEFAULT NULL,
  236. `pic` varchar(255) DEFAULT NULL,
  237. `remark` varchar(255) DEFAULT NULL,
  238. PRIMARY KEY (`id`)
  239. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  240. -- ----------------------------
  241. -- Table structure for scenic_spot
  242. -- ----------------------------
  243. DROP TABLE IF EXISTS `scenic_spot`;
  244. CREATE TABLE `scenic_spot` (
  245. `id` bigint(20) NOT NULL,
  246. `created_at` datetime DEFAULT NULL,
  247. `created_by` varchar(255) DEFAULT NULL,
  248. `modified_at` datetime DEFAULT NULL,
  249. `modified_by` varchar(255) DEFAULT NULL,
  250. `city_id` bigint(20) DEFAULT NULL,
  251. `name` varchar(255) DEFAULT NULL,
  252. `pic` varchar(255) DEFAULT NULL,
  253. `remark` varchar(255) DEFAULT NULL,
  254. `scenic_id` bigint(20) DEFAULT NULL,
  255. `x` int(11) NOT NULL,
  256. `y` int(11) NOT NULL,
  257. PRIMARY KEY (`id`)
  258. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  259. -- ----------------------------
  260. -- Table structure for sms_record
  261. -- ----------------------------
  262. DROP TABLE IF EXISTS `sms_record`;
  263. CREATE TABLE `sms_record` (
  264. `id` bigint(20) NOT NULL,
  265. `created_at` datetime DEFAULT NULL,
  266. `created_by` varchar(255) DEFAULT NULL,
  267. `modified_at` datetime DEFAULT NULL,
  268. `modified_by` varchar(255) DEFAULT NULL,
  269. `code` varchar(255) DEFAULT NULL,
  270. `expired` bit(1) DEFAULT NULL,
  271. `expires_at` datetime DEFAULT NULL,
  272. `phone` varchar(255) DEFAULT NULL,
  273. `scope` varchar(255) DEFAULT NULL,
  274. `session_id` varchar(255) DEFAULT NULL,
  275. `del` bit(1) NOT NULL,
  276. PRIMARY KEY (`id`)
  277. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  278. -- ----------------------------
  279. -- Table structure for spot
  280. -- ----------------------------
  281. DROP TABLE IF EXISTS `spot`;
  282. CREATE TABLE `spot` (
  283. `user_id` bigint(20) NOT NULL,
  284. `authority_name` varchar(50) NOT NULL,
  285. PRIMARY KEY (`user_id`,`authority_name`)
  286. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  287. -- ----------------------------
  288. -- Table structure for spot_guid
  289. -- ----------------------------
  290. DROP TABLE IF EXISTS `spot_guid`;
  291. CREATE TABLE `spot_guid` (
  292. `spot_id` bigint(20) NOT NULL,
  293. `guid_id` bigint(20) NOT NULL,
  294. PRIMARY KEY (`spot_id`,`guid_id`),
  295. KEY `FKbftxye4brw7vfq05d7rv0mtca` (`guid_id`),
  296. CONSTRAINT `FK5xnrr1sk76u0xy3j15p6r96q9` FOREIGN KEY (`spot_id`) REFERENCES `scenic_spot` (`id`),
  297. CONSTRAINT `FKbftxye4brw7vfq05d7rv0mtca` FOREIGN KEY (`guid_id`) REFERENCES `guide` (`id`)
  298. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  299. -- ----------------------------
  300. -- Table structure for super_user
  301. -- ----------------------------
  302. DROP TABLE IF EXISTS `super_user`;
  303. CREATE TABLE `super_user` (
  304. `id` bigint(20) NOT NULL,
  305. `created_at` datetime DEFAULT NULL,
  306. `created_by` varchar(255) DEFAULT NULL,
  307. `modified_at` datetime DEFAULT NULL,
  308. `modified_by` varchar(255) DEFAULT NULL,
  309. `avatar` varchar(255) DEFAULT NULL,
  310. `enabled` bit(1) NOT NULL,
  311. `nickname` varchar(255) DEFAULT NULL,
  312. `password` varchar(255) DEFAULT NULL,
  313. `phone` varchar(255) DEFAULT NULL,
  314. `username` varchar(50) NOT NULL,
  315. `del` bit(1) NOT NULL,
  316. PRIMARY KEY (`id`),
  317. UNIQUE KEY `UK_jfokkpxg19r117eil158ooo9d` (`username`)
  318. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  319. -- ----------------------------
  320. -- Table structure for super_user_authority
  321. -- ----------------------------
  322. DROP TABLE IF EXISTS `super_user_authority`;
  323. CREATE TABLE `super_user_authority` (
  324. `user_id` bigint(20) NOT NULL,
  325. `authority_name` varchar(50) NOT NULL,
  326. PRIMARY KEY (`user_id`,`authority_name`),
  327. KEY `FKxjxyodse6n0n00ewvoq8xv8` (`authority_name`),
  328. CONSTRAINT `FK7p0vq0b1vy9f0sqvgrdqw1q70` FOREIGN KEY (`user_id`) REFERENCES `super_user` (`id`),
  329. CONSTRAINT `FKxjxyodse6n0n00ewvoq8xv8` FOREIGN KEY (`authority_name`) REFERENCES `authority` (`name`)
  330. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  331. -- ----------------------------
  332. -- Table structure for sys_config
  333. -- ----------------------------
  334. DROP TABLE IF EXISTS `sys_config`;
  335. CREATE TABLE `sys_config` (
  336. `name` varchar(25) NOT NULL,
  337. `created_at` datetime DEFAULT NULL,
  338. `created_by` varchar(255) DEFAULT NULL,
  339. `modified_at` datetime DEFAULT NULL,
  340. `modified_by` varchar(255) DEFAULT NULL,
  341. `description` varchar(255) DEFAULT NULL,
  342. `type` varchar(255) DEFAULT NULL,
  343. `value` varchar(255) DEFAULT NULL,
  344. `del` bit(1) NOT NULL,
  345. PRIMARY KEY (`name`)
  346. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  347. -- ----------------------------
  348. -- Table structure for user
  349. -- ----------------------------
  350. DROP TABLE IF EXISTS `user`;
  351. CREATE TABLE `user` (
  352. `id` bigint(20) NOT NULL,
  353. `created_at` datetime DEFAULT NULL,
  354. `created_by` varchar(255) DEFAULT NULL,
  355. `modified_at` datetime DEFAULT NULL,
  356. `modified_by` varchar(255) DEFAULT NULL,
  357. `avatar` varchar(255) DEFAULT NULL,
  358. `city` varchar(255) DEFAULT NULL,
  359. `country` varchar(255) DEFAULT NULL,
  360. `email` varchar(255) DEFAULT NULL,
  361. `language` varchar(255) DEFAULT NULL,
  362. `nickname` varchar(255) DEFAULT NULL,
  363. `open_id` varchar(255) DEFAULT NULL,
  364. `password` varchar(255) DEFAULT NULL,
  365. `phone` varchar(255) DEFAULT NULL,
  366. `province` varchar(255) DEFAULT NULL,
  367. `sex` varchar(255) DEFAULT NULL,
  368. `username` varchar(50) NOT NULL,
  369. `del` bit(1) NOT NULL,
  370. PRIMARY KEY (`id`),
  371. UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`)
  372. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  373. -- ----------------------------
  374. -- Records of user
  375. -- ----------------------------
  376. BEGIN;
  377. INSERT INTO `user` VALUES (1, '2020-03-07 18:34:36', NULL, '2020-07-31 14:32:10', '管理员(1)', 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg', NULL, NULL, NULL, NULL, '管理员', NULL, '$2a$10$ztJSpmth7fPgDK0I5stwnO59e5ht2copnDL8lyt2xif6lXBzk/ZdO', NULL, NULL, NULL, 'root', b'0');
  378. COMMIT;
  379. -- ----------------------------
  380. -- Table structure for user_authority
  381. -- ----------------------------
  382. DROP TABLE IF EXISTS `user_authority`;
  383. CREATE TABLE `user_authority` (
  384. `user_id` bigint(20) NOT NULL,
  385. `authority_name` varchar(50) NOT NULL,
  386. PRIMARY KEY (`user_id`,`authority_name`)
  387. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  388. -- ----------------------------
  389. -- Records of user_authority
  390. -- ----------------------------
  391. BEGIN;
  392. INSERT INTO `user_authority` VALUES (1, 'ROLE_ADMIN');
  393. INSERT INTO `user_authority` VALUES (1, 'ROLE_DEV');
  394. INSERT INTO `user_authority` VALUES (1, 'ROLE_USER');
  395. INSERT INTO `user_authority` VALUES (11, 'ROLE_USER');
  396. INSERT INTO `user_authority` VALUES (14, 'ROLE_ADMIN');
  397. COMMIT;
  398. SET FOREIGN_KEY_CHECKS = 1;