/*
 Navicat Premium Data Transfer

 Source Server         : PgSQL-虚拟机-202
 Source Server Type    : PostgreSQL
 Source Server Version : 140008
 Source Host           : 192.168.0.202:5432
 Source Catalog        : mydb
 Source Schema         : qiaoba-boot

 Target Server Type    : PostgreSQL
 Target Server Version : 140008
 File Encoding         : 65001

 Date: 19/06/2023 17:25:53
*/


-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_config";
CREATE TABLE "qiaoba-boot"."sys_config" (
  "config_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "config_name" varchar(100) COLLATE "pg_catalog"."default",
  "config_key" varchar(100) COLLATE "pg_catalog"."default",
  "config_value" varchar(500) COLLATE "pg_catalog"."default",
  "config_type" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."config_id" IS '参数主键';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."config_name" IS '参数名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."config_key" IS '参数键名';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."config_value" IS '参数键值';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."config_type" IS '系统内置（Y是 N否）';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_config"."remark" IS '备注';
COMMENT ON TABLE "qiaoba-boot"."sys_config" IS '参数配置表';

-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661598740507910145', 'Token有效期', 'sys.token.expireTime', '96', 'Y', 'admin', '2023-05-25 13:22:50', 'admin', '2023-05-25 15:02:42', '单位：小时，仅支持正整数', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661602101802164225', '账号黑名单开关', 'sys.account.blacklistOnOff', 'true', 'Y', 'admin', '2023-05-25 13:22:31', 'admin', '2023-05-25 13:57:14', '（true开启，false关闭）', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661603407233077249', '账号注册开关', 'sys.account.registerUser', 'false', 'Y', 'admin', '2023-05-25 13:21:38', 'admin', '2023-05-25 15:07:00', '（true开启，false关闭）', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661603968779079681', '登录验证码开关', 'sys.account.captchaOnOff', 'false', 'Y', 'admin', '2023-05-25 13:23:52', 'admin', '2023-06-09 14:40:17', '（true开启，false关闭）', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661603968779079682', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-light', 'Y', 'admin', '2022-08-15 18:01:28', 'admin', '2023-05-25 13:26:27', '深色主题theme-dark，浅色主题theme-light', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1661603968779079683', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2022-08-15 18:01:28', '', NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1668426274817994753', '登陆最大错误次数', 'sys.account.loginErrorMaxCount', '10', 'Y', 'admin', '2023-06-13 09:13:16', 'admin', '2023-06-13 09:35:59', '超过次数, 就会被拉黑', '2');
INSERT INTO "qiaoba-boot"."sys_config" VALUES ('1668428263694135297', '黑名单过期时间', 'sys.account.blacklistExpireTime', '30', 'Y', 'admin', '2023-06-13 09:21:11', 'admin', '2023-06-13 09:35:29', '拉黑时间,  单位：分钟, 仅支持正整数', '2');

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_dept";
CREATE TABLE "qiaoba-boot"."sys_dept" (
  "dept_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "parent_id" varchar(64) COLLATE "pg_catalog"."default",
  "ancestors" varchar(500) COLLATE "pg_catalog"."default",
  "dept_name" varchar(30) COLLATE "pg_catalog"."default",
  "order_num" int4,
  "leader" varchar(20) COLLATE "pg_catalog"."default",
  "phone" varchar(30) COLLATE "pg_catalog"."default",
  "email" varchar(30) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."dept_id" IS '部门id';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."parent_id" IS '父部门id';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."ancestors" IS '祖级列表';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."dept_name" IS '部门名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."order_num" IS '显示顺序';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."leader" IS '负责人ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."phone" IS '手机号';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."email" IS '邮箱';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."status" IS '部门状态（1正常 0停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_dept"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_dept" IS '部门表';

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659442897402212353', '0', '0', '集团总公司', 1, 'Kitt', '18811112222', 'kitt@admin.com', '1', 'admin', '2023-05-19 14:16:32', 'admin', '2023-05-19 14:19:04', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443006122766337', '1659442897402212353', '0,1659442897402212353', '安徽分部', 1, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:16:58', 'admin', '2023-05-19 14:17:19', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443064624918529', '1659442897402212353', '0,1659442897402212353', '江苏分部', 2, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:12', 'admin', '2023-05-19 14:17:24', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443154873757697', '1659443006122766337', '0,1659442897402212353,1659443006122766337', '合肥分公司', 1, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:34', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443184389074946', '1659443006122766337', '0,1659442897402212353,1659443006122766337', '芜湖分公司', 2, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:41', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443224335626242', '1659443064624918529', '0,1659442897402212353,1659443064624918529', '南京分公司', 1, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:50', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443256656932865', '1659443064624918529', '0,1659442897402212353,1659443064624918529', '苏州分公司', 2, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:58', 'admin', '2023-05-25 13:31:01', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_dept" VALUES ('1659443329390358529', '1659443006122766337', '0,1659442897402212353,1659443006122766337', '安庆分公司', 3, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:18:15', 'admin', '2023-05-19 14:39:34', NULL, '2');

-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_dict_data";
CREATE TABLE "qiaoba-boot"."sys_dict_data" (
  "dict_code" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "dict_sort" int4,
  "dict_label" varchar(100) COLLATE "pg_catalog"."default",
  "dict_value" varchar(100) COLLATE "pg_catalog"."default",
  "dict_type" varchar(100) COLLATE "pg_catalog"."default",
  "css_class" varchar(100) COLLATE "pg_catalog"."default",
  "list_class" varchar(100) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."dict_code" IS '字典编码';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."dict_sort" IS '字典排序';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."dict_label" IS '字典标签';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."dict_value" IS '字典键值';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."dict_type" IS '字典类型';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."css_class" IS '样式属性（其他样式扩展）';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."list_class" IS '表格回显样式';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."status" IS '状态（0正常 1停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_data"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_dict_data" IS '字典数据表';

-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_dict_data" VALUES ('1665587419228155906', 0, '2', '2', 'test', NULL, 'default', '1', 'admin', '2023-06-05 13:12:41', '', NULL, NULL, '1');

-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_dict_type";
CREATE TABLE "qiaoba-boot"."sys_dict_type" (
  "dict_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "dict_name" varchar(100) COLLATE "pg_catalog"."default",
  "dict_type" varchar(100) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."dict_id" IS '字典主键';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."dict_name" IS '字典名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."dict_type" IS '字典类型';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."status" IS '状态（0正常 1停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_dict_type"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_dict_type" IS '字典类型表';

-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_dict_type" VALUES ('1665578778676703234', '测试', 'test', '1', 'admin', '2023-06-05 12:38:20', '', NULL, NULL, '1');
INSERT INTO "qiaoba-boot"."sys_dict_type" VALUES ('1665587609699889154', '测试2', '测试2', '1', 'admin', '2023-06-05 13:13:26', '', NULL, NULL, '1');

-- ----------------------------
-- Table structure for sys_login_log
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_login_log";
CREATE TABLE "qiaoba-boot"."sys_login_log" (
  "login_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "device_sn" varchar(50) COLLATE "pg_catalog"."default",
  "username" varchar(50) COLLATE "pg_catalog"."default",
  "nickname" varchar(30) COLLATE "pg_catalog"."default",
  "ip" varchar(30) COLLATE "pg_catalog"."default",
  "address" varchar(255) COLLATE "pg_catalog"."default",
  "browser" varchar(50) COLLATE "pg_catalog"."default",
  "os" varchar(50) COLLATE "pg_catalog"."default",
  "login_time" timestamp(6),
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."device_sn" IS '设备编码';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."username" IS '登录账号';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."nickname" IS '用户名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."ip" IS '访问IP';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."address" IS '登录地点';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."browser" IS '浏览器';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."os" IS '操作系统';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."login_time" IS '登录时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_login_log"."remark" IS '备注';
COMMENT ON TABLE "qiaoba-boot"."sys_login_log" IS '登录日志';

-- ----------------------------
-- Records of sys_login_log
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_login_log" VALUES ('1670722570643869697', '34ca854d3c1549318b9f7b2923faf4f7', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-06-19 17:17:56', '', NULL, '', NULL, NULL, '1');
INSERT INTO "qiaoba-boot"."sys_login_log" VALUES ('1670723605751959554', 'b9c055b82943483799feab5a1c0e0f46', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-06-19 17:22:03', '', NULL, '', NULL, NULL, '1');

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_menu";
CREATE TABLE "qiaoba-boot"."sys_menu" (
  "menu_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "menu_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "parent_id" varchar(64) COLLATE "pg_catalog"."default",
  "order_num" int4,
  "path" varchar(200) COLLATE "pg_catalog"."default",
  "component" varchar(255) COLLATE "pg_catalog"."default",
  "query" varchar(255) COLLATE "pg_catalog"."default",
  "is_frame" char(1) COLLATE "pg_catalog"."default",
  "is_cache" char(1) COLLATE "pg_catalog"."default",
  "menu_type" char(1) COLLATE "pg_catalog"."default",
  "is_visible" char(1) COLLATE "pg_catalog"."default",
  "perms" varchar(100) COLLATE "pg_catalog"."default",
  "icon" varchar(100) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."menu_id" IS '菜单ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."menu_name" IS '菜单名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."parent_id" IS '父菜单ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."order_num" IS '显示顺序';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."path" IS '路由地址';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."component" IS '组件路径';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."query" IS '路由参数';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."is_frame" IS '是否为外链（1是 0否）';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."is_cache" IS '是否缓存（1缓存 0不缓存）';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."menu_type" IS '菜单类型（M目录 C菜单 F按钮）';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."is_visible" IS '菜单状态（1显示 0隐藏）';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."perms" IS '权限标识';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."icon" IS '菜单图标';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_menu"."remark" IS '备注';
COMMENT ON TABLE "qiaoba-boot"."sys_menu" IS '菜单权限表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1', '系统管理', '0', 1, 'system', NULL, '', '0', '0', 'M', '1', '', 'system', 'admin', '2023-04-23 14:35:29', '', NULL, '系统管理目录', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('2', '系统监控', '0', 2, 'monitor', NULL, '', '0', '0', 'M', '1', '', 'monitor', 'admin', '2023-05-27 22:25:03', '', NULL, '系统监控目录', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('100', '用户管理', '1', 1, 'user', 'system/user/index', '', '0', '0', 'C', '1', 'system:user:list', 'user', 'admin', '2023-04-23 14:35:29', '', NULL, '用户管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('101', '角色管理', '1', 2, 'role', 'system/role/index', '', '0', '0', 'C', '1', 'system:role:list', 'peoples', 'admin', '2023-04-23 14:35:29', '', NULL, '角色管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('102', '菜单管理', '1', 3, 'menu', 'system/menu/index', '', '0', '0', 'C', '1', 'system:menu:list', 'tree-table', 'admin', '2023-04-23 14:35:29', '', NULL, '菜单管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('103', '部门管理', '1', 4, 'dept', 'system/dept/index', '', '0', '0', 'C', '1', 'system:dept:list', 'tree', 'admin', '2023-04-23 14:35:29', '', NULL, '部门管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('104', '岗位管理', '1', 5, 'post', 'system/post/index', '', '0', '0', 'C', '1', 'system:post:list', 'post', 'admin', '2023-04-23 14:35:29', '', NULL, '岗位管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('105', '字典管理', '1', 6, 'dict', 'system/dict/index', '', '0', '0', 'C', '1', 'system:dict:list', 'documentation', 'admin', '2022-08-15 18:01:28', 'admin', '2023-05-31 11:15:14', '字典管理菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('106', '参数设置', '1', 7, 'config', 'system/config/index', '', '0', '0', 'C', '1', 'system:config:list', 'edit', 'admin', '2022-08-15 18:01:28', 'admin', '2023-05-24 21:13:11', '参数设置菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('109', '登录用户', '2', 1, 'online', 'monitor/online/index', '', '0', '0', 'C', '1', 'monitor:online:list', 'online', 'admin', '2023-05-27 22:22:18', 'admin', '2023-05-30 09:49:35', '在线用户菜单', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1000', '用户查询', '100', 1, '', '', '', '0', '0', 'F', '1', 'system:user:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1001', '用户新增', '100', 2, '', '', '', '0', '0', 'F', '1', 'system:user:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1002', '用户修改', '100', 3, '', '', '', '0', '0', 'F', '1', 'system:user:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1003', '用户删除', '100', 4, '', '', '', '0', '0', 'F', '1', 'system:user:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1004', '用户导出', '100', 5, '', '', '', '0', '0', 'F', '1', 'system:user:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1005', '用户导入', '100', 6, '', '', '', '0', '0', 'F', '1', 'system:user:import', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1006', '重置密码', '100', 7, '', '', '', '0', '0', 'F', '1', 'system:user:resetPwd', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1007', '角色查询', '101', 1, '', '', '', '0', '0', 'F', '1', 'system:role:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1008', '角色新增', '101', 2, '', '', '', '0', '0', 'F', '1', 'system:role:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1009', '角色修改', '101', 3, '', '', '', '0', '0', 'F', '1', 'system:role:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1010', '角色删除', '101', 4, '', '', '', '0', '0', 'F', '1', 'system:role:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1011', '角色导出', '101', 5, '', '', '', '0', '0', 'F', '1', 'system:role:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1012', '菜单查询', '102', 1, '', '', '', '0', '0', 'F', '1', 'system:menu:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1013', '菜单新增', '102', 2, '', '', '', '0', '0', 'F', '1', 'system:menu:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1014', '菜单修改', '102', 3, '', '', '', '0', '0', 'F', '1', 'system:menu:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1015', '菜单删除', '102', 4, '', '', '', '0', '0', 'F', '1', 'system:menu:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1016', '部门查询', '103', 1, '', '', '', '0', '0', 'F', '1', 'system:dept:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1017', '部门新增', '103', 2, '', '', '', '0', '0', 'F', '1', 'system:dept:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1018', '部门修改', '103', 3, '', '', '', '0', '0', 'F', '1', 'system:dept:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1019', '部门删除', '103', 4, '', '', '', '0', '0', 'F', '1', 'system:dept:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1020', '岗位查询', '104', 1, '', '', '', '0', '0', 'F', '1', 'system:post:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1021', '岗位新增', '104', 2, '', '', '', '0', '0', 'F', '1', 'system:post:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1022', '岗位修改', '104', 3, '', '', '', '0', '0', 'F', '1', 'system:post:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1023', '岗位删除', '104', 4, '', '', '', '0', '0', 'F', '1', 'system:post:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1024', '岗位导出', '104', 5, '', '', '', '0', '0', 'F', '1', 'system:post:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1025', '字典查询', '105', 1, '#', '', '', '0', '0', 'F', '1', 'system:dict:query', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1026', '字典新增', '105', 2, '#', '', '', '0', '0', 'F', '1', 'system:dict:add', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1027', '字典修改', '105', 3, '#', '', '', '0', '0', 'F', '1', 'system:dict:edit', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1028', '字典删除', '105', 4, '#', '', '', '0', '0', 'F', '1', 'system:dict:remove', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1029', '字典导出', '105', 5, '#', '', '', '0', '0', 'F', '1', 'system:dict:export', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1030', '参数查询', '106', 1, '#', '', '', '0', '0', 'F', '1', 'system:config:query', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1031', '参数新增', '106', 2, '#', '', '', '0', '0', 'F', '1', 'system:config:add', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1032', '参数修改', '106', 3, '#', '', '', '0', '0', 'F', '1', 'system:config:edit', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1033', '参数删除', '106', 4, '#', '', '', '0', '0', 'F', '1', 'system:config:remove', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1046', '在线查询', '109', 1, '#', '', '', '0', '0', 'F', '1', 'monitor:online:query', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1047', '批量强退', '109', 2, '#', '', '', '0', '0', 'F', '1', 'monitor:online:batchLogout', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1048', '单条强退', '109', 3, '#', '', '', '0', '0', 'F', '1', 'monitor:online:forceLogout', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1663431933531869185', '租户管理', '1668543448450719745', 1, 'tenant', 'tenant/index', NULL, '0', '0', 'C', '1', 'tenant:list', 'logininfor', 'admin', '2023-05-30 14:27:33', 'admin', '2023-06-13 17:03:52', '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1663432090671468545', '新建租户', '1663431933531869185', 1, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:add', '#', 'admin', '2023-05-30 14:28:10', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1663432193243172865', '修改租户', '1663431933531869185', 2, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:edit', '#', 'admin', '2023-05-30 14:28:35', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1663446141111689218', '查询详情', '1663431933531869185', 3, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:query', '#', 'admin', '2023-05-30 15:24:00', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1666365593968984065', '新增数据源', '1663431933531869185', 5, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:add', '#', 'admin', '2023-06-07 16:44:52', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1666365690861600770', '修改数据源', '1663431933531869185', 6, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:edit', '#', 'admin', '2023-06-07 16:45:15', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1666365815403069442', '删除数据源', '1663431933531869185', 7, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:remove', '#', 'admin', '2023-06-07 16:45:45', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1666365996601196545', '数据源列表', '1663431933531869185', 8, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:list', '#', 'admin', '2023-06-07 16:46:28', '', NULL, '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1666366412382552066', '删除租户', '1663431933531869185', 4, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:remove', '#', 'admin', '2023-06-07 16:48:07', 'admin', '2023-06-13 16:52:20', '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1668543448450719745', '租户管理', '0', 3, 'tenant', NULL, NULL, '0', '0', 'M', '1', NULL, 'component', 'admin', '2023-06-13 16:58:53', 'admin', '2023-06-13 17:03:42', '', '2');
INSERT INTO "qiaoba-boot"."sys_menu" VALUES ('1668544169384468481', '租户初始化', '1668543448450719745', 2, 'initialize', 'tenant/initialize', NULL, '0', '0', 'C', '0', NULL, '#', 'admin', '2023-06-13 17:01:45', 'admin', '2023-06-13 17:03:49', '', '2');

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_post";
CREATE TABLE "qiaoba-boot"."sys_post" (
  "post_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "post_code" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "post_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "post_sort" int4 NOT NULL,
  "status" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."post_id" IS '岗位ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."post_code" IS '岗位编码';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."post_name" IS '岗位名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."post_sort" IS '显示顺序';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."status" IS '状态（1正常 0停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_post"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_post" IS '岗位信息表';

-- ----------------------------
-- Records of sys_post
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_post" VALUES ('1659440467696431105', 'ceo', '总经理', 1, '1', 'admin', '2023-05-19 14:06:53', 'admin', '2023-05-22 14:56:56', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_post" VALUES ('1659440519936487426', 'cto', '技术总监', 2, '1', 'admin', '2023-05-19 14:07:06', 'admin', '2023-05-22 14:57:10', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_post" VALUES ('1659440562026328065', 'hr', '人事', 3, '1', 'admin', '2023-05-19 14:07:16', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_post" VALUES ('1659440712018833410', 'acct', '会计', 4, '1', 'admin', '2023-05-19 14:07:51', '', NULL, NULL, '2');

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_role";
CREATE TABLE "qiaoba-boot"."sys_role" (
  "role_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "role_name" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "role_key" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "role_sort" int4 NOT NULL,
  "data_scope" char(1) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."role_id" IS '角色ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."role_name" IS '角色名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."role_key" IS '角色权限字符串';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."role_sort" IS '显示顺序';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."data_scope" IS '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."status" IS '角色状态（1正常 0停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_role"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_role" IS '角色信息表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_role" VALUES ('1', '超级管理员', 'admin', 1, '1', '1', 'admin', '2023-04-23 14:35:29', 'admin', '2023-06-13 17:02:24', '超级管理员', '2');
INSERT INTO "qiaoba-boot"."sys_role" VALUES ('1660535591067213826', '测试', 'test', 2, '4', '1', 'admin', '2023-05-22 14:38:31', 'admin', '2023-06-15 15:18:56.881', NULL, '2');

-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_role_dept";
CREATE TABLE "qiaoba-boot"."sys_role_dept" (
  "role_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "dept_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_role_dept"."role_id" IS '角色ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_role_dept"."dept_id" IS '部门ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_role_dept"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_role_dept" IS '角色和部门关联表';

-- ----------------------------
-- Records of sys_role_dept
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_role_menu";
CREATE TABLE "qiaoba-boot"."sys_role_menu" (
  "role_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "menu_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_role_menu"."role_id" IS '角色ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_role_menu"."menu_id" IS '菜单ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_role_menu"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_role_menu" IS '角色和菜单关联表';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '2', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '100', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '101', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '102', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '103', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '104', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '105', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '106', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '109', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1000', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1001', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1002', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1003', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1004', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1005', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1006', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1007', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1008', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1009', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1010', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1011', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1012', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1013', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1014', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1015', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1016', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1017', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1018', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1019', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1020', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1021', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1022', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1023', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1024', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1025', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1026', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1027', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1028', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1029', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1030', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1031', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1032', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1033', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1046', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1047', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1048', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1663431933531869185', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1663432090671468545', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1663432193243172865', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1663446141111689218', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1666365593968984065', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1666365690861600770', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1666365815403069442', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1666365996601196545', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1666366412382552066', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1668543448450719745', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1', '1668544169384468481', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1022', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1663431933531869185', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1021', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1020', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1666365815403069442', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1019', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1018', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1017', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1016', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1666365996601196545', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1015', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1014', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1013', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1012', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1668543448450719745', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1663446141111689218', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1666366412382552066', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1668544169384468481', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1033', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1032', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1031', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1030', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1029', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1028', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '2', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1027', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1026', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1025', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1024', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1023', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1663432193243172865', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1000', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1663432090671468545', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1666365690861600770', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1011', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1010', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1666365593968984065', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1008', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '100', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1007', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1006', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '101', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1005', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '102', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1004', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '103', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1048', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1003', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '104', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1047', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1002', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '105', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1046', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1001', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '106', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '109', '2');
INSERT INTO "qiaoba-boot"."sys_role_menu" VALUES ('1660535591067213826', '1009', '2');

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_tenant";
CREATE TABLE "qiaoba-boot"."sys_tenant" (
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "company_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "contact_name" varchar(30) COLLATE "pg_catalog"."default",
  "contact_phone" varchar(20) COLLATE "pg_catalog"."default",
  "address" varchar(255) COLLATE "pg_catalog"."default",
  "profile" varchar(500) COLLATE "pg_catalog"."default",
  "license_number" varchar(30) COLLATE "pg_catalog"."default",
  "domain" varchar(50) COLLATE "pg_catalog"."default",
  "expire_time" timestamp(6),
  "account_count" int8,
  "status" char(1) COLLATE "pg_catalog"."default",
  "mode" char(1) COLLATE "pg_catalog"."default",
  "initialized" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."company_name" IS '公司名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."contact_name" IS '联系人名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."contact_phone" IS '联系人电话';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."address" IS '公司地址';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."profile" IS '公司简介';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."license_number" IS '统一社会信用代码';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."domain" IS '域名';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."expire_time" IS '过期时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."account_count" IS '用户数量';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."status" IS '状态';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."mode" IS '模式';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."initialized" IS '是否已初始化';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant"."remark" IS '备注';
COMMENT ON TABLE "qiaoba-boot"."sys_tenant" IS '租户表';

-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_tenant" VALUES ('1', '主系统', '111', '111', '11', '11122', '111', NULL, '2099-05-30 23:59:59', 111, '1', '3', NULL, 'admin', '2023-05-30 15:18:04', 'admin', '2023-06-13 16:04:04', '111');
INSERT INTO "qiaoba-boot"."sys_tenant" VALUES ('2', '副系统', '111', '111', '11', '11122', '111', NULL, '2023-06-30 15:27:02', 111, '1', '3', NULL, 'admin', '2023-06-07 14:36:11', 'admin', '2023-06-13 16:20:35', '111');
INSERT INTO "qiaoba-boot"."sys_tenant" VALUES ('1668531266220535809', '而且其', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', '3', '1', 'admin', '2023-06-13 16:10:28', 'admin', '2023-06-13 16:24:03', NULL);

-- ----------------------------
-- Table structure for sys_tenant_datasource
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_tenant_datasource";
CREATE TABLE "qiaoba-boot"."sys_tenant_datasource" (
  "datasource_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "type" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "ip" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "port" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
  "name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "password" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "init_count" int4,
  "min_count" int4,
  "max_count" int4,
  "is_primary" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."type" IS '类型';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."ip" IS 'IP';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."port" IS '端口';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."name" IS '名称';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."username" IS '账号';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."password" IS '密码';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."init_count" IS '初始连接数';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."min_count" IS '最小空闲数';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."max_count" IS '最大连接数';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."is_primary" IS '主要数据源';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_tenant_datasource"."remark" IS '备注';
COMMENT ON TABLE "qiaoba-boot"."sys_tenant_datasource" IS '租户数据源';

-- ----------------------------
-- Records of sys_tenant_datasource
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_tenant_datasource" VALUES ('166160396877907998', 'MySQL', '192.168.0.202', '3306', 'qiaoba-boot', 'root', 'Root123456789.', 5, 10, 20, '1', 'admin', '2023-06-07 14:36:11', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_tenant_datasource" VALUES ('166160396877907999', 'MySQL', '192.168.0.203', '3306', 'qiaoba-boot', 'root', 'Root123456789.', 5, 10, 20, '1', 'admin', '2023-06-07 14:36:11', '', NULL, NULL, '2');
INSERT INTO "qiaoba-boot"."sys_tenant_datasource" VALUES ('166160396877908000', 'MySQL', '127.0.0.1', '3306', 'qiaoba-boot', 'root', 'root', 5, 10, 20, '1', 'admin', '2023-06-07 14:36:11', '', NULL, NULL, '2');

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_user";
CREATE TABLE "qiaoba-boot"."sys_user" (
  "user_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "dept_id" varchar(64) COLLATE "pg_catalog"."default",
  "username" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "nickname" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "email" varchar(50) COLLATE "pg_catalog"."default",
  "phone" varchar(11) COLLATE "pg_catalog"."default",
  "gender" char(1) COLLATE "pg_catalog"."default",
  "avatar" varchar(100) COLLATE "pg_catalog"."default",
  "password" varchar(100) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_user" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_user" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."user_id" IS '用户ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."dept_id" IS '部门ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."username" IS '用户账号';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."nickname" IS '用户昵称';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."email" IS '用户邮箱';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."phone" IS '手机号码';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."gender" IS '用户性别（0男 1女 2未知）';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."avatar" IS '头像地址';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."password" IS '密码';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."status" IS '帐号状态（1正常 0停用）';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."create_user" IS '创建者';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."create_time" IS '创建时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."update_user" IS '更新者';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."update_time" IS '更新时间';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."remark" IS '备注';
COMMENT ON COLUMN "qiaoba-boot"."sys_user"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_user" IS '用户信息表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_user" VALUES ('1', '1659443064624918529', 'admin', '小王', '4567@163.com', '18800001124', '1', '/resource/2023/05/19/blob/37f932d6ae4541d7b9688de6ab0b9f50.blob', '$2a$10$otwytPwmUHPy04dCf8S6I.Za7D.xGQ5MJOdEQk8fWTHCWDJCayur.', '1', 'admin', '2023-05-08 15:16:53', 'admin', '2023-05-23 10:11:24', NULL, '2');
INSERT INTO "qiaoba-boot"."sys_user" VALUES ('1660830718629277697', '1659443006122766337', 'admin1', 'qq', '', '', '0', '', '$2a$10$cuijP9wZFpayVeJvL89B7OCTU1/UdCvVIHdTbvf3UhQnohLG.OSJ.', '1', 'admin', '2023-05-23 10:11:15', 'admin', '2023-06-15 15:18:28.784', '23123', '2');
INSERT INTO "qiaoba-boot"."sys_user" VALUES ('1669254011136786433', '1659443184389074946', 'abc12345', '12313', NULL, NULL, '0', NULL, '$2a$10$P2apMJ1qZgxHLffvuWgkgOVdm.LiWvDziTRFXTDfbnP6pmnt4e6IG', '1', 'admin', '2023-06-15 16:02:24.138', NULL, NULL, NULL, '2');

-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_user_post";
CREATE TABLE "qiaoba-boot"."sys_user_post" (
  "user_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "post_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_user_post"."user_id" IS '用户ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user_post"."post_id" IS '岗位ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user_post"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_user_post" IS '用户与岗位关联表';

-- ----------------------------
-- Records of sys_user_post
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_user_post" VALUES ('1650123803828019202', '1659440467696431105', '2');
INSERT INTO "qiaoba-boot"."sys_user_post" VALUES ('1650123803828019202', '1659440519936487426', '2');
INSERT INTO "qiaoba-boot"."sys_user_post" VALUES ('1660830718629277697', '1659440467696431105', '2');

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS "qiaoba-boot"."sys_user_role";
CREATE TABLE "qiaoba-boot"."sys_user_role" (
  "user_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "role_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "qiaoba-boot"."sys_user_role"."user_id" IS '用户ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user_role"."role_id" IS '角色ID';
COMMENT ON COLUMN "qiaoba-boot"."sys_user_role"."tenant_id" IS '租户ID';
COMMENT ON TABLE "qiaoba-boot"."sys_user_role" IS '用户和角色关联表';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO "qiaoba-boot"."sys_user_role" VALUES ('1', '1', '2');
INSERT INTO "qiaoba-boot"."sys_user_role" VALUES ('1660830718629277697', '1660535591067213826', '2');

-- ----------------------------
-- Primary Key structure for table sys_config
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_config" ADD CONSTRAINT "sys_config_pkey" PRIMARY KEY ("config_id");

-- ----------------------------
-- Primary Key structure for table sys_dept
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_dept" ADD CONSTRAINT "sys_dept_pkey" PRIMARY KEY ("dept_id");

-- ----------------------------
-- Primary Key structure for table sys_dict_data
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_dict_data" ADD CONSTRAINT "sys_dict_data_pkey" PRIMARY KEY ("dict_code");

-- ----------------------------
-- Indexes structure for table sys_dict_type
-- ----------------------------
CREATE INDEX "dict_type" ON "qiaoba-boot"."sys_dict_type" USING btree (
  "dict_type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table sys_dict_type
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_dict_type" ADD CONSTRAINT "sys_dict_type_pkey" PRIMARY KEY ("dict_id");

-- ----------------------------
-- Primary Key structure for table sys_login_log
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_login_log" ADD CONSTRAINT "sys_login_log_pkey" PRIMARY KEY ("login_id");

-- ----------------------------
-- Primary Key structure for table sys_menu
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_menu" ADD CONSTRAINT "sys_menu_pkey" PRIMARY KEY ("menu_id");

-- ----------------------------
-- Primary Key structure for table sys_post
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_post" ADD CONSTRAINT "sys_post_pkey" PRIMARY KEY ("post_id");

-- ----------------------------
-- Primary Key structure for table sys_role
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_role" ADD CONSTRAINT "sys_role_pkey" PRIMARY KEY ("role_id");

-- ----------------------------
-- Primary Key structure for table sys_role_dept
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_role_dept" ADD CONSTRAINT "sys_role_dept_pkey" PRIMARY KEY ("role_id", "dept_id", "tenant_id");

-- ----------------------------
-- Primary Key structure for table sys_role_menu
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_role_menu" ADD CONSTRAINT "sys_role_menu_pkey" PRIMARY KEY ("role_id", "menu_id", "tenant_id");

-- ----------------------------
-- Primary Key structure for table sys_tenant
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_tenant" ADD CONSTRAINT "sys_tenant_pkey" PRIMARY KEY ("tenant_id");

-- ----------------------------
-- Primary Key structure for table sys_tenant_datasource
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_tenant_datasource" ADD CONSTRAINT "sys_tenant_datasource_pkey" PRIMARY KEY ("datasource_id");

-- ----------------------------
-- Primary Key structure for table sys_user
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_user" ADD CONSTRAINT "sys_user_pkey" PRIMARY KEY ("user_id");

-- ----------------------------
-- Primary Key structure for table sys_user_post
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_user_post" ADD CONSTRAINT "sys_user_post_pkey" PRIMARY KEY ("user_id", "post_id", "tenant_id");

-- ----------------------------
-- Primary Key structure for table sys_user_role
-- ----------------------------
ALTER TABLE "qiaoba-boot"."sys_user_role" ADD CONSTRAINT "sys_user_role_pkey" PRIMARY KEY ("user_id", "role_id", "tenant_id");
