table.sql 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- ----------------------------
  4. -- Table structure for rbac_permissions
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `rbac_permissions`;
  7. CREATE TABLE `rbac_permissions` (
  8. `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  9. `method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  10. `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  11. `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  12. `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  13. `created_at` timestamp NULL DEFAULT NULL,
  14. `updated_at` timestamp NULL DEFAULT NULL,
  15. PRIMARY KEY (`id`) USING BTREE,
  16. UNIQUE INDEX `rbac_permissions_method_path_unique`(`method`, `path`) USING BTREE
  17. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  18. -- ----------------------------
  19. -- Table structure for rbac_roles
  20. -- ----------------------------
  21. DROP TABLE IF EXISTS `rbac_roles`;
  22. CREATE TABLE `rbac_roles` (
  23. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  24. `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  25. `created_at` timestamp NULL DEFAULT NULL,
  26. `updated_at` timestamp NULL DEFAULT NULL,
  27. PRIMARY KEY (`name`) USING BTREE
  28. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  29. -- ----------------------------
  30. -- Table structure for rbac_rules
  31. -- ----------------------------
  32. DROP TABLE IF EXISTS `rbac_rules`;
  33. CREATE TABLE `rbac_rules` (
  34. `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  35. `ptype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  36. `v0` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  37. `v1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  38. `v2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  39. `v3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  40. `v4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  41. `v5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  42. `created_at` timestamp NULL DEFAULT NULL,
  43. `updated_at` timestamp NULL DEFAULT NULL,
  44. PRIMARY KEY (`id`) USING BTREE
  45. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
  46. SET FOREIGN_KEY_CHECKS = 1;