/*
 Navicat Premium Data Transfer

 Source Server         : 嘉策线上
 Source Server Type    : MySQL
 Source Server Version : 50735
 Source Host           : 121.5.136.69:3306
 Source Schema         : qiaoba-boot

 Target Server Type    : MySQL
 Target Server Version : 50735
 File Encoding         : 65001

 Date: 24/05/2023 21:33:23
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config`  (
  `config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '参数主键',
  `config_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数名称',
  `config_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键名',
  `config_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键值',
  `config_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '系统内置（Y是 N否）',
  `create_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL,
  PRIMARY KEY (`config_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1661363988810563586 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '参数配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO `sys_config` VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2022-08-15 18:01:28', '', NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', 1);
INSERT INTO `sys_config` VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2022-08-15 18:01:28', '', NULL, '初始化密码 123456', 1);
INSERT INTO `sys_config` VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2022-08-15 18:01:28', '', NULL, '深色主题theme-dark，浅色主题theme-light', 1);
INSERT INTO `sys_config` VALUES (4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'false', 'Y', 'admin', '2022-08-15 18:01:28', '', '2022-10-28 15:45:36', '是否开启验证码功能（true开启，false关闭）', 1);
INSERT INTO `sys_config` VALUES (5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2022-08-15 18:01:28', '', '2022-09-28 14:15:30', '是否开启注册用户功能（true开启，false关闭）', 1);
INSERT INTO `sys_config` VALUES (6, '账号自助-黑名单开关', 'sys.account.blacklistOnOff', 'true', 'Y', 'admin', '2022-09-20 11:53:11', '', '2022-09-20 11:53:30', '是否开启注册黑名单功能（true开启，false关闭）', 1);

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept`  (
  `dept_id` bigint(20) NOT NULL COMMENT '部门id',
  `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父部门id',
  `ancestors` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '祖级列表',
  `dept_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
  `order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `leader` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人ID',
  `phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `email` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '部门状态（1正常 0停用）',
  `create_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `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, 1);
INSERT INTO `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, 1);
INSERT INTO `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, 1);
INSERT INTO `sys_dept` VALUES (1659443154873757697, 1659443006122766337, '0,1659442897402212353,1659443006122766337', '合肥分公司', 1, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:34', '', NULL, NULL, 1);
INSERT INTO `sys_dept` VALUES (1659443184389074946, 1659443006122766337, '0,1659442897402212353,1659443006122766337', '芜湖分公司', 2, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:41', '', NULL, NULL, 1);
INSERT INTO `sys_dept` VALUES (1659443224335626242, 1659443064624918529, '0,1659442897402212353,1659443064624918529', '南京分公司', 1, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:50', '', NULL, NULL, 1);
INSERT INTO `sys_dept` VALUES (1659443256656932865, 1659443064624918529, '0,1659442897402212353,1659443064624918529', '苏州分公司', 2, NULL, NULL, NULL, '1', 'admin', '2023-05-19 14:17:58', '', NULL, NULL, 1);
INSERT INTO `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, 1);

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu`  (
  `menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
  `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父菜单ID',
  `order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路由地址',
  `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径',
  `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路由参数',
  `is_frame` int(11) NULL DEFAULT 1 COMMENT '是否为外链（1是 0否）',
  `is_cache` int(11) NULL DEFAULT 0 COMMENT '是否缓存（1缓存 0不缓存）',
  `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单类型（M目录 C菜单 F按钮）',
  `is_visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '菜单状态（1显示 0隐藏）',
  `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '#' COMMENT '菜单图标',
  `create_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL,
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, 1, 'system', NULL, '', 0, 0, 'M', '1', '', 'system', 'admin', '2023-04-23 14:35:29', '', NULL, '系统管理目录', 1);
INSERT INTO `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, '用户管理菜单', 1);
INSERT INTO `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, '角色管理菜单', 1);
INSERT INTO `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, '菜单管理菜单', 1);
INSERT INTO `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, '部门管理菜单', 1);
INSERT INTO `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, '岗位管理菜单', 1);
INSERT INTO `sys_menu` VALUES (106, '参数设置', 1, 7, 'config', 'system/config/index', '', 1, 0, 'C', '1', 'system:config:list', 'edit', 'admin', '2022-08-15 18:01:28', 'admin', '2023-05-24 21:13:11', '参数设置菜单', 1);
INSERT INTO `sys_menu` VALUES (1000, '用户查询', 100, 1, '', '', '', 0, 0, 'F', '1', 'system:user:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1001, '用户新增', 100, 2, '', '', '', 0, 0, 'F', '1', 'system:user:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1002, '用户修改', 100, 3, '', '', '', 0, 0, 'F', '1', 'system:user:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1003, '用户删除', 100, 4, '', '', '', 0, 0, 'F', '1', 'system:user:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1004, '用户导出', 100, 5, '', '', '', 0, 0, 'F', '1', 'system:user:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1005, '用户导入', 100, 6, '', '', '', 0, 0, 'F', '1', 'system:user:import', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1006, '重置密码', 100, 7, '', '', '', 0, 0, 'F', '1', 'system:user:resetPwd', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1007, '角色查询', 101, 1, '', '', '', 0, 0, 'F', '1', 'system:role:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1008, '角色新增', 101, 2, '', '', '', 0, 0, 'F', '1', 'system:role:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1009, '角色修改', 101, 3, '', '', '', 0, 0, 'F', '1', 'system:role:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1010, '角色删除', 101, 4, '', '', '', 0, 0, 'F', '1', 'system:role:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1011, '角色导出', 101, 5, '', '', '', 0, 0, 'F', '1', 'system:role:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1012, '菜单查询', 102, 1, '', '', '', 0, 0, 'F', '1', 'system:menu:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1013, '菜单新增', 102, 2, '', '', '', 0, 0, 'F', '1', 'system:menu:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1014, '菜单修改', 102, 3, '', '', '', 0, 0, 'F', '1', 'system:menu:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1015, '菜单删除', 102, 4, '', '', '', 0, 0, 'F', '1', 'system:menu:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1016, '部门查询', 103, 1, '', '', '', 0, 0, 'F', '1', 'system:dept:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1017, '部门新增', 103, 2, '', '', '', 0, 0, 'F', '1', 'system:dept:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1018, '部门修改', 103, 3, '', '', '', 0, 0, 'F', '1', 'system:dept:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1019, '部门删除', 103, 4, '', '', '', 0, 0, 'F', '1', 'system:dept:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1020, '岗位查询', 104, 1, '', '', '', 0, 0, 'F', '1', 'system:post:query', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1021, '岗位新增', 104, 2, '', '', '', 0, 0, 'F', '1', 'system:post:add', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1022, '岗位修改', 104, 3, '', '', '', 0, 0, 'F', '1', 'system:post:edit', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1023, '岗位删除', 104, 4, '', '', '', 1, 0, 'F', '1', 'system:post:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1024, '岗位导出', 104, 5, '', '', '', 1, 0, 'F', '1', 'system:post:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1030, '参数查询', 106, 1, '#', '', '', 1, 0, 'F', '1', 'system:config:query', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1031, '参数新增', 106, 2, '#', '', '', 1, 0, 'F', '1', 'system:config:add', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1032, '参数修改', 106, 3, '#', '', '', 1, 0, 'F', '1', 'system:config:edit', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1033, '参数删除', 106, 4, '#', '', '', 1, 0, 'F', '1', 'system:config:remove', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post`  (
  `post_id` bigint(20) NOT NULL COMMENT '岗位ID',
  `post_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位编码',
  `post_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位名称',
  `post_sort` int(11) NOT NULL COMMENT '显示顺序',
  `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '状态（1正常 0停用）',
  `create_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '岗位信息表' ROW_FORMAT = DYNAMIC;

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

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色权限字符串',
  `role_sort` int(11) NOT NULL COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色状态（1正常 0停用）',
  `create_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '4', '1', 'admin', '2023-04-23 14:35:29', 'admin', '2023-05-24 21:26:16', '超级管理员', 1);
INSERT INTO `sys_role` VALUES (1660535591067213826, '测试', 'test', 1, '1', '1', 'admin', '2023-05-22 14:38:31', '', NULL, NULL, 1);

-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept`  (
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  `dept_id` bigint(20) NOT NULL COMMENT '部门ID',
  `tenant_id` bigint(20) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`role_id`, `dept_id`, `tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和部门关联表' ROW_FORMAT = DYNAMIC;

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

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu`  (
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  `menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
  `tenant_id` bigint(20) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`role_id`, `menu_id`, `tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (1, 1, 1);
INSERT INTO `sys_role_menu` VALUES (1, 100, 1);
INSERT INTO `sys_role_menu` VALUES (1, 101, 1);
INSERT INTO `sys_role_menu` VALUES (1, 102, 1);
INSERT INTO `sys_role_menu` VALUES (1, 103, 1);
INSERT INTO `sys_role_menu` VALUES (1, 104, 1);
INSERT INTO `sys_role_menu` VALUES (1, 106, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1000, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1001, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1002, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1003, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1004, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1005, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1006, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1007, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1008, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1009, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1010, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1011, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1012, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1013, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1014, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1015, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1016, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1017, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1018, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1019, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1020, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1021, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1022, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1023, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1024, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1030, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1031, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1032, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1033, 1);

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
  `nickname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户昵称',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户邮箱',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号码',
  `gender` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '用户性别（0男 1女 2未知）',
  `avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像地址',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '帐号状态（1正常 0停用）',
  `is_superuser` tinyint(1) NULL DEFAULT 0 COMMENT '是否是超管(0否1是)',
  `is_manager` tinyint(1) NULL DEFAULT 0 COMMENT '是否是管理员(0否1是)',
  `create_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1660830718629277698 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1650123803828019202, 1659443064624918529, 'admin', '小王', '4567@163.com', '18800001124', '1', '/resource/2023/05/19/blob/37f932d6ae4541d7b9688de6ab0b9f50.blob', '$2a$10$otwytPwmUHPy04dCf8S6I.Za7D.xGQ5MJOdEQk8fWTHCWDJCayur.', '1', 0, 1, 'admin', '2023-05-08 15:16:53', 'admin', '2023-05-23 10:11:24', NULL, 1);
INSERT INTO `sys_user` VALUES (1660830718629277697, 1659443256656932865, 'admin1', 'qq', '', '', '0', '', '$2a$10$3au7K8fwJIjVVgGUNAxcDOysbE5717wFw50PIAR/.x1yzJ26RBlHi', '1', 0, 0, 'admin', '2023-05-23 10:11:15', '', NULL, NULL, 1);

-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_post`;
CREATE TABLE `sys_user_post`  (
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `post_id` bigint(20) NOT NULL COMMENT '岗位ID',
  `tenant_id` bigint(20) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`user_id`, `post_id`, `tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user_post
-- ----------------------------
INSERT INTO `sys_user_post` VALUES (1650123803828019202, 1659440467696431105, 1);
INSERT INTO `sys_user_post` VALUES (1650123803828019202, 1659440519936487426, 1);
INSERT INTO `sys_user_post` VALUES (1660830718629277697, 1659440467696431105, 1);

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`  (
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  `tenant_id` bigint(20) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`user_id`, `role_id`, `tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1650123803828019202, 1, 1);
INSERT INTO `sys_user_role` VALUES (1660830718629277697, 1660535591067213826, 1);

SET FOREIGN_KEY_CHECKS = 1;
