-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pengdequan
committed
Aug 16, 2024
1 parent
1fbd20f
commit 157b14f
Showing
26 changed files
with
361 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,279 @@ | ||
/* | ||
Navicat Premium Data Transfer | ||
Source Server : 172.16.11.162 | ||
Source Server Type : PostgreSQL | ||
Source Server Version : 160003 (160003) | ||
Source Host : 172.16.11.162:5432 | ||
Source Catalog : winter_dashboard | ||
Source Schema : public | ||
Target Server Type : PostgreSQL | ||
Target Server Version : 160003 (160003) | ||
File Encoding : 65001 | ||
Date: 15/08/2024 15:49:04 | ||
*/ | ||
|
||
|
||
-- ---------------------------- | ||
-- Table structure for dict | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."dict"; | ||
CREATE TABLE "public"."dict" ( | ||
"code" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."dict"."code" IS '字典代码'; | ||
COMMENT ON COLUMN "public"."dict"."name" IS '字典名称'; | ||
|
||
-- ---------------------------- | ||
-- Records of dict | ||
-- ---------------------------- | ||
|
||
-- ---------------------------- | ||
-- Table structure for dict_item | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."dict_item"; | ||
CREATE TABLE "public"."dict_item" ( | ||
"dict_code" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"key" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"value" varchar(255) COLLATE "pg_catalog"."default" NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."dict_item"."dict_code" IS 'dict.code'; | ||
COMMENT ON COLUMN "public"."dict_item"."key" IS 'key'; | ||
COMMENT ON COLUMN "public"."dict_item"."value" IS 'value'; | ||
|
||
-- ---------------------------- | ||
-- Records of dict_item | ||
-- ---------------------------- | ||
|
||
-- ---------------------------- | ||
-- Table structure for menu | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."menu"; | ||
CREATE TABLE "public"."menu" ( | ||
"id" int8 NOT NULL, | ||
"parent_id" int8, | ||
"path" varchar(255) COLLATE "pg_catalog"."default", | ||
"title" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"icon" varchar(32) COLLATE "pg_catalog"."default", | ||
"tags" varchar(32) COLLATE "pg_catalog"."default", | ||
"data" varchar(255) COLLATE "pg_catalog"."default", | ||
"type" int2 NOT NULL, | ||
"hidden" int2 NOT NULL, | ||
"keep_alive" int2 NOT NULL, | ||
"sort" int2 NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."menu"."parent_id" IS '父节点'; | ||
COMMENT ON COLUMN "public"."menu"."path" IS '路径'; | ||
COMMENT ON COLUMN "public"."menu"."title" IS '标题'; | ||
COMMENT ON COLUMN "public"."menu"."icon" IS '图标'; | ||
COMMENT ON COLUMN "public"."menu"."tags" IS '额外标识'; | ||
COMMENT ON COLUMN "public"."menu"."data" IS '页面组件/链接'; | ||
COMMENT ON COLUMN "public"."menu"."type" IS '组件类型(1:dir/2:view/3:link/4:iframe)'; | ||
COMMENT ON COLUMN "public"."menu"."hidden" IS '是否隐藏'; | ||
COMMENT ON COLUMN "public"."menu"."keep_alive" IS '是否缓存'; | ||
COMMENT ON COLUMN "public"."menu"."sort" IS '排序(基于同级)'; | ||
|
||
-- ---------------------------- | ||
-- Records of menu | ||
-- ---------------------------- | ||
INSERT INTO "public"."menu" VALUES (20, NULL, 'dashboard', 'Dashboard', 'DashboardOutlined', NULL, NULL, 1, 0, 0, 1); | ||
INSERT INTO "public"."menu" VALUES (21, 20, 'workplace', '工作台', NULL, NULL, 'dashboard/Workplace.vue', 2, 0, 1, 1); | ||
INSERT INTO "public"."menu" VALUES (36, NULL, 'system', '系统设置', 'AppstoreAddOutlined', NULL, NULL, 1, 0, 0, 4); | ||
INSERT INTO "public"."menu" VALUES (37, 36, 'menu', '菜单管理', 'MenuOutlined', NULL, 'system/menu/Menu.vue', 2, 0, 1, 1); | ||
INSERT INTO "public"."menu" VALUES (38, NULL, 'about', '关于', 'ProjectOutlined', 'new', 'About.vue', 2, 0, 1, 6); | ||
INSERT INTO "public"."menu" VALUES (45, 36, 'users', '用户管理', 'UsergroupAddOutlined', NULL, 'system/user/UserList.vue', 2, 0, 1, 2); | ||
INSERT INTO "public"."menu" VALUES (46, 36, 'role', '角色管理', 'UserSwitchOutlined', NULL, 'system/role/Role.vue', 2, 0, 1, 3); | ||
INSERT INTO "public"."menu" VALUES (47, NULL, 'dev', '开发管理', 'CodeOutlined', NULL, NULL, 1, 0, 1, 5); | ||
INSERT INTO "public"."menu" VALUES (48, 47, 'design', '页面设计', 'FormOutlined', NULL, 'system/dev/design/Designer.vue', 2, 0, 1, 1); | ||
INSERT INTO "public"."menu" VALUES (49, 36, 'dict', '字典管理', 'ReadOutlined', NULL, 'system/dict/Dict.vue', 2, 0, 1, 4); | ||
|
||
-- ---------------------------- | ||
-- Table structure for role | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."role"; | ||
CREATE TABLE "public"."role" ( | ||
"id" int8 NOT NULL, | ||
"name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"code" varchar(255) COLLATE "pg_catalog"."default" NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."role"."name" IS '角色名称'; | ||
COMMENT ON COLUMN "public"."role"."code" IS '角色代码'; | ||
|
||
-- ---------------------------- | ||
-- Records of role | ||
-- ---------------------------- | ||
INSERT INTO "public"."role" VALUES (1, '管理员', 'admin'); | ||
INSERT INTO "public"."role" VALUES (2, '维修员', 'repairer'); | ||
INSERT INTO "public"."role" VALUES (3, '顾客', 'customer'); | ||
|
||
-- ---------------------------- | ||
-- Table structure for role_menu | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."role_menu"; | ||
CREATE TABLE "public"."role_menu" ( | ||
"role_id" int8 NOT NULL, | ||
"menu_id" int4 NOT NULL | ||
) | ||
; | ||
|
||
-- ---------------------------- | ||
-- Records of role_menu | ||
-- ---------------------------- | ||
INSERT INTO "public"."role_menu" VALUES (1, 20); | ||
INSERT INTO "public"."role_menu" VALUES (1, 21); | ||
INSERT INTO "public"."role_menu" VALUES (1, 36); | ||
INSERT INTO "public"."role_menu" VALUES (1, 37); | ||
INSERT INTO "public"."role_menu" VALUES (1, 38); | ||
INSERT INTO "public"."role_menu" VALUES (1, 45); | ||
INSERT INTO "public"."role_menu" VALUES (1, 46); | ||
INSERT INTO "public"."role_menu" VALUES (1, 47); | ||
INSERT INTO "public"."role_menu" VALUES (1, 48); | ||
INSERT INTO "public"."role_menu" VALUES (1, 49); | ||
|
||
-- ---------------------------- | ||
-- Table structure for upload_file | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."upload_file"; | ||
CREATE TABLE "public"."upload_file" ( | ||
"id" numeric(20,0) NOT NULL, | ||
"related_id" numeric(20,0), | ||
"related_type" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"path" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"filename" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"suffix" varchar(255) COLLATE "pg_catalog"."default", | ||
"content_length" int8 NOT NULL, | ||
"create_by" int8, | ||
"create_time" timestamp(6), | ||
"deleted" int2 NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."upload_file"."related_id" IS '关联ID'; | ||
COMMENT ON COLUMN "public"."upload_file"."related_type" IS '关联类型(Minio Bucket)'; | ||
COMMENT ON COLUMN "public"."upload_file"."path" IS '文件存储路径'; | ||
COMMENT ON COLUMN "public"."upload_file"."filename" IS '文件原始名称'; | ||
COMMENT ON COLUMN "public"."upload_file"."suffix" IS '扩展名'; | ||
COMMENT ON COLUMN "public"."upload_file"."content_length" IS '文件大小'; | ||
COMMENT ON COLUMN "public"."upload_file"."create_by" IS '创建人'; | ||
COMMENT ON COLUMN "public"."upload_file"."create_time" IS '创建时间'; | ||
COMMENT ON COLUMN "public"."upload_file"."deleted" IS '删除标识'; | ||
COMMENT ON TABLE "public"."upload_file" IS '文件上传'; | ||
|
||
-- ---------------------------- | ||
-- Records of upload_file | ||
-- ---------------------------- | ||
INSERT INTO "public"."upload_file" VALUES (3, 1, 'maintenance', '/image/1541286766131216384png', 'null.png', 'png', 0, NULL, '2022-06-27 13:06:15', 0); | ||
INSERT INTO "public"."upload_file" VALUES (4, 1, 'maintenance', '/image/1541289809987960832.png', 'null.png', 'png', 0, NULL, '2022-06-27 13:18:21', 0); | ||
INSERT INTO "public"."upload_file" VALUES (5, 1, 'maintenance', '/image/1541290274108669952.png', 'null.png', 'png', 0, NULL, '2022-06-27 13:20:42', 0); | ||
INSERT INTO "public"."upload_file" VALUES (6, 1, 'maintenance', '/image/1541306506480386048.png', 'null.png', 'png', 20192, NULL, '2022-06-27 14:24:42', 0); | ||
INSERT INTO "public"."upload_file" VALUES (7, 100001, 'maintenance', '/image/1541967883352080384.jpg', 'XJHBCFpvE6J36bilbekTDIdF55lkrv_PZyt6tm7n8iXVwGTVDXmS1wpnqoZic1Y9.jpg', 'jpg', 204948, 2, '2022-06-29 10:12:46', 0); | ||
INSERT INTO "public"."upload_file" VALUES (8, 100003, 'maintenance', '/image/1542164121083084800.jpg', 'eVwWaUTTqUbuGvaDLbOQifVyuudtVRK1jEmnO1p6Trh1oPbHtocdqRC6m-NI2dgU.jpg', 'jpg', 204948, 2, '2022-06-29 23:12:33', 0); | ||
|
||
-- ---------------------------- | ||
-- Table structure for user | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."user"; | ||
CREATE TABLE "public"."user" ( | ||
"id" numeric(20,0) NOT NULL, | ||
"username" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, | ||
"password" varchar(255) COLLATE "pg_catalog"."default", | ||
"create_time" timestamp(6) NOT NULL, | ||
"deleted" int2 NOT NULL, | ||
"open_id" varchar(255) COLLATE "pg_catalog"."default", | ||
"nickname" varchar(255) COLLATE "pg_catalog"."default", | ||
"avatar" varchar(255) COLLATE "pg_catalog"."default", | ||
"mobile" varchar(32) COLLATE "pg_catalog"."default", | ||
"status" varchar(1) COLLATE "pg_catalog"."default" NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."user"."username" IS '用户名'; | ||
COMMENT ON COLUMN "public"."user"."password" IS '密码'; | ||
COMMENT ON COLUMN "public"."user"."create_time" IS '创建时间'; | ||
COMMENT ON COLUMN "public"."user"."open_id" IS '微信openId'; | ||
COMMENT ON COLUMN "public"."user"."nickname" IS '昵称'; | ||
COMMENT ON COLUMN "public"."user"."avatar" IS '头像url'; | ||
COMMENT ON COLUMN "public"."user"."mobile" IS '电话号码'; | ||
COMMENT ON COLUMN "public"."user"."status" IS '状态(0:正常)'; | ||
COMMENT ON TABLE "public"."user" IS '用户'; | ||
|
||
-- ---------------------------- | ||
-- Records of user | ||
-- ---------------------------- | ||
INSERT INTO "public"."user" VALUES (1, 'admin', '$2a$12$iIhN5Q3hUHRYD9k4t5oQWux1YPG5CYl/acjUHXDZNhbUUMLYic0SW', '2022-07-18 09:43:17', 0, NULL, '管理员', 'http://dashboard.iamkyun.com:9000/userprofile/avatar/1548845829928976384.jpg', '18675802286', '0'); | ||
INSERT INTO "public"."user" VALUES (2, 'admin2', '$2a$12$iIhN5Q3hUHRYD9k4t5oQWux1YPG5CYl/acjUHXDZNhbUUMLYic0SW', '2022-07-15 10:23:24', 0, NULL, '管理员2', 'https://awss3.iamkyun.com:8443/profile/default_user_profile.svg', '18675802236', '0'); | ||
INSERT INTO "public"."user" VALUES (10, 'test', '$2a$12$WcXy5MNxLUR1hRS99eKRxuGq4FWOCDV56D9QpYcjvS54cn0qWE6Fi', '2022-07-14 17:57:19', 1, NULL, '测试', 'http://dashboard.iamkyun.com:9000/userprofile/avatar/1547508762485653504.jpg', '12312312312', '0'); | ||
|
||
-- ---------------------------- | ||
-- Table structure for user_role | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS "public"."user_role"; | ||
CREATE TABLE "public"."user_role" ( | ||
"user_id" numeric(20,0) NOT NULL, | ||
"role_id" int8 NOT NULL | ||
) | ||
; | ||
COMMENT ON COLUMN "public"."user_role"."user_id" IS '用户ID'; | ||
|
||
-- ---------------------------- | ||
-- Records of user_role | ||
-- ---------------------------- | ||
INSERT INTO "public"."user_role" VALUES (1, 1); | ||
INSERT INTO "public"."user_role" VALUES (2, 1); | ||
INSERT INTO "public"."user_role" VALUES (2, 2); | ||
INSERT INTO "public"."user_role" VALUES (10, 1); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table dict | ||
-- ---------------------------- | ||
ALTER TABLE "public"."dict" ADD CONSTRAINT "dict_pkey" PRIMARY KEY ("code"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table dict_item | ||
-- ---------------------------- | ||
ALTER TABLE "public"."dict_item" ADD CONSTRAINT "dict_item_pkey" PRIMARY KEY ("dict_code", "key"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table menu | ||
-- ---------------------------- | ||
ALTER TABLE "public"."menu" ADD CONSTRAINT "menu_pkey" PRIMARY KEY ("id"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table role | ||
-- ---------------------------- | ||
ALTER TABLE "public"."role" ADD CONSTRAINT "role_pkey" PRIMARY KEY ("id"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table role_menu | ||
-- ---------------------------- | ||
ALTER TABLE "public"."role_menu" ADD CONSTRAINT "role_menu_pkey" PRIMARY KEY ("role_id", "menu_id"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table upload_file | ||
-- ---------------------------- | ||
ALTER TABLE "public"."upload_file" ADD CONSTRAINT "upload_file_pkey" PRIMARY KEY ("id"); | ||
|
||
-- ---------------------------- | ||
-- Indexes structure for table user | ||
-- ---------------------------- | ||
CREATE UNIQUE INDEX "idx_u_mobile" ON "public"."user" USING btree ( | ||
"mobile" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST | ||
); | ||
CREATE UNIQUE INDEX "idx_u_username" ON "public"."user" USING btree ( | ||
"username" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST | ||
); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table user | ||
-- ---------------------------- | ||
ALTER TABLE "public"."user" ADD CONSTRAINT "user_pkey" PRIMARY KEY ("id"); | ||
|
||
-- ---------------------------- | ||
-- Primary Key structure for table user_role | ||
-- ---------------------------- | ||
ALTER TABLE "public"."user_role" ADD CONSTRAINT "user_role_pkey" PRIMARY KEY ("user_id", "role_id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.