/*
 Navicat Premium Data Transfer

 Source Server         : 虚拟机-202-MySQL
 Source Server Type    : MySQL
 Source Server Version : 50742
 Source Host           : 192.168.0.202:3306
 Source Schema         : qiaoba-boot

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

 Date: 13/07/2023 17:28:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for generator_table
-- ----------------------------
DROP TABLE IF EXISTS `generator_table`;
CREATE TABLE `generator_table`  (
  `table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `table_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表名称',
  `table_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表描述',
  `class_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '实体类名称',
  `package_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成包路径',
  `module_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成模块名',
  `business_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成业务名',
  `function_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能名',
  `author` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能作者',
  `parent_menu_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父级菜单ID',
  `doc_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '文档开关',
  `excel_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT 'Excel导出开关',
  PRIMARY KEY (`table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1676757962154688514 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of generator_table
-- ----------------------------
INSERT INTO `generator_table` VALUES (1676757962154688513, 'test_user', '用户信息表', 'TestUser', 'com.qiaoba.module.generator', 'generator', 'user', '用户信息', 'Ailanyin', NULL, '0', '0');

-- ----------------------------
-- Table structure for generator_table_column
-- ----------------------------
DROP TABLE IF EXISTS `generator_table_column`;
CREATE TABLE `generator_table_column`  (
  `column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `table_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归属表编号',
  `column_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列名称',
  `column_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列描述',
  `column_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列类型',
  `java_type` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA类型',
  `java_field` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA字段名',
  `is_pk` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否主键（1是）',
  `is_required` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否必填（1是）',
  `is_insert` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否为插入字段（1是）',
  `is_edit` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否编辑字段（1是）',
  `is_list` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否列表字段（1是）',
  `is_query` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否查询字段（1是）',
  `query_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'EQ' COMMENT '查询方式（等于、不等于、大于、小于、范围）',
  `html_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）',
  `dict_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型',
  `sort` int(11) NULL DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`column_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1676757962507010050 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of generator_table_column
-- ----------------------------
INSERT INTO `generator_table_column` VALUES (1676757962225991682, '1676757962154688513', 'user_id', '用户ID123', 'bigint(200)', 'Long', 'userId', '1', '0', '1', '1', '1', '0', 'EQ', 'input', '', 1);
INSERT INTO `generator_table_column` VALUES (1676757962242768898, '1676757962154688513', 'dept_id', '部门ID', 'bigint(20)', 'Long', 'deptId', '0', '0', '1', '1', '1', '0', 'EQ', 'input', '', 2);
INSERT INTO `generator_table_column` VALUES (1676757962255351810, '1676757962154688513', 'username', '用户账号', 'varchar(30)', 'String', 'username', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3);
INSERT INTO `generator_table_column` VALUES (1676757962276323329, '1676757962154688513', 'nickname', '用户昵称', 'varchar(30)', 'String', 'nickname', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4);
INSERT INTO `generator_table_column` VALUES (1676757962293100546, '1676757962154688513', 'email', '用户邮箱', 'varchar(50)', 'String', 'email', '0', '0', '1', '1', '1', '0', 'EQ', 'input', '', 5);
INSERT INTO `generator_table_column` VALUES (1676757962314072066, '1676757962154688513', 'phone', '手机号码', 'varchar(11)', 'String', 'phone', '0', '0', '1', '1', '1', '1', 'LIKE', 'input', '', 6);
INSERT INTO `generator_table_column` VALUES (1676757962330849282, '1676757962154688513', 'gender', '用户性别（0男 1女 2未知）', 'char(1)', 'String', 'gender', '0', '0', '1', '1', '1', '0', 'EQ', 'select', '', 7);
INSERT INTO `generator_table_column` VALUES (1676757962347626498, '1676757962154688513', 'avatar', '头像地址', 'varchar(100)', 'String', 'avatar', '0', '0', '1', '1', '1', '0', 'EQ', 'input', '', 8);
INSERT INTO `generator_table_column` VALUES (1676757962364403714, '1676757962154688513', 'password', '密码', 'varchar(100)', 'String', 'password', '0', '0', '1', '1', '1', '0', 'EQ', 'input', '', 9);
INSERT INTO `generator_table_column` VALUES (1676757962423123970, '1676757962154688513', 'status', '帐号状态（1正常 0停用）', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '0', 'EQ', 'radio', '', 10);
INSERT INTO `generator_table_column` VALUES (1676757962439901185, '1676757962154688513', 'create_user', '创建者', 'varchar(64)', 'String', 'createUser', '0', '0', '0', '0', '0', '0', 'EQ', 'input', '', 11);
INSERT INTO `generator_table_column` VALUES (1676757962456678402, '1676757962154688513', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', '0', '0', '0', '0', 'EQ', 'datetime', '', 12);
INSERT INTO `generator_table_column` VALUES (1676757962469261313, '1676757962154688513', 'update_user', '更新者', 'varchar(64)', 'String', 'updateUser', '0', '0', '0', '0', '0', '0', 'EQ', 'input', '', 13);
INSERT INTO `generator_table_column` VALUES (1676757962486038530, '1676757962154688513', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', '0', '0', '0', '0', 'EQ', 'datetime', '', 14);
INSERT INTO `generator_table_column` VALUES (1676757962507010049, '1676757962154688513', 'tenant_id', '租户ID', 'bigint(20)', 'Long', 'tenantId', '0', '0', '0', '0', '0', '0', 'EQ', 'input', '', 15);

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config`  (
  `config_id` bigint(20) NOT NULL COMMENT '参数主键',
  `config_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数名称',
  `config_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键名',
  `config_value` varchar(30) 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 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '参数配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO `sys_config` VALUES (1661598740507910145, 'Token有效期', 'sys.token.expireTime', '96', 'Y', 'admin', '2023-05-25 13:22:50', 'admin', '2023-05-25 15:02:42', '单位：小时，仅支持正整数', 1);
INSERT INTO `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关闭）', 1);
INSERT INTO `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关闭）', 1);
INSERT INTO `sys_config` VALUES (1661603968779079681, '登录验证码开关', 'sys.account.captchaOnOff', 'false', 'Y', 'admin', '2023-05-25 13:23:52', 'admin', '2023-07-05 11:02:12', '（true开启，false关闭）', 1);
INSERT INTO `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', 1);
INSERT INTO `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', 1);
INSERT INTO `sys_config` VALUES (1668426274817994753, '登陆最大错误次数', 'sys.account.loginErrorMaxCount', '10', 'Y', 'admin', '2023-06-13 09:13:16', 'admin', '2023-06-13 09:35:59', '超过次数, 就会被拉黑', 1);
INSERT INTO `sys_config` VALUES (1668428263694135297, '黑名单过期时间', 'sys.account.blacklistExpireTime', '30', 'Y', 'admin', '2023-06-13 09:21:11', 'admin', '2023-06-13 09:35:29', '拉黑时间,  单位：分钟, 仅支持正整数', 1);
INSERT INTO `sys_config` VALUES (1670692775595900930, '登录日志开关', 'sys.login.loginLogOnOff', 'true', 'Y', 'admin', '2023-06-19 15:19:32', 'admin', '2023-06-19 15:34:42', '登录日志开关', 1);
INSERT INTO `sys_config` VALUES (1670696367736258562, '账号同时在线开关', 'sys.account.allowBothOnline', 'false', 'Y', 'admin', '2023-06-19 15:33:49', 'admin', '2023-07-07 11:26:04', '同时在线开关', 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(11) 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', 'admin', '2023-05-25 13:31:01', 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_dict_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_data`;
CREATE TABLE `sys_dict_data`  (
  `dict_code` bigint(20) NOT NULL COMMENT '字典编码',
  `dict_sort` int(11) NULL DEFAULT 0 COMMENT '字典排序',
  `dict_label` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典标签',
  `dict_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典键值',
  `dict_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型',
  `css_class` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式属性（其他样式扩展）',
  `list_class` varchar(100) 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 '状态（0正常 1停用）',
  `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 (`dict_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
INSERT INTO `sys_dict_data` VALUES (1676129748713590786, 1, '男', '1', 'dict_sex', NULL, 'default', '1', 'admin', '2023-07-04 15:24:08', '', NULL, NULL, 1);
INSERT INTO `sys_dict_data` VALUES (1676129776555380737, 2, '女', '2', 'dict_sex', NULL, 'default', '1', 'admin', '2023-07-04 15:24:14', '', NULL, NULL, 1);
INSERT INTO `sys_dict_data` VALUES (1676129808423702529, 3, '未知', '3', 'dict_sex', NULL, 'default', '1', 'admin', '2023-07-04 15:24:22', '', NULL, NULL, 1);

-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type`  (
  `dict_id` bigint(20) NOT NULL COMMENT '字典主键',
  `dict_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典名称',
  `dict_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型',
  `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `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 (`dict_id`) USING BTREE,
  UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO `sys_dict_type` VALUES (1676129683357945858, '性别', 'dict_sex', '1', 'admin', '2023-07-04 15:23:52', '', NULL, NULL, 1);

-- ----------------------------
-- Table structure for sys_login_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_login_log`;
CREATE TABLE `sys_login_log`  (
  `login_id` bigint(20) NOT NULL,
  `device_sn` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录账号',
  `nickname` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
  `ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '访问IP',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '浏览器',
  `os` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作系统',
  `login_time` datetime NULL DEFAULT NULL COMMENT '登录时间',
  `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 (`login_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '登录日志' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_login_log
-- ----------------------------
INSERT INTO `sys_login_log` VALUES (1677244196215947265, '02d96e130ca945b8af2a59a9b7bcb198', 'admin', '小王', '192.168.0.200', '0|0|0|内网IP|内网IP', 'Firefox|114.0', 'OSX', '2023-07-07 17:12:33', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1677251105694265345, '2eeea51df0234e4ab9e8ec4e3998c13a', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-07 17:40:00', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1677251274879905793, '3b2bd9c401d14b76a6b310d2bee66df6', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-07 17:40:40', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1677252021637984257, '10c302a859204d9482ce107dc6cf345d', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-07 17:43:38', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1678205404947537921, 'cb80f07af11740e8aaf215f212911ac0', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-10 08:52:03', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1678206680972255234, '1a8775debaa043b285057422d1178d45', 'admin', '小王', '192.168.0.201', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-10 08:57:07', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1678310447323394049, '611a69a132a5466b9f2bc95c96abe191', 'admin', '小王', '192.168.0.200', '0|0|0|内网IP|内网IP', 'Firefox|114.0', 'OSX', '2023-07-10 15:49:27', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1679333614585143297, 'f85ca74deb1940a7a31ce563e4006d24', 'admin', '小王', '127.0.0.1', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-13 11:35:09', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1679379553597304834, '0c073dfc76e649b3bf21e9cbb5a05ead', 'admin', '小王', '127.0.0.1', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-13 14:37:41', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1679412040377622530, '470d9d8e4be84270b132b91b7b4305ef', 'admin', '小王', '127.0.0.1', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-13 16:46:47', '', NULL, '', NULL, NULL, 1);
INSERT INTO `sys_login_log` VALUES (1679421075671814145, 'eae6a3293cd947988ca358f21d098e5e', 'admin', '小王', '127.0.0.1', '0|0|0|内网IP|内网IP', 'Chrome|114.0.0.0', 'Windows 10 or Windows Server 2016', '2023-07-13 17:22:41', '', NULL, '', NULL, 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(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
  `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父菜单ID',
  `order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `path` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由地址',
  `component` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径',
  `query` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由参数',
  `is_frame` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '是否为外链（1是 0否）',
  `is_cache` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否缓存（1缓存 0不缓存）',
  `menu_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单类型（M目录 C菜单 F按钮）',
  `is_visible` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '菜单状态（1显示 0隐藏）',
  `perms` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '#' COMMENT '菜单图标',
  `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 '' COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL,
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_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 (2, '系统监控', 0, 2, 'monitor', NULL, '', '0', '0', 'M', '1', '', 'monitor', 'admin', '2023-05-27 22:25:03', '', NULL, '系统监控目录', 1);
INSERT INTO `sys_menu` VALUES (3, '开发工具', 0, 4, 'tool', NULL, NULL, '0', '0', 'M', '1', NULL, 'tool', 'admin', '2023-07-03 21:53:02', 'admin', '2023-07-05 13:02:53', '', 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 (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', '字典管理菜单', 1);
INSERT INTO `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', '参数设置菜单', 1);
INSERT INTO `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-06-19 15:29:03', '在线用户菜单', 1);
INSERT INTO `sys_menu` VALUES (116, '代码生成', 3, 1, 'gen', 'tool/gen/index', '', '0', '0', 'C', '1', 'tool:gen:list', 'code', 'admin', '2023-07-03 09:05:56', 'admin', '2023-07-03 21:53:13', '代码生成菜单', 1);
INSERT INTO `sys_menu` VALUES (500, '操作日志', 2, 3, 'operlog', 'monitor/use_log/index', '', '0', '0', 'C', '1', 'monitor:use-log:list', 'log', 'admin', '2022-08-15 18:01:28', 'admin', '2023-07-05 15:19:25', '操作日志菜单', 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, '', '', '', '0', '0', 'F', '1', 'system:post:remove', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1024, '岗位导出', 104, 5, '', '', '', '0', '0', 'F', '1', 'system:post:export', '#', 'admin', '2023-04-23 14:35:29', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1025, '字典查询', 105, 1, '#', '', '', '0', '0', 'F', '1', 'system:dict:query', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1026, '字典新增', 105, 2, '#', '', '', '0', '0', 'F', '1', 'system:dict:add', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1027, '字典修改', 105, 3, '#', '', '', '0', '0', 'F', '1', 'system:dict:edit', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1028, '字典删除', 105, 4, '#', '', '', '0', '0', 'F', '1', 'system:dict:remove', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1029, '字典导出', 105, 5, '#', '', '', '0', '0', 'F', '1', 'system:dict:export', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1030, '参数查询', 106, 1, '#', '', '', '0', '0', 'F', '1', 'system:config:query', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1031, '参数新增', 106, 2, '#', '', '', '0', '0', 'F', '1', 'system:config:add', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1032, '参数修改', 106, 3, '#', '', '', '0', '0', 'F', '1', 'system:config:edit', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1033, '参数删除', 106, 4, '#', '', '', '0', '0', 'F', '1', 'system:config:remove', '#', 'admin', '2022-08-15 18:01:28', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1039, '操作查询', 500, 1, '#', '', '', '0', '0', 'F', '1', 'monitor:use-log:query', '#', 'admin', '2022-08-15 18:01:28', 'admin', '2023-07-05 15:15:09', '', 1);
INSERT INTO `sys_menu` VALUES (1040, '操作删除', 500, 2, '#', '', '', '0', '0', 'F', '1', 'monitor:use-log:remove', '#', 'admin', '2022-08-15 18:01:28', 'admin', '2023-07-05 15:15:15', '', 1);
INSERT INTO `sys_menu` VALUES (1041, '日志导出', 500, 3, '#', '', '', '0', '0', 'F', '1', 'monitor:use-log:export', '#', 'admin', '2022-08-15 18:01:28', 'admin', '2023-07-05 15:15:21', '', 1);
INSERT INTO `sys_menu` VALUES (1046, '在线查询', 109, 1, '#', '', '', '0', '0', 'F', '1', 'monitor:online:query', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1047, '批量强退', 109, 2, '#', '', '', '0', '0', 'F', '1', 'monitor:online:batchLogout', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1048, '单条强退', 109, 3, '#', '', '', '0', '0', 'F', '1', 'monitor:online:forceLogout', '#', 'admin', '2023-05-27 22:22:59', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1055, '生成查询', 116, 1, '#', '', '', '0', '0', 'F', '1', 'tool:gen:query', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1056, '生成修改', 116, 2, '#', '', '', '0', '0', 'F', '1', 'tool:gen:edit', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1057, '生成删除', 116, 3, '#', '', '', '0', '0', 'F', '1', 'tool:gen:remove', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1058, '导入代码', 116, 4, '#', '', '', '0', '0', 'F', '1', 'tool:gen:import', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1059, '预览代码', 116, 5, '#', '', '', '0', '0', 'F', '1', 'tool:gen:preview', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1060, '生成代码', 116, 6, '#', '', '', '0', '0', 'F', '1', 'tool:gen:code', '#', 'admin', '2023-07-03 09:07:41', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1663431933531869184, '租户管理', 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', '', 1);
INSERT INTO `sys_menu` VALUES (1663431933531869185, '租户管理', 1663431933531869184, 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', '', 1);
INSERT INTO `sys_menu` VALUES (1663432090671468545, '新建租户', 1663431933531869185, 1, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:add', '#', 'admin', '2023-05-30 14:28:10', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1663432193243172865, '修改租户', 1663431933531869185, 2, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:edit', '#', 'admin', '2023-05-30 14:28:35', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1663446141111689218, '查询详情', 1663431933531869185, 3, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:query', '#', 'admin', '2023-05-30 15:24:00', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1666365593968984065, '新增数据源', 1663431933531869185, 5, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:add', '#', 'admin', '2023-06-07 16:44:52', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1666365690861600770, '修改数据源', 1663431933531869185, 6, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:edit', '#', 'admin', '2023-06-07 16:45:15', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1666365815403069442, '删除数据源', 1663431933531869185, 7, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:remove', '#', 'admin', '2023-06-07 16:45:45', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1666365996601196545, '数据源列表', 1663431933531869185, 8, '', NULL, NULL, '0', '0', 'F', '1', 'tenant:datasource:list', '#', 'admin', '2023-06-07 16:46:28', '', NULL, '', 1);
INSERT INTO `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', '', 1);
INSERT INTO `sys_menu` VALUES (1668544169384468481, '租户初始化', 1663431933531869184, 2, 'initialize', 'tenant/initialize', NULL, '0', '0', 'C', '0', NULL, '#', 'admin', '2023-06-13 17:01:45', 'admin', '2023-06-21 15:32:27', '', 1);
INSERT INTO `sys_menu` VALUES (1670708064303742978, '登录日志', 2, 2, 'login-log', 'monitor/login_log/index', NULL, '0', '0', 'C', '1', 'monitor:login-log:list', 'logininfor', 'admin', '2023-06-19 16:20:17', 'admin', '2023-07-05 14:47:47', '', 1);
INSERT INTO `sys_menu` VALUES (1670719944372002817, '日志导出', 1670708064303742978, 1, '', NULL, NULL, '0', '0', 'F', '1', 'monitor:login-log:export', '#', 'admin', '2023-06-19 17:07:30', '', NULL, '', 1);
INSERT INTO `sys_menu` VALUES (1670720034851528706, '日志清空', 1670708064303742978, 2, '', NULL, NULL, '0', '0', 'F', '1', 'monitor:login-log:remove', '#', 'admin', '2023-06-19 17:07:51', '', 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(50) 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 utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
  `role_key` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色权限字符串',
  `role_sort` int(11) NOT NULL COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）',
  `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 (`role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', '1', 'admin', '2023-04-23 14:35:29', 'admin', '2023-07-05 14:48:01', '超级管理员', 1);
INSERT INTO `sys_role` VALUES (1660535591067213826, '测试', 'test', 1, '2', '1', 'admin', '2023-05-22 14:38:31', 'admin', '2023-06-21 15:31:52', 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
-- ----------------------------
INSERT INTO `sys_role_dept` VALUES (1660535591067213826, 1659442897402212353, 1);
INSERT INTO `sys_role_dept` VALUES (1660535591067213826, 1659443064624918529, 1);
INSERT INTO `sys_role_dept` VALUES (1660535591067213826, 1659443256656932865, 1);

-- ----------------------------
-- 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, 2, 1);
INSERT INTO `sys_role_menu` VALUES (1, 3, 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, 105, 1);
INSERT INTO `sys_role_menu` VALUES (1, 106, 1);
INSERT INTO `sys_role_menu` VALUES (1, 109, 1);
INSERT INTO `sys_role_menu` VALUES (1, 116, 1);
INSERT INTO `sys_role_menu` VALUES (1, 500, 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, 1025, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1026, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1027, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1028, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1029, 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);
INSERT INTO `sys_role_menu` VALUES (1, 1039, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1040, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1041, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1046, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1047, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1048, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1055, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1056, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1057, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1058, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1059, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1060, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1663431933531869184, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1663431933531869185, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1663432090671468545, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1663432193243172865, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1663446141111689218, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1666365593968984065, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1666365690861600770, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1666365815403069442, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1666365996601196545, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1666366412382552066, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1668544169384468481, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1670708064303742978, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1670719944372002817, 1);
INSERT INTO `sys_role_menu` VALUES (1, 1670720034851528706, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 2, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 100, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 101, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 102, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 104, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 105, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 106, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 109, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1000, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1001, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1002, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1003, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1004, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1005, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1006, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1007, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1008, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1009, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1010, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1011, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1012, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1013, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1014, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1015, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1020, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1021, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1022, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1023, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1024, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1025, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1026, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1027, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1028, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1029, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1030, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1031, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1032, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1033, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1046, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1047, 1);
INSERT INTO `sys_role_menu` VALUES (1660535591067213826, 1048, 1);

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant`;
CREATE TABLE `sys_tenant`  (
  `tenant_id` bigint(20) NOT NULL,
  `company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司名称',
  `contact_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人名称',
  `contact_phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人电话',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司地址',
  `profile` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司简介',
  `license_number` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码',
  `domain` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '域名',
  `expire_time` datetime NULL DEFAULT NULL COMMENT '过期时间',
  `account_count` bigint(20) NULL DEFAULT NULL COMMENT '用户数量',
  `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
  `mode` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模式',
  `initialized` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否已初始化',
  `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 '备注',
  PRIMARY KEY (`tenant_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '租户表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
INSERT INTO `sys_tenant` VALUES (1, '主系统', '111', '111', '11', '11122', '111', NULL, '2099-05-30 23:59:59', 111, '1', '3', '0', 'admin', '2023-05-30 15:18:04', 'admin', '2023-06-13 16:04:04', '111');
INSERT INTO `sys_tenant` VALUES (1676519873008209922, '副系统', '313', '4143', '313', '52353', '313', NULL, '2029-09-01 17:14:19', 121, '1', '3', '1', 'admin', '2023-07-05 17:14:21', 'admin', '2023-07-13 16:46:23', '313');

-- ----------------------------
-- Table structure for sys_tenant_datasource
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant_datasource`;
CREATE TABLE `sys_tenant_datasource`  (
  `datasource_id` bigint(20) NOT NULL,
  `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'IP',
  `port` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '端口',
  `db_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据库名称',
  `schema_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模式名称',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号',
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
  `init_count` int(11) NULL DEFAULT NULL COMMENT '初始连接数',
  `min_count` int(11) NULL DEFAULT NULL COMMENT '最小空闲数',
  `max_count` int(11) NULL DEFAULT NULL COMMENT '最大连接数',
  `is_primary` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主要数据源',
  `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) NOT NULL,
  PRIMARY KEY (`datasource_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '租户数据源' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_tenant_datasource
-- ----------------------------
INSERT INTO `sys_tenant_datasource` VALUES (1679408412346556418, 'MySQL', '192.168.0.202', '3306', 'qiaoba-1676519873008209922', NULL, 'root', 'Root123456789.', 1, 1, 1, '1', '', NULL, '', NULL, NULL, 1676519873008209922);
INSERT INTO `sys_tenant_datasource` VALUES (1679421310812884994, 'MySQL', '192.168.0.203', '3306', 'qiaoba-1676519873008209922', NULL, 'root', 'Root123456789.', 1, 1, 1, '0', '', NULL, '', NULL, NULL, 1676519873008209922);

-- ----------------------------
-- Table structure for sys_use_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_use_log`;
CREATE TABLE `sys_use_log`  (
  `id` bigint(20) NOT NULL COMMENT '日志主键',
  `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '模块标题',
  `business_type` int(11) NULL DEFAULT 0 COMMENT '业务类型（0其它 1新增 2修改 3删除）',
  `method` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求方式',
  `operator_type` int(11) NULL DEFAULT 0 COMMENT '操作类别（0其它 1后台用户 2手机端用户）',
  `operator_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作人员',
  `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求URL',
  `ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '主机地址',
  `operation_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作地点',
  `operation_param` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求参数',
  `json_result` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '返回参数',
  `status` int(11) NULL DEFAULT 0 COMMENT '操作状态（0正常 1异常）',
  `error_msg` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '错误消息',
  `operation_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作日志记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_use_log
-- ----------------------------
INSERT INTO `sys_use_log` VALUES (1677229187121377282, '操作日志', 9, 'com.qiaoba.module.log.controller.SysUseLogController.clean()', 'DELETE', 1, 'admin', '', '/monitor/use-log/clean', '192.168.0.201', '0|0|0|内网IP|内网IP', '', '{\"msg\":\"操作成功\",\"code\":200}', 1, '', '2023-07-07 16:12:54', 1);
INSERT INTO `sys_use_log` VALUES (1677237992072790017, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"tenantId\":\"1677237991938572290\",\"companyName\":\"121\",\"status\":\"1\",\"initialized\":\"0\",\"createUser\":\"admin\",\"createTime\":1688719673503}', '{\"msg\":\"操作成功\",\"code\":200}', 1, '', '2023-07-07 16:47:54', 1);
INSERT INTO `sys_use_log` VALUES (1677241172135297026, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"companyName\":\"121\"}', '', 0, 'Invalid bound statement (not found): com.qiaoba.module.tenant.mapper.SysTenantMapper.checkCompanyNameIsExist', '2023-07-07 17:00:32', 1);
INSERT INTO `sys_use_log` VALUES (1677241345439731714, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"companyName\":\"121\"}', '', 0, '未找到租户信息', '2023-07-07 17:01:13', 1);
INSERT INTO `sys_use_log` VALUES (1677241378390183938, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"companyName\":\"121\"}', '', 0, '未找到租户信息', '2023-07-07 17:01:21', 1);
INSERT INTO `sys_use_log` VALUES (1677241463454863362, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"companyName\":\"121\"}', '', 0, '未找到租户信息', '2023-07-07 17:01:41', 1);
INSERT INTO `sys_use_log` VALUES (1677241720502845441, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"companyName\":\"121\"}', '', 0, '公司名称已存在', '2023-07-07 17:02:42', 1);
INSERT INTO `sys_use_log` VALUES (1677241736013381633, '新增租户', 1, 'com.qiaoba.module.tenant.controller.SysTenantController.add()', 'POST', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"tenantId\":\"1677241735971438594\",\"companyName\":\"1211\",\"status\":\"1\",\"initialized\":\"0\",\"createUser\":\"admin\",\"createTime\":1688720566151}', '{\"msg\":\"操作成功\",\"code\":200}', 1, '', '2023-07-07 17:02:46', 1);
INSERT INTO `sys_use_log` VALUES (1678206751222652930, '修改租户', 2, 'com.qiaoba.module.tenant.controller.SysTenantController.edit()', 'PUT', 1, 'admin', '', '/tenant', '192.168.0.201', '0|0|0|内网IP|内网IP', '{\"tenantId\":\"1676519873008209922\",\"companyName\":\"121\",\"contactName\":\"313\",\"contactPhone\":\"4143\",\"address\":\"313\",\"profile\":\"52353\",\"licenseNumber\":\"313\",\"remark\":\"313\",\"expireTime\":1689066859000,\"accountCount\":121,\"status\":\"1\",\"mode\":\"3\",\"initialized\":\"1\",\"createUser\":\"admin\",\"createTime\":1688548461000,\"updateUser\":\"admin\",\"updateTime\":1688950643673}', '{\"msg\":\"操作成功\",\"code\":200}', 1, '', '2023-07-10 08:57:24', 1);

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
  `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号',
  `nickname` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户昵称',
  `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户邮箱',
  `phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号码',
  `gender` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '用户性别（0男 1女 2未知）',
  `avatar` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像地址',
  `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' 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(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `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, 1);
INSERT INTO `sys_user` VALUES (1660830718629277697, 1659443256656932865, 'admin1', 'qq', '', '', '0', '', '$2a$10$J4OOu6bmc6rXF1cH8JKxH.nXfeglU1Wq9Y5iL07P2VFlxLMSDCMVq', '1', 'admin', '2023-05-23 10:11:15', 'admin', '2023-06-15 16:06:06', 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 (1, 1, 1);
INSERT INTO `sys_user_role` VALUES (1660830718629277697, 1660535591067213826, 1);

SET FOREIGN_KEY_CHECKS = 1;
