/*
 Navicat Premium Data Transfer

 Source Server         : local_mariadb
 Source Server Type    : MariaDB
 Source Server Version : 100338 (10.3.38-MariaDB)
 Source Host           : localhost:33066
 Source Schema         : tenants_db

 Target Server Type    : MariaDB
 Target Server Version : 100338 (10.3.38-MariaDB)
 File Encoding         : 65001

 Date: 19/06/2024 15:21:40
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `role_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色键值',
  `role_sort` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '5' COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限 5：仅本人数据权限）',
  `menu_check_strictly` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '菜单树选择项是否关联显示（0：父子不互相关联显示 1：父子互相关联显示）',
  `dept_check_strictly` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '部门树选择项是否关联显示（0：父子不互相关联显示 1：父子互相关联显示 ）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '角色状态（0停用 1正常）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志（0代表存在 1代表删除）',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, 'role.admin', 'supervisor', 1, '1', '1', '1', '1', '0', 'supervisor', 1697091437683, NULL, 0, 'role.adminRemark');
INSERT INTO `sys_role` VALUES (2, 'role.adminAssign', 'administrator', 2, '3', '1', '1', '1', '0', 'supervisor', 1698486915894, 'supervisor', 1718700124398, '');
INSERT INTO `sys_role` VALUES (3, 'role.operator', 'operator', 3, '1', '1', '1', '1', '0', 'supervisor', 1698486934900, 'supervisor', 1712917882228, 'role.operatorRemark');
INSERT INTO `sys_role` VALUES (4, 'role.monitor', 'monitor', 4, '1', '1', '1', '1', '0', 'supervisor', 1698486950714, 'supervisor', 1712917909145, 'role.monitorRemark');
INSERT INTO `sys_role` VALUES (5, 'role.vistor', 'vistor', 5, '1', '1', '1', '1', '0', 'supervisor', 1698486975779, 'supervisor', 1706774405096, 'role.vistorRemark');
INSERT INTO `sys_role` VALUES (100, 'role.tenant', 'tenant', 100, '2', '1', '1', '1', '0', 'admin', 1715591950609, 'supervisor', 1718701342318, '');

SET FOREIGN_KEY_CHECKS = 1;
