/*
 Navicat Premium Data Transfer

 Source Server         : mysql3306
 Source Server Type    : MySQL
 Source Server Version : 80036 (8.0.36)
 Source Host           : localhost:3306
 Source Schema         : digital_operation

 Target Server Type    : MySQL
 Target Server Version : 80036 (8.0.36)
 File Encoding         : 65001

 Date: 06/06/2024 10:59:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

CREATE database if NOT EXISTS `digital_operation`;
use `digital_operation`;

-- ----------------------------
-- Table structure for blade_client
-- ----------------------------
DROP TABLE IF EXISTS `blade_client`;
CREATE TABLE `blade_client` (
  `id` bigint NOT NULL COMMENT '主键',
  `client_id` varchar(48) NOT NULL COMMENT '客户端id',
  `client_secret` varchar(256) NOT NULL COMMENT '客户端密钥',
  `resource_ids` varchar(256) DEFAULT NULL COMMENT '资源集合',
  `scope` varchar(256) NOT NULL COMMENT '授权范围',
  `authorized_grant_types` varchar(256) NOT NULL COMMENT '授权类型',
  `web_server_redirect_uri` varchar(256) DEFAULT NULL COMMENT '回调地址',
  `authorities` varchar(256) DEFAULT NULL COMMENT '权限',
  `access_token_validity` int NOT NULL COMMENT '令牌过期秒数',
  `refresh_token_validity` int NOT NULL COMMENT '刷新令牌过期秒数',
  `additional_information` varchar(4096) DEFAULT NULL COMMENT '附加说明',
  `autoapprove` varchar(256) DEFAULT NULL COMMENT '自动授权',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int NOT NULL COMMENT '状态',
  `is_deleted` int NOT NULL COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_client
-- ----------------------------
BEGIN;
INSERT INTO `blade_client` (`id`, `client_id`, `client_secret`, `resource_ids`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1123598811738675201, 'sword', 'sword_secret', '', 'all', 'refresh_token,password,authorization_code,captcha,social', 'http://localhost:8888', '', 360000, 604800, NULL, '', 1123598815738675201, 1123598813738675201, '2019-03-24 10:40:55', 1123598821738675201, '2022-07-18 15:17:46', 1, 0, '23v8po3');
INSERT INTO `blade_client` (`id`, `client_id`, `client_secret`, `resource_ids`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`, `tenant_id`) VALUES (1123598811738675202, 'saber', 'saber_secret', '', 'all', 'refresh_token,password,authorization_code,captcha,social', 'http://localhost:8080', '', 36000, 35000, NULL, '', 1123598815738675201, 1123598813738675201, '2019-03-24 10:42:29', 1123598821738675201, '2022-07-18 15:58:44', 1, 0, '23v8po3');
COMMIT;

-- ----------------------------
-- Table structure for blade_code
-- ----------------------------
DROP TABLE IF EXISTS `blade_code`;
CREATE TABLE `blade_code` (
  `id` bigint NOT NULL COMMENT '主键',
  `datasource_id` bigint DEFAULT NULL COMMENT '数据源主键',
  `service_name` varchar(64) DEFAULT NULL COMMENT '服务名称',
  `code_name` varchar(64) DEFAULT NULL COMMENT '模块名称',
  `table_name` varchar(64) DEFAULT NULL COMMENT '表名',
  `table_prefix` varchar(64) DEFAULT NULL COMMENT '表前缀',
  `pk_name` varchar(32) DEFAULT NULL COMMENT '主键名',
  `package_name` varchar(500) DEFAULT NULL COMMENT '后端包名',
  `base_mode` int DEFAULT NULL COMMENT '基础业务模式',
  `wrap_mode` int DEFAULT NULL COMMENT '包装器模式',
  `api_path` varchar(2000) DEFAULT NULL COMMENT '后端路径',
  `web_path` varchar(2000) DEFAULT NULL COMMENT '前端路径',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_code
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_datasource
-- ----------------------------
DROP TABLE IF EXISTS `blade_datasource`;
CREATE TABLE `blade_datasource` (
  `id` bigint NOT NULL COMMENT '主键',
  `name` varchar(100) DEFAULT NULL COMMENT '名称',
  `driver_class` varchar(100) DEFAULT NULL COMMENT '驱动类',
  `url` varchar(500) DEFAULT NULL COMMENT '连接地址',
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `password` varchar(50) DEFAULT NULL COMMENT '密码',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_datasource
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_dept
-- ----------------------------
DROP TABLE IF EXISTS `blade_dept`;
CREATE TABLE `blade_dept` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `parent_id` bigint DEFAULT '0' COMMENT '父主键',
  `ancestors` varchar(2000) DEFAULT NULL COMMENT '祖级列表',
  `dept_category` int DEFAULT NULL COMMENT '部门类型',
  `dept_name` varchar(45) DEFAULT NULL COMMENT '部门名',
  `full_name` varchar(45) DEFAULT NULL COMMENT '部门全称',
  `sort` int DEFAULT NULL COMMENT '排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `dept_code` varchar(255) DEFAULT NULL COMMENT '部门CODE值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_dept
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_dict_biz
-- ----------------------------
DROP TABLE IF EXISTS `blade_dict_biz`;
CREATE TABLE `blade_dict_biz` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户ID',
  `parent_id` bigint DEFAULT '0' COMMENT '父主键',
  `code` varchar(255) DEFAULT NULL COMMENT '字典码',
  `dict_key` varchar(255) DEFAULT NULL COMMENT '字典值',
  `dict_value` varchar(255) DEFAULT NULL COMMENT '字典名称',
  `sort` int DEFAULT NULL COMMENT '排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '字典备注',
  `is_sealed` int DEFAULT '0' COMMENT '是否已封存',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_dict_biz
-- ----------------------------
BEGIN;
INSERT INTO `blade_dict_biz` VALUES (1396341134192238593, '000000', 0, '123', '-1', '产品名称', 1, '', 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for blade_dict
-- ----------------------------
DROP TABLE IF EXISTS `blade_dict`;
CREATE TABLE `blade_dict` (
  `id` bigint NOT NULL COMMENT '主键',
  `parent_id` bigint DEFAULT '0' COMMENT '父主键',
  `code` varchar(255) DEFAULT NULL COMMENT '字典码',
  `dict_key` varchar(255) DEFAULT NULL COMMENT '字典值',
  `dict_value` varchar(255) DEFAULT NULL COMMENT '字典名称',
  `sort` int DEFAULT NULL COMMENT '排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '字典备注',
  `is_sealed` int DEFAULT '0' COMMENT '是否已封存',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_dict
-- ----------------------------
BEGIN;
INSERT INTO `blade_dict` VALUES (1123598814738675201, 0, 'sex', '-1', '性别', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675202, 1123598814738675201, 'sex', '1', '男', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675203, 1123598814738675201, 'sex', '2', '女', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675204, 0, 'notice', '-1', '通知类型', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675205, 1123598814738675204, 'notice', '1', '发布通知', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675206, 1123598814738675204, 'notice', '2', '批转通知', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675207, 1123598814738675204, 'notice', '3', '转发通知', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675208, 1123598814738675204, 'notice', '4', '指示通知', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675209, 1123598814738675204, 'notice', '5', '任免通知', 5, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675210, 1123598814738675204, 'notice', '6', '事务通知', 6, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675211, 0, 'menu_category', '-1', '菜单类型', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675212, 1123598814738675211, 'menu_category', '1', '菜单', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675213, 1123598814738675211, 'menu_category', '2', '按钮', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675214, 0, 'button_func', '-1', '按钮功能', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675215, 1123598814738675214, 'button_func', '1', '工具栏', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675216, 1123598814738675214, 'button_func', '2', '操作栏', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675217, 1123598814738675214, 'button_func', '3', '工具操作栏', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675218, 0, 'yes_no', '-1', '是否', 5, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675219, 1123598814738675218, 'yes_no', '1', '否', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675220, 1123598814738675218, 'yes_no', '2', '是', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675221, 0, 'flow', '-1', '流程类型', 5, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675222, 1123598814738675221, 'flow', '1', '请假流程', 1, 'leave', 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675223, 1123598814738675221, 'flow', '2', '报销流程', 2, 'expense', 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675227, 0, 'org_category', '-1', '机构类型', 7, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675228, 1123598814738675227, 'org_category', '1', '公司', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675229, 1123598814738675227, 'org_category', '2', '部门', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675230, 1123598814738675227, 'org_category', '3', '小组', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675231, 0, 'data_scope_type', '-1', '数据权限', 8, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675232, 1123598814738675231, 'data_scope_type', '1', '全部可见', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675233, 1123598814738675231, 'data_scope_type', '2', '本人可见', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675234, 1123598814738675231, 'data_scope_type', '3', '所在机构可见', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675235, 1123598814738675231, 'data_scope_type', '4', '所在机构及子级可见', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675236, 1123598814738675231, 'data_scope_type', '5', '自定义', 5, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675237, 0, 'api_scope_type', '-1', '接口权限', 10, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675238, 1123598814738675237, 'api_scope_type', '1', '系统接口', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675239, 1123598814738675237, 'api_scope_type', '2', '业务接口', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675240, 0, 'scope_category', '-1', '权限类型', 10, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675241, 1123598814738675240, 'scope_category', '1', '数据权限', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738675242, 1123598814738675240, 'scope_category', '2', '接口权限', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738676224, 0, 'oss', '-1', '对象存储类型', 6, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738676225, 1123598814738676224, 'oss', '1', 'minio', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738676226, 1123598814738676224, 'oss', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738676227, 1123598814738676224, 'oss', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738676228, 1123598814738676224, 'oss', '4', '腾讯云', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', '云片', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', '腾讯云', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777220, 0, 'post_category', '-1', '岗位类型', 12, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777221, 1123598814738777220, 'post_category', '1', '高层', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777222, 1123598814738777220, 'post_category', '2', '中层', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777223, 1123598814738777220, 'post_category', '3', '基层', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777224, 1123598814738777220, 'post_category', '4', '其他', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777230, 0, 'region', '-1', '行政区划', 13, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777231, 1123598814738777230, 'region', '0', '国家', 0, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777232, 1123598814738777230, 'region', '1', '省份/直辖市', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777233, 1123598814738777230, 'region', '2', '地市', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777234, 1123598814738777230, 'region', '3', '区县', 3, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777235, 1123598814738777230, 'region', '4', '乡镇', 4, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738777236, 1123598814738777230, 'region', '5', '村委', 5, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738778200, 0, 'user_type', '-1', '用户平台', 14, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738778201, 1123598814738778200, 'user_type', '1', 'WEB', 1, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738778202, 1123598814738778200, 'user_type', '2', 'APP', 2, NULL, 0, 0);
INSERT INTO `blade_dict` VALUES (1123598814738778203, 1123598814738778200, 'user_type', '3', 'OTHER', 3, NULL, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for blade_log_api
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_api`;
CREATE TABLE `blade_log_api` (
  `id` bigint NOT NULL COMMENT '编号',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `service_id` varchar(32) DEFAULT NULL COMMENT '服务ID',
  `server_host` varchar(255) DEFAULT NULL COMMENT '服务器名',
  `server_ip` varchar(255) DEFAULT NULL COMMENT '服务器IP地址',
  `env` varchar(255) DEFAULT NULL COMMENT '服务器环境',
  `type` char(1) DEFAULT '1' COMMENT '日志类型',
  `title` varchar(255) DEFAULT '' COMMENT '日志标题',
  `method` varchar(10) DEFAULT NULL COMMENT '操作方式',
  `request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
  `user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
  `remote_ip` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
  `method_class` varchar(255) DEFAULT NULL COMMENT '方法类',
  `method_name` varchar(255) DEFAULT NULL COMMENT '方法名',
  `params` text COMMENT '操作提交的数据',
  `time` varchar(64) DEFAULT NULL COMMENT '执行时间',
  `create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
/*!50100 PARTITION BY KEY (tenant_id)
PARTITIONS 20 */;

-- ----------------------------
-- Records of blade_log_api
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_log_error
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_error`;
CREATE TABLE `blade_log_error` (
  `id` bigint NOT NULL COMMENT '编号',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `service_id` varchar(32) DEFAULT NULL COMMENT '服务ID',
  `server_host` varchar(255) DEFAULT NULL COMMENT '服务器名',
  `server_ip` varchar(255) DEFAULT NULL COMMENT '服务器IP地址',
  `env` varchar(255) DEFAULT NULL COMMENT '系统环境',
  `method` varchar(10) DEFAULT NULL COMMENT '操作方式',
  `request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
  `user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
  `stack_trace` text COMMENT '堆栈',
  `exception_name` varchar(255) DEFAULT NULL COMMENT '异常名',
  `message` text COMMENT '异常信息',
  `line_number` int DEFAULT NULL COMMENT '错误行数',
  `remote_ip` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
  `method_class` varchar(255) DEFAULT NULL COMMENT '方法类',
  `file_name` varchar(1000) DEFAULT NULL COMMENT '文件名',
  `method_name` varchar(255) DEFAULT NULL COMMENT '方法名',
  `params` longtext COMMENT '操作提交的数据',
  `create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
/*!50100 PARTITION BY KEY (tenant_id)
PARTITIONS 30 */;

-- ----------------------------
-- Records of blade_log_error
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_log_usual
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_usual`;
CREATE TABLE `blade_log_usual` (
  `id` bigint NOT NULL COMMENT '编号',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `service_id` varchar(32) DEFAULT NULL COMMENT '服务ID',
  `server_host` varchar(255) DEFAULT NULL COMMENT '服务器名',
  `server_ip` varchar(255) DEFAULT NULL COMMENT '服务器IP地址',
  `env` varchar(255) DEFAULT NULL COMMENT '系统环境',
  `log_level` varchar(10) DEFAULT NULL COMMENT '日志级别',
  `log_id` varchar(100) DEFAULT NULL COMMENT '日志业务id',
  `log_data` text COMMENT '日志数据',
  `method` varchar(10) DEFAULT NULL COMMENT '操作方式',
  `request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
  `remote_ip` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
  `method_class` varchar(255) DEFAULT NULL COMMENT '方法类',
  `method_name` varchar(255) DEFAULT NULL COMMENT '方法名',
  `user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
  `params` text COMMENT '操作提交的数据',
  `create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
/*!50100 PARTITION BY KEY (tenant_id)
PARTITIONS 30 */;

-- ----------------------------
-- Records of blade_log_usual
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_material
-- ----------------------------
DROP TABLE IF EXISTS `blade_material`;
CREATE TABLE `blade_material` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `material_name` varchar(200) DEFAULT NULL COMMENT '素材名称',
  `original_name` varchar(200) DEFAULT NULL COMMENT '原素材名称',
  `category_id` bigint DEFAULT NULL COMMENT '分类ID',
  `path` varchar(500) DEFAULT NULL COMMENT '素材路径',
  `material_size` varchar(100) DEFAULT NULL COMMENT '素材大小',
  `material_suffix` varchar(20) DEFAULT NULL COMMENT '素材后缀',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='素材表';

-- ----------------------------
-- Records of blade_material
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_material_category
-- ----------------------------
DROP TABLE IF EXISTS `blade_material_category`;
CREATE TABLE `blade_material_category` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `category_name` varchar(20) DEFAULT NULL COMMENT '分类名称',
  `category_code` varchar(20) DEFAULT NULL COMMENT '分类编码',
  `permissions` int DEFAULT NULL COMMENT '权限  0 仅自己  1 所有人 2 指定角色可见',
  `sort` int DEFAULT NULL COMMENT '排序字段',
  `role_ids` varchar(500) DEFAULT NULL COMMENT '角色ids',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='素材分类表';

-- ----------------------------
-- Records of blade_material_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_menu
-- ----------------------------
DROP TABLE IF EXISTS `blade_menu`;
CREATE TABLE `blade_menu` (
  `id` bigint NOT NULL COMMENT '主键',
  `parent_id` bigint DEFAULT '0' COMMENT '父级菜单',
  `code` varchar(255) DEFAULT NULL COMMENT '菜单编号',
  `name` varchar(255) DEFAULT NULL COMMENT '菜单名称',
  `alias` varchar(255) DEFAULT NULL COMMENT '菜单别名',
  `path` varchar(255) DEFAULT NULL COMMENT '请求地址',
  `source` varchar(255) DEFAULT NULL COMMENT '菜单资源',
  `sort` int DEFAULT NULL COMMENT '排序',
  `category` int DEFAULT NULL COMMENT '菜单类型',
  `action` int DEFAULT '0' COMMENT '操作按钮类型',
  `is_open` int DEFAULT '1' COMMENT '是否打开新页面',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户 id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_menu
-- ----------------------------
BEGIN;
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675203, 0, 'system', '系统设置', 'menu', '/system', 'iconfont iconicon_setting', 100004, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', 10, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', 'iconfont iconicon_group', 12, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', 'iconfont iconicon_subordinate', 15, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', 'iconfont iconicon_community_line', 50, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675213, 1123598815738675203, 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', 120, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', '/api/blade-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/blade-system/dept/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/blade-system/menu/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/blade-system/role/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675307, 1123598815738675203, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 14, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', 1, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1161272593873321991, 1619156606935465985, 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', 10, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1161272593873321992, 1161272593873321991, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1161272593873321993, 1161272593873321991, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1161272593873321994, 1161272593873321991, 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1161272593873321995, 1161272593873321991, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962251, 1123598815738675209, 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', 3, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962252, 1164733389658962251, 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962253, 1164733389658962251, 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962254, 1164733389658962251, 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962255, 1164733389658962251, 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389658962256, 1164733389658962251, 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', 'iconfont iconicon_message', 11, 1, 0, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/blade-system/post/remove', 'delete', 3, 2, 3, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, 1, NULL, 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1367669015094308865, 1619156606935465985, 'apimanage', 'API管理', 'menu', '/bigdata/apimanage', 'iconfont iconicon_addresslist', 30, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1467678087986257921, 1619156606935465985, '/newbi/dataset/list', '数据集管理', '/newbi/dataset/list', '/newbi/dataset/list', 'iconfont iconicon_work', 20, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1467681760623697921, 1619159462254051330, '/newbi/visual/list', '可视化大屏', '/newbi/visual/list', '/newbi/visual/list', 'iconfont icon-iframe', 20, 1, 0, 1, '/newbi/visual/list\n3.4.0', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1501471635629920258, 1619159462254051330, '/newbi/warning/list', '数据预警', '/newbi/warning/list', '/newbi/warning/list', 'iconfont iconicon_notice', 50, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1506104732795191298, 0, '/newbi/mine', '我的空间', '/newbi/mine', '/newbi/mine', 'iconfont iconicon_addresslist', 100003, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1506105715373817857, 1506104732795191298, '/newbi/mine/pptArchive', '幻灯片归档', '/newbi/mine/pptArchive', '/newbi/mine/pptArchive', 'iconfont icon-rizhi', 10, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1506105897238839297, 1506104732795191298, '/newbi/mine/collect', '我的收藏', '/newbi/mine/collect', '/newbi/mine/collect', 'iconfont icon-iframe', 2, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1544607807797161986, 1123598815738675307, '/system/authGroup', '权限组管理', '/system/authGroup', '/system/authGroup', 'iconfont icon-yanzhengma', 0, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1554418372912480258, 1467678087986257921, 'cube_filter_row', '数据集行过滤权限', '数据集行过滤权限', 'cube_filter_row', 'iconfont icon-quanxian', 1, 2, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1557612821155127297, 1619156606935465985, '功能表单管理', '表单录入', '功能表单管理', '/workflow/webDesign/index', 'iconfont iconicon_subordinate', 40, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1582611460944187394, 1123598815738675203, '/newbi/defineFunc/list', '自定义函数', '/newbi/defineFunc/list', '/newbi/defineFunc/list', 'iconfont icon-rizhi1', 41, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1584570735518212097, 1506104732795191298, '/newbi/mine/subscribe', '我的订阅', '/newbi/mine/subscribe', '/newbi/mine/subscribe', 'iconfont iconicon_send', 40, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1584973052717547522, 1619159462254051330, '/newbi/subscribe', '订阅管理', '/newbi/subscribe', '/newbi/subscribe', 'iconfont iconicon_send', 60, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1585953641910206466, 1584973052717547522, '/newbi/subscribe/list', '订阅统计', '/newbi/subscribe/list', '/newbi/subscribe/list', 'iconfont icon-caidan', 1, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1585953975894245377, 1584973052717547522, '/newbi/subscribe/log', '订阅日志', '/newbi/subscribe/log', '/newbi/subscribe/log', 'iconfont iconicon_details', 2, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1587363154609532930, 1619159462254051330, '/newbi/share/list', '三方WEB嵌入', '/newbi/share/list', '/newbi/share/list', 'iconfont iconicon_share', 70, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1589512651703767042, 1123598815738675209, '第三方配置', '开放平台配置', '第三方配置', '/system/setting', 'iconfont iconicon_send', 30, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1597077352725745666, 1584973052717547522, '/newbi/subscribe/record', '操作记录', '/newbi/subscribe/record', '/newbi/subscribe/record', 'iconfont icon-wxbgongju', 3, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1600405207606059010, 1506104732795191298, 'mineexport', '导出任务', 'mineexport', '/newbi/mine/export', 'iconfont iconicon_study', 4, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1607568290728321026, 1619159462254051330, 'mineappsindex', '移动应用', 'mineappsindex', '/newbi/apps/index', 'iconfont iconicon_work', 40, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1607615579387797505, 1506104732795191298, 'newbimineapps', '我的应用', 'newbimineapps', '/newbi/mine/apps', 'iconfont iconicon_work', 30, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1619156606935465985, 0, '数据中心', '数据中心', '数据中心', '/tool', 'iconfont iconicon_study', 100001, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1619159462254051330, 0, '数据展示', '数据展示', '数据展示', '/newbi', 'iconfont iconicon_savememo', 100002, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1619214858069966849, 1619159462254051330, '/newbi/ppt/list', '幻灯片', '/newbi/ppt/list', '/newbi/ppt/list', 'iconfont iconicon_photo', 10, 1, 0, 1, '等待配置', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1619215151222456321, 1619159462254051330, '/newbi/report/list', '自助报表', '/newbi/report/list', '/newbi/report/list', 'iconfont iconicon_work', 30, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1619215847942488065, 1619156606935465985, 'shujuetl', '数据ETL', 'shujuetl', '/etl', 'iconfont iconicon_subordinate', 60, 1, 0, 1, '待配置', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1624402915081576449, 1506104732795191298, 'mycomponent', '我的组件', '我的组件', '/newbi/mine/mycomponent', 'iconfont iconicon_work', 80, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1625742429951614978, 1619156606935465985, '工作流程管理', '工作流程', '工作流程管理', '/workflow/flowEngine/index', 'iconfont iconicon_subordinate', 45, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1627854531784859649, 1619156606935465985, 'globalparam', '全局参数管理', '全局参数管理', '/newbi/globalParams/list', 'iconfont icon-biaodan', 51, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1630116849440702466, 1123598815738675203, 'zidianguanli', '字典管理', 'zidianguanli', '/dict', 'iconfont iconicon_study', 16, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1630117165196296193, 1630116849440702466, 'meijuzidian', '枚举字典', '/newbi/dict/list', '/newbi/dict/list', 'iconfont iconicon_work', 1, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1642125129009422337, 1123598815738675203, '/system/update', '离线升级', '/system/update', '/system/update', 'iconfont iconicon_exchange', 100005, 1, 0, 2, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1689465690065170434, 1619215847942488065, '/etl/flow/list', '任务流程管理', '/etl/flow/list', '/etl/flow/list', 'iconfont iconicon_exchange', 1, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1689466226315325441, 1619215847942488065, '/etl/job/list', '任务实例管理', '/etl/job/list', '/etl/job/list', 'iconfont iconicon_work', 2, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1714193048967127041, 1619156606935465985, '/batch', '数据同步', '/batch', '/batch', 'iconfont iconicon_refresh', 61, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1714193193972604929, 1714193048967127041, '/etl/batchTask/list', '同步任务', '/etl/batchTask/list', '/etl/batchTask/list', 'iconfont iconicon_exchange', 1, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1714193309215301633, 1714193048967127041, '/etl/batchInstance/list', '同步任务实例', '/etl/batchInstance/list', '/etl/batchInstance/list', 'iconfont iconicon_work', 2, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1734067670720049153, 1619156606935465985, '/etl/sql', 'SQL任务', '/etl/sql', '/etl/sql', 'iconfont icon-rizhi1', 80, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1734067994608398338, 1734067670720049153, '/etl/sqlTask/list', 'SQL任务管理', '/etl/sqlTask/list', '/etl/sqlTask/list', 'iconfont icon-rizhi1', 1, 1, 0, 1, '', 0, '000000');
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`, `tenant_id`) VALUES (1734068192759902209, 1734067670720049153, '/etl/sqlInstance/list', 'SQL任务实例', '/etl/sqlInstance/list', '/etl/sqlInstance/list', 'iconfont iconicon_work', 2, 1, 0, 1, '', 0, '000000');
COMMIT;

-- ----------------------------
-- Table structure for blade_message
-- ----------------------------
DROP TABLE IF EXISTS `blade_message`;
CREATE TABLE `blade_message` (
  `id` bigint NOT NULL COMMENT '主键',
  `user_id` bigint DEFAULT NULL COMMENT '接收人',
  `module` varchar(50) DEFAULT NULL COMMENT '模块',
  `type` tinyint DEFAULT NULL COMMENT '类型：0待办 1抄送 2通过 3拒绝',
  `subject` varchar(50) DEFAULT NULL COMMENT '主题',
  `content` varchar(50) DEFAULT NULL COMMENT '内容',
  `status` tinyint DEFAULT NULL COMMENT '状态：0未读 1已读',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='消息提醒';

-- ----------------------------
-- Records of blade_message
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_notice
-- ----------------------------
DROP TABLE IF EXISTS `blade_notice`;
CREATE TABLE `blade_notice` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `category` int DEFAULT NULL COMMENT '类型',
  `release_time` datetime DEFAULT NULL COMMENT '发布时间',
  `content` varchar(2000) DEFAULT NULL COMMENT '内容',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_notice
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_oss
-- ----------------------------
DROP TABLE IF EXISTS `blade_oss`;
CREATE TABLE `blade_oss` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `category` int DEFAULT NULL COMMENT '分类',
  `oss_code` varchar(32) DEFAULT NULL COMMENT '资源编号',
  `endpoint` varchar(255) DEFAULT NULL COMMENT '资源地址',
  `access_key` varchar(255) DEFAULT NULL COMMENT 'accessKey',
  `secret_key` varchar(255) DEFAULT NULL COMMENT 'secretKey',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '空间名',
  `app_id` varchar(255) DEFAULT NULL COMMENT '应用ID',
  `region` varchar(255) DEFAULT NULL COMMENT '地域简称',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_oss
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_param
-- ----------------------------
DROP TABLE IF EXISTS `blade_param`;
CREATE TABLE `blade_param` (
  `id` bigint NOT NULL COMMENT '主键',
  `param_name` varchar(255) DEFAULT NULL COMMENT '参数名',
  `param_key` varchar(255) DEFAULT NULL COMMENT '参数键',
  `param_value` varchar(255) DEFAULT NULL COMMENT '参数值',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_param
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_post
-- ----------------------------
DROP TABLE IF EXISTS `blade_post`;
CREATE TABLE `blade_post` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `category` int DEFAULT NULL COMMENT '岗位类型',
  `post_code` varchar(12) DEFAULT NULL COMMENT '岗位编号',
  `post_name` varchar(64) DEFAULT NULL COMMENT '岗位名称',
  `sort` int DEFAULT NULL COMMENT '岗位排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '岗位描述',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_post
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_region
-- ----------------------------
DROP TABLE IF EXISTS `blade_region`;
CREATE TABLE `blade_region` (
  `code` varchar(12) NOT NULL COMMENT '区划编号',
  `parent_code` varchar(12) DEFAULT NULL COMMENT '父区划编号',
  `ancestors` varchar(255) DEFAULT NULL COMMENT '祖区划编号',
  `name` varchar(32) DEFAULT NULL COMMENT '区划名称',
  `province_code` varchar(12) DEFAULT NULL COMMENT '省级区划编号',
  `province_name` varchar(32) DEFAULT NULL COMMENT '省级名称',
  `city_code` varchar(12) DEFAULT NULL COMMENT '市级区划编号',
  `city_name` varchar(32) DEFAULT NULL COMMENT '市级名称',
  `district_code` varchar(12) DEFAULT NULL COMMENT '区级区划编号',
  `district_name` varchar(32) DEFAULT NULL COMMENT '区级名称',
  `town_code` varchar(12) DEFAULT NULL COMMENT '镇级区划编号',
  `town_name` varchar(32) DEFAULT NULL COMMENT '镇级名称',
  `village_code` varchar(12) DEFAULT NULL COMMENT '村级区划编号',
  `village_name` varchar(32) DEFAULT NULL COMMENT '村级名称',
  `region_level` int DEFAULT NULL COMMENT '层级',
  `sort` int DEFAULT NULL COMMENT '排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_region
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_responsible
-- ----------------------------
DROP TABLE IF EXISTS `blade_responsible`;
CREATE TABLE `blade_responsible` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '负责人姓名',
  `phone` varchar(50) DEFAULT NULL COMMENT '负责人电话',
  `email` varchar(100) DEFAULT NULL COMMENT '负责人邮箱',
  `department` varchar(50) DEFAULT NULL COMMENT '负责人部门',
  `position` varchar(50) DEFAULT NULL COMMENT '负责人职务',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_responsible
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_role
-- ----------------------------
DROP TABLE IF EXISTS `blade_role`;
CREATE TABLE `blade_role` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `parent_id` bigint DEFAULT '0' COMMENT '父主键',
  `role_name` varchar(255) DEFAULT NULL COMMENT '角色名',
  `sort` int DEFAULT NULL COMMENT '排序',
  `role_alias` varchar(255) DEFAULT NULL COMMENT '角色别名',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_role
-- ----------------------------
BEGIN;
INSERT INTO `blade_role` (`id`, `tenant_id`, `parent_id`, `role_name`, `sort`, `role_alias`, `is_deleted`) VALUES (1123598816738675201, '23muwdw', 0, '超级管理员', 1, 'administrator', 0);
INSERT INTO `blade_role` (`id`, `tenant_id`, `parent_id`, `role_name`, `sort`, `role_alias`, `is_deleted`) VALUES (1496735445655695362, '23muwdw', 1123598816738675201, '数据分析组', 14, '数据分析组', 1);
COMMIT;

-- ----------------------------
-- Table structure for blade_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `blade_role_menu`;
CREATE TABLE `blade_role_menu` (
  `id` bigint NOT NULL COMMENT '主键',
  `menu_id` bigint DEFAULT NULL COMMENT '菜单id',
  `role_id` bigint DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_role_menu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_role_scope
-- ----------------------------
DROP TABLE IF EXISTS `blade_role_scope`;
CREATE TABLE `blade_role_scope` (
  `id` bigint NOT NULL COMMENT '主键',
  `scope_category` int DEFAULT NULL COMMENT '权限类型(1:数据权限、2:接口权限)',
  `scope_id` bigint DEFAULT NULL COMMENT '权限id',
  `role_id` bigint DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_role_scope
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_scope_api
-- ----------------------------
DROP TABLE IF EXISTS `blade_scope_api`;
CREATE TABLE `blade_scope_api` (
  `id` bigint NOT NULL COMMENT '主键',
  `menu_id` bigint DEFAULT NULL COMMENT '菜单主键',
  `resource_code` varchar(255) DEFAULT NULL COMMENT '资源编号',
  `scope_name` varchar(255) DEFAULT NULL COMMENT '接口权限名',
  `scope_path` varchar(255) DEFAULT NULL COMMENT '接口权限地址',
  `scope_type` int DEFAULT NULL COMMENT '接口权限类型',
  `remark` varchar(255) DEFAULT NULL COMMENT '接口权限备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_scope_api
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_scope_data
-- ----------------------------
DROP TABLE IF EXISTS `blade_scope_data`;
CREATE TABLE `blade_scope_data` (
  `id` bigint NOT NULL COMMENT '主键',
  `menu_id` bigint DEFAULT NULL COMMENT '菜单主键',
  `resource_code` varchar(255) DEFAULT NULL COMMENT '资源编号',
  `scope_name` varchar(255) DEFAULT NULL COMMENT '数据权限名称',
  `scope_field` varchar(255) DEFAULT NULL COMMENT '数据权限字段',
  `scope_class` varchar(500) DEFAULT NULL COMMENT '数据权限类名',
  `scope_column` varchar(255) DEFAULT NULL COMMENT '数据权限字段',
  `scope_type` int DEFAULT NULL COMMENT '数据权限类型',
  `scope_value` varchar(2000) DEFAULT NULL COMMENT '数据权限值域',
  `remark` varchar(255) DEFAULT NULL COMMENT '数据权限备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_scope_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_sms
-- ----------------------------
DROP TABLE IF EXISTS `blade_sms`;
CREATE TABLE `blade_sms` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `category` int NOT NULL COMMENT '分类',
  `template_id` varchar(64) NOT NULL COMMENT '模板ID',
  `access_key` varchar(255) NOT NULL COMMENT 'accessKey',
  `secret_key` varchar(255) NOT NULL COMMENT 'secretKey',
  `region_id` varchar(255) DEFAULT NULL COMMENT 'regionId',
  `sign_name` varchar(64) NOT NULL COMMENT '短信签名',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user_id` bigint NOT NULL COMMENT '创建人',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `template_content` varchar(500) NOT NULL COMMENT '模板内容',
  `template_params` varchar(500) DEFAULT NULL COMMENT '模板参数',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态',
  `template_name` varchar(50) NOT NULL COMMENT '模版名称',
  `app_id` varchar(50) DEFAULT NULL COMMENT '腾讯云SDKappID',
  `business_classify` int NOT NULL DEFAULT '0' COMMENT '业务类型(0：告警短信，1：登录短信)',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信配置';

-- ----------------------------
-- Records of blade_sms
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_tenant
-- ----------------------------
DROP TABLE IF EXISTS `blade_tenant`;
CREATE TABLE `blade_tenant` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `tenant_name` varchar(50) NOT NULL COMMENT '租户名称',
  `domain` varchar(255) DEFAULT NULL COMMENT '域名地址',
  `background_url` varchar(1000) DEFAULT NULL COMMENT '系统背景',
  `linkman` varchar(20) DEFAULT NULL COMMENT '联系人',
  `contact_number` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `address` varchar(255) DEFAULT NULL COMMENT '联系地址',
  `account_number` int DEFAULT '-1' COMMENT '账号额度',
  `expire_time` datetime DEFAULT NULL COMMENT '过期时间',
  `datasource_id` bigint DEFAULT NULL COMMENT '数据源ID',
  `license_key` varchar(1000) DEFAULT NULL COMMENT '授权码',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_tenant
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_ticket
-- ----------------------------
DROP TABLE IF EXISTS `blade_ticket`;
CREATE TABLE `blade_ticket` (
  `id` bigint NOT NULL,
  `ticket` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_ticket
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_top_menu
-- ----------------------------
DROP TABLE IF EXISTS `blade_top_menu`;
CREATE TABLE `blade_top_menu` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `code` varchar(255) DEFAULT NULL COMMENT '顶部菜单编号',
  `name` varchar(255) DEFAULT NULL COMMENT '顶部菜单名',
  `source` varchar(255) DEFAULT NULL COMMENT '顶部菜单资源',
  `sort` int DEFAULT NULL COMMENT '顶部菜单排序',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_top_menu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_top_menu_setting
-- ----------------------------
DROP TABLE IF EXISTS `blade_top_menu_setting`;
CREATE TABLE `blade_top_menu_setting` (
  `id` bigint NOT NULL COMMENT '主键',
  `top_menu_id` bigint DEFAULT NULL COMMENT '顶部菜单主键',
  `menu_id` bigint DEFAULT NULL COMMENT '菜单主键',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_top_menu_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_user
-- ----------------------------
DROP TABLE IF EXISTS `blade_user`;
CREATE TABLE `blade_user` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `code` varchar(12) DEFAULT NULL COMMENT '用户编号',
  `user_type` int DEFAULT NULL COMMENT '用户平台',
  `account` varchar(45) DEFAULT NULL COMMENT '账号',
  `password` varchar(45) DEFAULT NULL COMMENT '密码',
  `name` varchar(20) DEFAULT NULL COMMENT '昵称',
  `real_name` varchar(10) DEFAULT NULL COMMENT '真名',
  `nick_name` varchar(50) DEFAULT NULL COMMENT '微信昵称',
  `avatar` varchar(500) DEFAULT NULL COMMENT '头像',
  `email` varchar(45) DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(45) DEFAULT NULL COMMENT '手机',
  `birthday` datetime DEFAULT NULL COMMENT '生日',
  `sex` int DEFAULT NULL COMMENT '性别',
  `role_id` varchar(1000) DEFAULT NULL COMMENT '角色id',
  `dept_id` varchar(1000) DEFAULT NULL COMMENT '部门id',
  `post_id` varchar(1000) DEFAULT NULL COMMENT '岗位id',
  `face_user_id` varchar(255) DEFAULT NULL COMMENT '人脸userID',
  `face_group_id` varchar(255) DEFAULT NULL COMMENT '人脸分组ID',
  `face_token` varchar(255) DEFAULT NULL COMMENT '人脸facetoken',
  `face_img` varchar(500) DEFAULT NULL COMMENT '人脸图片',
  `open_id` varchar(255) DEFAULT NULL COMMENT 'openid',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `audit_level` int DEFAULT NULL COMMENT '审核等级',
  `is_login` int DEFAULT NULL COMMENT '是否允许账号登录  0 是 1否',
  `is_wx_login` int DEFAULT NULL COMMENT '是否允许微信登录  0 是 1否',
  `login_status` int DEFAULT NULL COMMENT '登录状态  0 正常 1预警 2警告 login_status',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `ext_json` text COMMENT '扩展字段',
  `third_user_id` varchar(100) DEFAULT NULL COMMENT '第三方用户id',
  `wechat_open_id` varchar(64) DEFAULT NULL COMMENT '微信三方登录绑定openId',
  `ding_open_id` varchar(64) DEFAULT NULL COMMENT '钉钉三方登录绑定openId',
  `qy_wechat_code` varchar(64) DEFAULT NULL COMMENT '企业微信三方登录绑定openId',
  `fei_shu_open_id` varchar(64) DEFAULT NULL COMMENT '飞书三方登录绑定openId',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user
-- ----------------------------
BEGIN;
INSERT INTO `blade_user` (`id`, `tenant_id`, `code`, `user_type`, `account`, `password`, `name`, `real_name`, `nick_name`, `avatar`, `email`, `phone`, `birthday`, `sex`, `role_id`, `dept_id`, `post_id`, `face_user_id`, `face_group_id`, `face_token`, `face_img`, `open_id`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `audit_level`, `is_login`, `is_wx_login`, `login_status`, `status`, `is_deleted`, `ext_json`, `third_user_id`, `wechat_open_id`, `ding_open_id`, `qy_wechat_code`, `fei_shu_open_id`) VALUES (1123598821738675201, '000000', '', 1, 'dataview', '6eecda7316022e14a670af5f49f580c8d0afd18f', '管理员', '管理员', '管理员', '', '897927075@qq.com', '18706868471', '2018-08-08 00:00:00', 1, '1123598816738675201', '1372754484547788801', '1123598817738675201', 'faceBY1123598821738675201', 'by_unicom_facegroup_sys', '3ecaf3bfcb51142d608e3f970fa029c4', 'uploads/face/65d6beea-259a-4ee7-ad6b-d2247aee25a0.jpg', 'oNZxC5MlcLcNtHe7kAQbA25Zf2QY', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2024-03-01 00:00:02', 1, 0, 0, 0, 1, 0, '{\"bigdataId\":1260,\"bigdataName\":\"大屏\",\"bigdataCategory\":\"\"}', NULL, NULL, 'ORxG45LhJpUn26eV8MgyzwiEiE', 'ou_cb002d2cfaa3b7a164f3c7a03f3b6be6', NULL);
COMMIT;

-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_app`;
CREATE TABLE `blade_user_app` (
  `id` bigint NOT NULL COMMENT '主键',
  `user_id` bigint DEFAULT '0' COMMENT '用户ID',
  `user_ext` varchar(255) DEFAULT NULL COMMENT '用户拓展信息',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user_app
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_dept`;
CREATE TABLE `blade_user_dept` (
  `id` bigint NOT NULL COMMENT '主键',
  `user_id` bigint DEFAULT '0' COMMENT '用户ID',
  `dept_id` bigint DEFAULT '0' COMMENT '部门ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user_dept
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_user_oauth
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_oauth`;
CREATE TABLE `blade_user_oauth` (
  `id` bigint NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户ID',
  `uuid` varchar(64) DEFAULT NULL COMMENT '第三方系统用户ID',
  `user_id` bigint DEFAULT NULL COMMENT '用户ID',
  `username` varchar(32) DEFAULT NULL COMMENT '账号',
  `nickname` varchar(64) DEFAULT NULL COMMENT '用户名',
  `avatar` varchar(1000) DEFAULT NULL COMMENT '头像',
  `blog` varchar(50) DEFAULT NULL COMMENT '应用主页',
  `company` varchar(255) DEFAULT NULL COMMENT '公司名',
  `location` varchar(255) DEFAULT NULL COMMENT '地址',
  `email` varchar(255) DEFAULT NULL COMMENT '邮件',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `gender` varchar(16) DEFAULT NULL COMMENT '性别',
  `source` varchar(16) DEFAULT NULL COMMENT '来源',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user_oauth
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_other`;
CREATE TABLE `blade_user_other` (
  `id` bigint NOT NULL COMMENT '主键',
  `user_id` bigint DEFAULT '0' COMMENT '用户ID',
  `user_ext` varchar(255) DEFAULT NULL COMMENT '用户拓展信息',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user_other
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_web`;
CREATE TABLE `blade_user_web` (
  `id` bigint NOT NULL COMMENT '主键',
  `user_id` bigint DEFAULT '0' COMMENT '用户ID',
  `user_ext` varchar(255) DEFAULT NULL COMMENT '用户拓展信息',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of blade_user_web
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_visual
-- ----------------------------
DROP TABLE IF EXISTS `blade_visual`;
CREATE TABLE `blade_visual` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `title` varchar(255) DEFAULT NULL COMMENT '大屏标题',
  `background_url` longtext COMMENT '大屏背景',
  `category` int DEFAULT NULL COMMENT '大屏类型',
  `password` varchar(255) DEFAULT NULL COMMENT '发布密码',
  `create_user` varchar(64) DEFAULT NULL COMMENT '创建人',
  `create_dept` varchar(64) DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int NOT NULL COMMENT '状态',
  `is_deleted` int NOT NULL COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='可视化表';

-- ----------------------------
-- Records of blade_visual
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_visual_category
-- ----------------------------
DROP TABLE IF EXISTS `blade_visual_category`;
CREATE TABLE `blade_visual_category` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `category_key` varchar(12) DEFAULT NULL COMMENT '分类键值',
  `category_value` varchar(64) DEFAULT NULL COMMENT '分类名称',
  `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否已删除',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='可视化分类表';

-- ----------------------------
-- Records of blade_visual_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_visual_config
-- ----------------------------
DROP TABLE IF EXISTS `blade_visual_config`;
CREATE TABLE `blade_visual_config` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `visual_id` varchar(64) DEFAULT NULL COMMENT '可视化表主键',
  `detail` text COMMENT '配置json',
  `component` longtext COMMENT '组件json',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='可视化配置表';

-- ----------------------------
-- Records of blade_visual_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_visual_db
-- ----------------------------
DROP TABLE IF EXISTS `blade_visual_db`;
CREATE TABLE `blade_visual_db` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `name` varchar(100) DEFAULT NULL COMMENT '名称',
  `driver_class` varchar(100) DEFAULT NULL COMMENT '驱动类',
  `url` varchar(500) DEFAULT NULL COMMENT '连接地址',
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `password` varchar(50) DEFAULT NULL COMMENT '密码',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user` varchar(64) DEFAULT NULL COMMENT '创建人',
  `create_dept` varchar(64) DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` varchar(64) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT NULL COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='可视化数据源配置表';

-- ----------------------------
-- Records of blade_visual_db
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for blade_visual_map
-- ----------------------------
DROP TABLE IF EXISTS `blade_visual_map`;
CREATE TABLE `blade_visual_map` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `name` varchar(255) DEFAULT NULL COMMENT '地图名称',
  `data` longtext COMMENT '地图数据',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='可视化地图配置表';

-- ----------------------------
-- Records of blade_visual_map
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_data
-- ----------------------------
DROP TABLE IF EXISTS `cube_data`;
CREATE TABLE `cube_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `workspace_id` int NOT NULL DEFAULT '0' COMMENT '工作空间ID',
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `cube_name` varchar(100) NOT NULL COMMENT '数据集名称',
  `cube_table_names` json NOT NULL COMMENT '表名json数组',
  `links_join` text COMMENT '表关联json字符串',
  `filter_json` text COMMENT '数据过滤条件json字符串',
  `query_sql` varchar(2000) DEFAULT NULL COMMENT '拼接好的查询SQL',
  `table_type` tinyint NOT NULL DEFAULT '0' COMMENT '表类型(0-物理表/1-逻辑表)',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注描述',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '公开状态',
  `old_cube_data_Id` int DEFAULT NULL COMMENT '被复制的数据集id',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `is_edit` int DEFAULT '1' COMMENT '是否可以被编辑 0：不可以，1：可以',
  `display_status` tinyint NOT NULL DEFAULT '1' COMMENT '是否显示[静态数据创建的数据集不显示] 1：可以[默认]，0：不可以',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集';

-- ----------------------------
-- Records of cube_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_data_permission
-- ----------------------------
DROP TABLE IF EXISTS `cube_data_permission`;
CREATE TABLE `cube_data_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cube_perm_name` varchar(100) NOT NULL COMMENT '数据集权限名称',
  `cube_workspace_id` int DEFAULT '0' COMMENT '数据集分类ID',
  `cube_data_id` int NOT NULL COMMENT '数据集ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `filter_json` text COMMENT '过滤器JSON',
  `filter_sql` varchar(1000) DEFAULT NULL COMMENT '[行权限]过滤器SQL',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人',
  `exclude_column_ids` varchar(1000) DEFAULT NULL COMMENT '[列权限]不包含的字段ID,逗号隔开',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `cube_data_id` (`cube_data_id`,`data_perm_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集权限';

-- ----------------------------
-- Records of cube_data_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_datasource_function
-- ----------------------------
DROP TABLE IF EXISTS `cube_datasource_function`;
CREATE TABLE `cube_datasource_function` (
  `func_id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL COMMENT '函数名',
  `method` varchar(50) NOT NULL COMMENT '函数方法',
  `ds_type` tinyint NOT NULL COMMENT '数据源类型(0-mysql/1-oracle/2-sqlserver/3-postgresql/4-clickhouse/-1通用)',
  `description` varchar(500) DEFAULT NULL COMMENT '函数描述',
  `example` varchar(100) DEFAULT NULL COMMENT '示例',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号(越大排序越靠前)',
  `func_type` tinyint NOT NULL DEFAULT '0' COMMENT '函数类型(0-数据库自带函数,1-自定义解析函数)',
  `func_sql` varchar(1000) DEFAULT NULL COMMENT '自定义函数sql片段',
  `func_attr` tinyint DEFAULT NULL COMMENT '0-聚合函数\n1-统计函数\n2-日期和时间\n3-字符串函数\n4-逻辑函数\n5-数值函数\n6-数组函数\n7-自定义函数\n99-其他',
  `method_name` varchar(50) DEFAULT NULL COMMENT '函数名称',
  `sub_query_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否包含子查询(1-是/0-否)',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`func_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据源函数库';

-- ----------------------------
-- Records of cube_datasource_function
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_define_group
-- ----------------------------
DROP TABLE IF EXISTS `cube_define_group`;
CREATE TABLE `cube_define_group` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自定义人群id',
  `classify_id` int NOT NULL COMMENT '人群分类id',
  `group_name` varchar(100) NOT NULL COMMENT '人群名称',
  `request_freq` int NOT NULL COMMENT '计算频次(0单次/1每日/2每周/3每月)',
  `define_rule` text NOT NULL COMMENT '定义规则',
  `cube_ids` json DEFAULT NULL COMMENT '数据集id集合',
  `status` int DEFAULT NULL COMMENT '状态(0未开始/1计算中/2已完成)',
  `remark` varchar(100) DEFAULT NULL COMMENT '人群描述',
  `amount` bigint DEFAULT NULL COMMENT '覆盖人数',
  `time_zone` varchar(100) DEFAULT NULL COMMENT '时间分区',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  `job_id` int DEFAULT NULL COMMENT 'jobid',
  `result_table` varchar(100) DEFAULT NULL COMMENT '结果集对应表',
  `cube_columns` text COMMENT '数据集对应的字段',
  `result_columns` text COMMENT '总结果对应的字段',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义人群';

-- ----------------------------
-- Records of cube_define_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_global_param
-- ----------------------------
DROP TABLE IF EXISTS `cube_global_param`;
CREATE TABLE `cube_global_param` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_id` int NOT NULL COMMENT '参数分类',
  `param_name` varchar(100) NOT NULL COMMENT '参数名称',
  `param_key` varchar(100) DEFAULT NULL COMMENT '页面参数名',
  `param_column_type` tinyint NOT NULL DEFAULT '0' COMMENT '参数字段类型(0-数字/1-字符串)',
  `param_type` tinyint NOT NULL COMMENT '参数类型(0-业务参数/1-系统参数)',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注说明',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `default_value` varchar(300) DEFAULT NULL COMMENT '默认值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集全局变量';

-- ----------------------------
-- Records of cube_global_param
-- ----------------------------
BEGIN;
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (5, 8, '当前登录用户', 'jhbiSysUser', 0, 1, '当前登录用户的USERID', '2023-02-22 11:21:09', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (6, 8, '当前时间', 'jhbiSysCurrentTime', 1, 1, '获取当前时间【时间格式根据字段格式化】', '2023-02-22 11:22:02', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (16, 8, '当前登录用户姓名', 'jhbiSysUserRealName', 1, 1, '当前登录用户的REALNAME', '2023-02-22 11:21:09', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (17, 8, '当前登录用户名', 'jhbiSysUserName', 1, 1, '当前登录用户的USERNAME', '2023-02-22 11:21:09', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (18, 8, '当前登录用户手机号', 'jhbiSysUserMobile', 1, 1, '当前登录用户的MOBILE', '2023-02-22 11:21:09', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`id`, `type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES (19, 8, '当前登录用户单位', 'jhbiSysUserDept', 0, 1, '当前登录用户的DEPTID', '2023-02-22 11:21:09', 0, '系统创建', '111111', NULL);
INSERT INTO `cube_global_param` (`type_id`, `param_name`, `param_key`, `param_column_type`, `param_type`, `remark`, `create_time`, `create_user_id`, `create_by`, `tenant_id`, `default_value`) VALUES
	 (8,'当前登录用户集成用户','jhbiSysThirdUser',1,1,'当前登录用户的集成平台用户ID(ThirdUserId)','2024-04-07 14:01:34',0,'系统创建','111111',NULL),
	 (8,'当前登录用户集成岗位','jhbiSysThirdUserPost',1,1,'当前登录用户的集成平台岗位ID(ThirdPostId)','2024-04-07 14:01:34',0,'系统创建','111111',NULL),
	 (8,'当前登录用户集成部门','jhbiSysThirdUserDept',1,1,'当前登录用户的集成平台部门ID(ThirdDeptId)','2024-04-07 14:01:34',0,'系统创建','111111',NULL);
COMMIT;

-- ----------------------------
-- Table structure for cube_global_param_type
-- ----------------------------
DROP TABLE IF EXISTS `cube_global_param_type`;
CREATE TABLE `cube_global_param_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL COMMENT '父级ID',
  `type_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集全局筛选器参数-分类表';

-- ----------------------------
-- Records of cube_global_param_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_group_classify
-- ----------------------------
DROP TABLE IF EXISTS `cube_group_classify`;
CREATE TABLE `cube_group_classify` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '人群分类id',
  `classify_name` varchar(100) NOT NULL COMMENT '人群分类名称',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义人群分类';

-- ----------------------------
-- Records of cube_group_classify
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_sql_view
-- ----------------------------
DROP TABLE IF EXISTS `cube_sql_view`;
CREATE TABLE `cube_sql_view` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sql_name` varchar(100) NOT NULL COMMENT 'SQL名称',
  `view_name` varchar(50) NOT NULL COMMENT '视图名称',
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `sql_statement` longtext NOT NULL COMMENT 'SQL语句',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL创建的数据集视图';

-- ----------------------------
-- Records of cube_sql_view
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_table_column
-- ----------------------------
DROP TABLE IF EXISTS `cube_table_column`;
CREATE TABLE `cube_table_column` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cube_data_id` int NOT NULL COMMENT '数据集ID',
  `column_title` varchar(100) NOT NULL COMMENT '字段显示名',
  `column_name` varchar(200) DEFAULT NULL COMMENT '物理字段名(虚拟字段可能有多个逗号分隔)',
  `table_name` varchar(50) DEFAULT NULL COMMENT '表名',
  `table_alias_name` varchar(50) DEFAULT NULL COMMENT '表别名',
  `view_data_type` tinyint NOT NULL COMMENT '字段数据展示类型(0-字符串/1-数字/2-日期)',
  `old_view_data_type` tinyint DEFAULT NULL COMMENT '旧字段数据展示类型',
  `column_comment` varchar(200) DEFAULT NULL COMMENT '字段注释',
  `aggregation_type` tinyint DEFAULT NULL COMMENT '聚合类型(0-求和/1-计数等等)',
  `number_data_format` tinyint DEFAULT NULL COMMENT '指标-数值类型展示格式(0-整数/1-保留2位等)',
  `time_data_format` tinyint DEFAULT NULL COMMENT '维度-日期类型展示格式(例如:yyyy-MM-dd等)',
  `column_cite_json` text COMMENT '虚拟字段引用JSON格式字符串',
  `column_formula` varchar(1500) DEFAULT NULL COMMENT '虚拟字段公式',
  `column_attr` tinyint NOT NULL DEFAULT '0' COMMENT '字段类型(0-标准字段/1-虚拟字段)',
  `column_sql` text COMMENT '格式化后的SQL',
  `dimension_type` tinyint NOT NULL COMMENT '指标/维度类型(0-维度/1-指标)',
  `hidden_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否隐藏(0-否/1-是)',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人姓名',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `virtual_aggregation_status` tinyint NOT NULL DEFAULT '0' COMMENT '虚拟字段是否包含聚合函数',
  `virtual_only_zhibiao_status` tinyint NOT NULL DEFAULT '0' COMMENT '虚拟字段是否仅用于指标列查询',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集_表结构';

-- ----------------------------
-- Records of cube_table_column
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_table_file
-- ----------------------------
DROP TABLE IF EXISTS `cube_table_file`;
CREATE TABLE `cube_table_file` (
  `id` int NOT NULL AUTO_INCREMENT,
  `file_name` varchar(100) NOT NULL COMMENT '文件名称',
  `table_name` varchar(50) NOT NULL COMMENT '表名',
  `table_comment` varchar(200) NOT NULL COMMENT '表注释',
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `file_size` bigint NOT NULL DEFAULT '0' COMMENT '文件大小(byte)',
  `file_uri` varchar(300) NOT NULL COMMENT '文件路径',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集_文件表';

-- ----------------------------
-- Records of cube_table_file
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_table_static
-- ----------------------------
DROP TABLE IF EXISTS `cube_table_static`;
CREATE TABLE `cube_table_static` (
  `id` int NOT NULL AUTO_INCREMENT,
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `cube_data_id` int NOT NULL COMMENT '数据集ID',
  `table_comment` varchar(200) NOT NULL COMMENT '表注释',
  `table_name` varchar(100) NOT NULL COMMENT '表名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集_静态数据表';

-- ----------------------------
-- Records of cube_table_static
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cube_workspace
-- ----------------------------
DROP TABLE IF EXISTS `cube_workspace`;
CREATE TABLE `cube_workspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级分类ID',
  `ws_name` varchar(50) NOT NULL COMMENT '工作空间名称',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(30) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL DEFAULT '0' COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `system_status` tinyint not null default 0 COMMENT '是否系统分类(0-否，1-是)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集_工作空间';

-- ----------------------------
-- Records of cube_workspace
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for custom_tag_classify
-- ----------------------------
DROP TABLE IF EXISTS `custom_tag_classify`;
CREATE TABLE `custom_tag_classify` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自定义标签分类id',
  `classify_id` varchar(100) NOT NULL COMMENT '分类id',
  `classify_name` varchar(100) NOT NULL COMMENT '分类名称',
  `is_online` int NOT NULL COMMENT '状态',
  `classify_desc` varchar(100) DEFAULT NULL COMMENT '介绍',
  `sort` int DEFAULT NULL COMMENT '顺序',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_user_id` bigint DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义标签分类表';

-- ----------------------------
-- Records of custom_tag_classify
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for custom_tag_dict
-- ----------------------------
DROP TABLE IF EXISTS `custom_tag_dict`;
CREATE TABLE `custom_tag_dict` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自定义标签字典id',
  `tag_id` varchar(100) NOT NULL COMMENT '标签id',
  `tag_name` varchar(100) NOT NULL COMMENT '标签名称',
  `english_name` varchar(100) DEFAULT NULL COMMENT '英文名称',
  `exclusion` varchar(20) DEFAULT NULL COMMENT '是否互斥 0:不互斥,1:互斥',
  `classify_id` int DEFAULT NULL COMMENT '标签分类id',
  `request_freq` int DEFAULT NULL COMMENT '计算频次',
  `develop_type` int DEFAULT NULL COMMENT '开发方式',
  `tag_c_type` varchar(100) NOT NULL COMMENT '对应列的属性',
  `show_his` int DEFAULT NULL COMMENT '0:不展示历史 1:展示曲线（柱状）图 2：罗列展示值',
  `has_dict` int DEFAULT NULL COMMENT '是否已下拉列表展示 0:无可选项,1:有可选项',
  `search_type` varchar(20) DEFAULT NULL COMMENT '查值的形式 string number datetime bool',
  `is_online` int NOT NULL COMMENT '状态',
  `tag_desc` varchar(100) DEFAULT NULL COMMENT '介绍',
  `sort` varchar(100) DEFAULT NULL COMMENT '顺序',
  `filter_rule` text NOT NULL COMMENT '过滤规则',
  `fentong_rule` text COMMENT '分桶规则',
  `job_id` int DEFAULT NULL COMMENT 'jobid',
  `result_table` varchar(100) DEFAULT NULL COMMENT '结果集对应表',
  `cube_ids` json DEFAULT NULL COMMENT '数据集id集合',
  `status` int DEFAULT NULL COMMENT '计算状态(0未开始/1计算中/2已完成)',
  `amount` bigint DEFAULT NULL COMMENT '覆盖人数',
  `time_zone` varchar(100) DEFAULT NULL COMMENT '时间分区',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义标签表';

-- ----------------------------
-- Records of custom_tag_dict
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for custom_tag_value
-- ----------------------------
DROP TABLE IF EXISTS `custom_tag_value`;
CREATE TABLE `custom_tag_value` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自定义标签值id',
  `value_id` varchar(100) NOT NULL COMMENT '标签值id',
  `value_name` varchar(100) NOT NULL COMMENT '标签值名称',
  `tag_dict_id` int DEFAULT NULL COMMENT '标签id',
  `is_online` int NOT NULL COMMENT '状态',
  `value_desc` varchar(100) DEFAULT NULL COMMENT '介绍',
  `sort` int DEFAULT NULL COMMENT '顺序',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_user_id` bigint DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义标签值表';

-- ----------------------------
-- Records of custom_tag_value
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customer_liallin_record
-- ----------------------------
DROP TABLE IF EXISTS `customer_liallin_record`;
CREATE TABLE `customer_liallin_record` (
  `id` bigint NOT NULL DEFAULT '0' COMMENT '主键ID',
  `report_name` varchar(100) DEFAULT NULL COMMENT '报表名称',
  `category_code` varchar(50) DEFAULT NULL COMMENT '分类code',
  `report_url` varchar(200) DEFAULT NULL COMMENT '上传地址',
  `create_user` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of customer_liallin_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customer_report
-- ----------------------------
DROP TABLE IF EXISTS `customer_report`;
CREATE TABLE `customer_report` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `report_name` varchar(100) DEFAULT NULL COMMENT '报表名称',
  `category_id` bigint DEFAULT NULL COMMENT '分类ID',
  `category_code` varchar(50) DEFAULT NULL COMMENT '分类code',
  `report_url` varchar(200) DEFAULT NULL COMMENT '上传地址',
  `create_user` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `batch_num` varchar(20) DEFAULT NULL COMMENT '批次号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='客服数据表';

-- ----------------------------
-- Records of customer_report
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customer_report_category
-- ----------------------------
DROP TABLE IF EXISTS `customer_report_category`;
CREATE TABLE `customer_report_category` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `category_name` varchar(100) DEFAULT NULL COMMENT '分类名称',
  `category_code` varchar(50) DEFAULT NULL COMMENT '分类code',
  `template` varchar(200) DEFAULT NULL COMMENT '报表模板',
  `create_user` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='客服数据分类表';

-- ----------------------------
-- Records of customer_report_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_api
-- ----------------------------
DROP TABLE IF EXISTS `data_api`;
CREATE TABLE `data_api` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `api_name` varchar(50) NOT NULL COMMENT '接口名称',
  `api_key` varchar(50) NOT NULL COMMENT '唯一关键词',
  `api_type` int DEFAULT '0' COMMENT '接口类别 0-报表 1-常规 2-第三方接口',
  `category_id` int DEFAULT '0' COMMENT '接口分类id,关联 data_api_category表',
  `api_formal` int DEFAULT '0' COMMENT '接口类型 1-正式 0-临时',
  `api_url` varchar(300) DEFAULT NULL COMMENT '接口地址',
  `datasource_id` int DEFAULT '0' COMMENT '数据源id',
  `query_table` varchar(200) DEFAULT NULL COMMENT '查询表视图名称',
  `query_param` text COMMENT '查询条件/参数说明',
  `query_sql` text COMMENT '查询sql语句',
  `api_status` int DEFAULT '0' COMMENT '接口状态 0-下线 1-上线 2-故障',
  `login_required` int DEFAULT '0' COMMENT '是否需要登录 0-不需要 1-需要',
  `pid` int DEFAULT NULL COMMENT '二级分类id',
  `note` text COMMENT '扩展字段',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `api_method` varchar(10) DEFAULT NULL COMMENT 'API接口请求方式(POST/GET)',
  `api_headers` text COMMENT 'API接口请求头JSON',
  `api_js_function` text COMMENT 'API接口返回数据解析js函数',
  `api_param_type` tinyint DEFAULT '0' COMMENT 'API接口参数传递方式（0:json/1:x-www-form-urlencoded）',
  `chart_type` tinyint DEFAULT NULL COMMENT '图表类型',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `is_page` tinyint DEFAULT NULL COMMENT '是否分页',
  `page_size` tinyint DEFAULT NULL COMMENT '分页数量',
  PRIMARY KEY (`id`),
  UNIQUE KEY `api_key` (`api_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of data_api
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_api_category
-- ----------------------------
DROP TABLE IF EXISTS `data_api_category`;
CREATE TABLE `data_api_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 自增',
  `pid` int DEFAULT NULL COMMENT 'pid',
  `order_index` int NOT NULL DEFAULT '0' COMMENT '排序值，从小到大排',
  `category_name` varchar(50) NOT NULL COMMENT '指标分类名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of data_api_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_api_config
-- ----------------------------
DROP TABLE IF EXISTS `data_api_config`;
CREATE TABLE `data_api_config` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `api_id` int DEFAULT NULL COMMENT '接口id',
  `config_type` int DEFAULT NULL COMMENT '配置类型 1-列维度 2-行维度 3-指标',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of data_api_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_api_config_detail
-- ----------------------------
DROP TABLE IF EXISTS `data_api_config_detail`;
CREATE TABLE `data_api_config_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `api_config_id` int DEFAULT NULL COMMENT '接口配置id',
  `dimension_id` int DEFAULT NULL COMMENT '维度id',
  `sort_order` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of data_api_config_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_api_insert
-- ----------------------------
DROP TABLE IF EXISTS `data_api_insert`;
CREATE TABLE `data_api_insert` (
  `id` int NOT NULL AUTO_INCREMENT,
  `api_name` varchar(150) NOT NULL COMMENT '接口名称',
  `api_key` varchar(100) NOT NULL COMMENT 'API关键字',
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `table_name` varchar(100) NOT NULL COMMENT '数据库表名',
  `category_id` int NOT NULL DEFAULT '0' COMMENT '分类ID',
  `param_json` longtext NOT NULL COMMENT '参数json',
  `api_status` tinyint NOT NULL DEFAULT '1' COMMENT 'API状态',
  `api_url` varchar(100) NOT NULL COMMENT '接口地址',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注说明',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `api_key` (`api_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='API入库接口';

-- ----------------------------
-- Records of data_api_insert
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_permission
-- ----------------------------
DROP TABLE IF EXISTS `data_permission`;
CREATE TABLE `data_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `perm_name` varchar(100) NOT NULL COMMENT '权限组名称',
  `type_id` int NOT NULL DEFAULT '0' COMMENT '分类ID',
  `perm_tag` varchar(20) DEFAULT NULL COMMENT '权限组标签',
  `perm_json` json NOT NULL COMMENT '权限组数据json',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户ID',
  `super_status` tinyint NOT NULL DEFAULT '0' COMMENT '超级权限组',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组表';

-- ----------------------------
-- Records of data_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_permission_dept
-- ----------------------------
DROP TABLE IF EXISTS `data_permission_dept`;
CREATE TABLE `data_permission_dept` (
  `id` int NOT NULL AUTO_INCREMENT,
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `dept_id` bigint NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `dept_id` (`dept_id`,`data_perm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组和部门关联表';

-- ----------------------------
-- Records of data_permission_dept
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_permission_role
-- ----------------------------
DROP TABLE IF EXISTS `data_permission_role`;
CREATE TABLE `data_permission_role` (
  `id` int NOT NULL AUTO_INCREMENT,
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`,`data_perm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组和角色关联表';

-- ----------------------------
-- Records of data_permission_role
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_permission_type
-- ----------------------------
DROP TABLE IF EXISTS `data_permission_type`;
CREATE TABLE `data_permission_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_name` varchar(50) NOT NULL COMMENT '分类名称',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人姓名',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组分类';

-- ----------------------------
-- Records of data_permission_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_permission_user
-- ----------------------------
DROP TABLE IF EXISTS `data_permission_user`;
CREATE TABLE `data_permission_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `user_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否直接设置',
  PRIMARY KEY (`id`),
  UNIQUE KEY `data_perm_id` (`data_perm_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组与用户关系表';

-- ----------------------------
-- Records of data_permission_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_report
-- ----------------------------
DROP TABLE IF EXISTS `data_report`;
CREATE TABLE `data_report` (
  `F_Id` varchar(50) NOT NULL COMMENT '	主键ID',
  `F_CategoryId` varchar(50) DEFAULT NULL COMMENT '分组ID',
  `F_FullName` varchar(50) DEFAULT NULL COMMENT '报表名称',
  `F_Content` longtext COMMENT '报表内容',
  `F_EnCode` varchar(50) DEFAULT NULL COMMENT '编码',
  `F_SortCode` varchar(50) DEFAULT NULL COMMENT '排序码(默认0)',
  `F_EnabledMark` int DEFAULT NULL COMMENT '状态(0-默认，禁用，1-启用)',
  `F_Description` varchar(500) DEFAULT NULL COMMENT '描述或说明',
  `F_CreatorTime` datetime DEFAULT NULL COMMENT '创建时间',
  `F_CreatorUserId` varchar(50) DEFAULT NULL COMMENT '创建用户',
  `F_LastModifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  `F_LastModifyUserId` varchar(50) DEFAULT NULL COMMENT '修改用户',
  `F_DeleteMark` int DEFAULT NULL COMMENT '删除标志(默认0)',
  `F_DeleteTime` datetime DEFAULT NULL COMMENT '删除时间',
  `F_DeleteUserId` varchar(50) DEFAULT NULL COMMENT '删除用户id',
  PRIMARY KEY (`F_Id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='数据报表';

-- ----------------------------
-- Records of data_report
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for digital_operation
-- ----------------------------
DROP TABLE IF EXISTS `digital_operation`;
CREATE TABLE `digital_operation` (
  `C1` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of digital_operation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsy_job
-- ----------------------------
DROP TABLE IF EXISTS `dsy_job`;
CREATE TABLE `dsy_job` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `category_id` int NOT NULL COMMENT '分类ID',
  `job_name` varchar(100) NOT NULL COMMENT '任务名称',
  `job_desc` varchar(500) DEFAULT NULL COMMENT '任务描述',
  `job_status` tinyint NOT NULL COMMENT '上线状态',
  `job_type` tinyint NOT NULL COMMENT '任务类型',
  `trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '调度状态',
  `job_cron` varchar(20) DEFAULT NULL COMMENT 'xxljob的任务Cron',
  `xxl_job_id` int DEFAULT NULL COMMENT 'xxljob的任务ID',
  `source_ds_id` int NOT NULL COMMENT '输入数据源ID',
  `source_ds_type` tinyint DEFAULT NULL COMMENT '输入数据源类型',
  `target_ds_id` int NOT NULL COMMENT '目标数据源ID',
  `target_ds_type` tinyint DEFAULT NULL COMMENT '目标数据源类型',
  `sync_type` tinyint NOT NULL COMMENT '同步方式',
  `truncate_table_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否清空数据',
  `sync_index_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否同步索引',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '公开状态(0-不公开/1-公开)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_user_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据同步任务';

-- ----------------------------
-- Records of dsy_job
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsy_job_category
-- ----------------------------
DROP TABLE IF EXISTS `dsy_job_category`;
CREATE TABLE `dsy_job_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `cate_name` varchar(50) NOT NULL COMMENT '分类名称',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据同步任务分类';

-- ----------------------------
-- Records of dsy_job_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsy_job_instance
-- ----------------------------
DROP TABLE IF EXISTS `dsy_job_instance`;
CREATE TABLE `dsy_job_instance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `job_id` int NOT NULL COMMENT '任务ID',
  `job_table_id` int NOT NULL COMMENT '任务表数据ID',
  `server_ip` varchar(100) NOT NULL COMMENT '服务器IP',
  `start_time` datetime DEFAULT NULL COMMENT '作业开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '作业结束时间',
  `instance_run_type` tinyint NOT NULL COMMENT '作业运行类型(手动 自动)',
  `instance_type` tinyint NOT NULL COMMENT '作业类型(流作业 批作业)',
  `instance_status` tinyint NOT NULL COMMENT '作业状态',
  `err_msg` longtext COMMENT '错误描述',
  `read_row_count` bigint NOT NULL DEFAULT '0' COMMENT '读取行数',
  `write_row_count` bigint NOT NULL DEFAULT '0' COMMENT '写入行数',
  `write_speed` int NOT NULL DEFAULT '0' COMMENT '数据写入速度',
  `data_flow_avg` varchar(100) DEFAULT NULL COMMENT '数据平均流量',
  `error_row_count` bigint NOT NULL DEFAULT '0' COMMENT '错误行数',
  `create_time` datetime NOT NULL COMMENT '任务创建时间',
  `sync_type` tinyint NOT NULL DEFAULT '0' COMMENT '同步方式',
  `start_increment_data` varchar(255) DEFAULT NULL COMMENT '增量字段开始值',
  `end_increment_data` varchar(255) DEFAULT NULL COMMENT '增量字段结束值',
  `datax_pid` varchar(50) DEFAULT NULL COMMENT 'datax进程ID号',
  `datax_log_name` varchar(200) DEFAULT NULL COMMENT 'datax日志名称',
  `datax_config_name` varchar(200) DEFAULT NULL COMMENT 'datax配置文件名称',
  `source_table_name` varchar(100) DEFAULT NULL COMMENT '输入数据源表名',
  `target_table_name` varchar(100) DEFAULT NULL COMMENT '目标数据源表名',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `instance_status` (`instance_status`),
  KEY `job_id` (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据同步任务实例';

-- ----------------------------
-- Records of dsy_job_instance
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsy_job_permission
-- ----------------------------
DROP TABLE IF EXISTS `dsy_job_permission`;
CREATE TABLE `dsy_job_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据同步任务权限组';

-- ----------------------------
-- Records of dsy_job_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsy_job_table
-- ----------------------------
DROP TABLE IF EXISTS `dsy_job_table`;
CREATE TABLE `dsy_job_table` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `job_id` int NOT NULL COMMENT '任务ID',
  `source_table_name` varchar(100) NOT NULL COMMENT '输入数据源表名',
  `source_table_comment` varchar(150) NOT NULL COMMENT '输入数据源表注释',
  `target_table_name` varchar(100) NOT NULL COMMENT '目标数据源表名',
  `target_table_comment` varchar(150) DEFAULT NULL COMMENT '目标数据源表注释',
  `increment_column_name` varchar(100) DEFAULT NULL COMMENT '数据源表的增量字段名',
  `increment_column_type` tinyint DEFAULT NULL COMMENT '数据源表的增量字段类型',
  `create_table_status` tinyint NOT NULL COMMENT '是否自动建表',
  `sync_type` tinyint DEFAULT NULL COMMENT '同步方式',
  `truncate_table_status` tinyint DEFAULT NULL COMMENT '是否清空数据',
  `sync_index_status` tinyint DEFAULT NULL COMMENT '是否同步索引',
  `query_sql` text NOT NULL COMMENT '查询SQL语句',
  `pre_sql` varchar(1000) DEFAULT NULL COMMENT '同步任务前执行语句(一般truncate)',
  `source_column_json` text COMMENT '输入源字段json',
  `target_column_json` longtext COMMENT '目标源字段json',
  `target_column_upper_status` tinyint NOT NULL COMMENT '是否大写',
  `ext_json` text COMMENT '其他数据json',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `start_increment_data` varchar(255) DEFAULT NULL COMMENT '增量字段开始值',
  `end_increment_data` varchar(255) DEFAULT NULL COMMENT '增量字段结束值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据同步任务表信息';

-- ----------------------------
-- Records of dsy_job_table
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_column_system
-- ----------------------------
DROP TABLE IF EXISTS `etl_column_system`;
CREATE TABLE `etl_column_system` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字段名称',
  `db_type` int NOT NULL COMMENT '数据源类型 0-mysql 1-oracle 2-sqlserver 3-postgresql 4-clickhouse 5-人大金仓 6-达梦',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='数据库系统自留字段表';

-- ----------------------------
-- Records of etl_column_system
-- ----------------------------
BEGIN;
INSERT INTO `etl_column_system` (`id`, `name`, `db_type`) VALUES (11, 'select', 0);
INSERT INTO `etl_column_system` (`id`, `name`, `db_type`) VALUES (12, 'UID', 1);
INSERT INTO `etl_column_system` (`id`, `name`, `db_type`) VALUES (13, 'uid', 1);
INSERT INTO `etl_column_system` (`id`, `name`, `db_type`) VALUES (14, 'openid', 0);
COMMIT;

-- ----------------------------
-- Table structure for etl_job
-- ----------------------------
DROP TABLE IF EXISTS `etl_job`;
CREATE TABLE `etl_job` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL COMMENT '分类ID',
  `job_name` varchar(100) NOT NULL COMMENT '任务名称',
  `job_status` tinyint NOT NULL COMMENT '作业状态(草稿、发布、归档)',
  `job_type` tinyint NOT NULL COMMENT '任务类型(流任务 批任务)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) NOT NULL COMMENT '创建人姓名',
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人姓名',
  `update_user_id` bigint DEFAULT NULL COMMENT '修改人ID',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `global_param` varchar(1000) DEFAULT NULL COMMENT '全局参数',
  `job_cron` varchar(255) DEFAULT NULL COMMENT 'xxljob任务cron',
  `xxl_job_id` int DEFAULT NULL COMMENT 'xxlJob任务ID',
  `trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否开启定时调度',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否公开状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务定义表';

-- ----------------------------
-- Records of etl_job
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_job_category
-- ----------------------------
DROP TABLE IF EXISTS `etl_job_category`;
CREATE TABLE `etl_job_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cate_name` varchar(50) NOT NULL COMMENT '分类名称',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) NOT NULL COMMENT '创建人姓名',
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务分类表';

-- ----------------------------
-- Records of etl_job_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_job_instance
-- ----------------------------
DROP TABLE IF EXISTS `etl_job_instance`;
CREATE TABLE `etl_job_instance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `job_engine_id` varchar(100) DEFAULT NULL COMMENT '计算引擎的作业ID',
  `web_interface_url` varchar(300) DEFAULT NULL COMMENT 'flink的web地址',
  `application_id` varchar(100) DEFAULT NULL COMMENT 'Flink application id',
  `instance_type` tinyint NOT NULL COMMENT '作业类型(流作业 批作业)',
  `instance_status` tinyint NOT NULL DEFAULT '0' COMMENT '作业运行状态(运行中 成功 失败 中断)',
  `start_time` datetime NOT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `err_msg` longtext COMMENT '错误描述',
  `instance_run_type` tinyint DEFAULT NULL COMMENT '作业运行类型(手动 自动)',
  `engine_job_status` varchar(255) DEFAULT NULL COMMENT '引擎运行状态',
  `read_row_count` bigint NOT NULL DEFAULT '0' COMMENT '读取行数',
  `write_row_count` bigint NOT NULL DEFAULT '0' COMMENT '写入行数',
  `read_qps` bigint NOT NULL DEFAULT '0' COMMENT '读取QPS',
  `write_qps` bigint NOT NULL DEFAULT '0' COMMENT '写入QPS',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务实例表';

-- ----------------------------
-- Records of etl_job_instance
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_job_link
-- ----------------------------
DROP TABLE IF EXISTS `etl_job_link`;
CREATE TABLE `etl_job_link` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `from_code` varchar(50) NOT NULL COMMENT '开始节点code',
  `to_code` varchar(50) NOT NULL COMMENT '目标节点code',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务步骤连接表';

-- ----------------------------
-- Records of etl_job_link
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_job_permission
-- ----------------------------
DROP TABLE IF EXISTS `etl_job_permission`;
CREATE TABLE `etl_job_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据大屏权限组';

-- ----------------------------
-- Records of etl_job_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_job_task
-- ----------------------------
DROP TABLE IF EXISTS `etl_job_task`;
CREATE TABLE `etl_job_task` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `plugin_type` tinyint NOT NULL COMMENT '插件类型',
  `connector_type` tinyint DEFAULT NULL COMMENT '连接器类型',
  `config_json` longtext COMMENT '配置json',
  `ext_json` longtext COMMENT '扩展json',
  `task_code` varchar(50) DEFAULT NULL COMMENT '节点code',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) NOT NULL COMMENT '创建人姓名',
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务步骤(节点)表';

-- ----------------------------
-- Records of etl_job_task
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for etl_sql_column
-- ----------------------------
DROP TABLE IF EXISTS `etl_sql_column`;
CREATE TABLE `etl_sql_column` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `sql_column_type` varchar(255) DEFAULT NULL COMMENT '数据库字段类型',
  `ds_type` int DEFAULT NULL COMMENT '数据源类型 0-mysql 1-oracle 2-sqlserver 3-postgresql 4-clickhouse',
  `column_type` varchar(50) DEFAULT NULL COMMENT '通用字段类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of etl_sql_column
-- ----------------------------
BEGIN;
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (1, 'STRING', 0, 'CHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (2, 'STRING', 0, 'VARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (3, 'STRING', 0, 'LONGVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (4, 'STRING', 0, 'BINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (5, 'STRING', 0, 'VARBINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (6, 'STRING', 0, 'LONGVARBINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (7, 'STRING', 0, 'BLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (8, 'STRING', 0, 'CLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (9, 'STRING', 0, 'NCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (10, 'STRING', 0, 'NVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (11, 'STRING', 0, 'LONGNVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (12, 'STRING', 0, 'NCLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (13, 'STRING', 0, 'ARRAY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (14, 'DATE', 0, 'DATE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (15, 'DATE', 0, 'TIME');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (16, 'DATE', 0, 'TIMESTAMP');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (17, 'DATE', 0, 'DATETIME');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (18, 'STRING', 0, 'BIT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (19, 'INTEGER', 0, 'TINYINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (20, 'INTEGER', 0, 'SMALLINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (21, 'INTEGER', 0, 'INTEGER');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (22, 'INTEGER', 0, 'BOOLEAN');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (24, 'LONG', 0, 'BIGINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (25, 'FLOAT', 0, 'FLOAT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (26, 'DECIMAL', 0, 'REAL');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (27, 'DOUBLE', 0, 'DOUBLE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (28, 'DECIMAL', 0, 'DECIMAL');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (29, 'STRING', 1, 'CHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (30, 'STRING', 1, 'VARCHAR2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (31, 'INTEGER', 1, 'NUMBER');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (32, 'DATE', 1, 'DATE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (33, 'FLOAT', 1, 'FLOAT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (34, 'STRING', 1, 'CLOB RAW');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (35, 'STRING', 1, 'VARCHAR2 CLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (36, 'LONG', 1, 'NUMBER(19,0)');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (37, 'INTEGER', 1, 'NUMBER(7,0)');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (38, 'INTEGER', 1, 'NUMBER(5,0)');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (39, 'BOOLEAN', 1, 'NUMBER(3,0)');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (40, 'FLOAT', 4, 'Float32');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (41, 'DOUBLE', 4, 'Float64');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (42, 'INTEGER', 4, 'Int32');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (43, 'INTEGER', 4, 'Int8');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (44, 'INTEGER', 4, 'Int16');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (45, 'INTEGER', 4, 'UInt8');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (46, 'INTEGER', 4, 'UInit16');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (47, 'INTEGER', 4, 'UInut32');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (48, 'LONG', 4, 'Int64');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (49, 'LONG', 4, 'Int128');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (50, 'LONG', 4, 'Inte256');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (51, 'LONG', 4, 'UInit64');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (52, 'LONG', 4, 'UInit128');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (53, 'LONG', 4, 'UInit256');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (54, 'STRING', 4, 'String');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (55, 'DECIMAL', 4, 'Decimal');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (56, 'DECIMAL', 4, 'Decimal32');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (57, 'DECIMAL', 4, 'Decimal64');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (58, 'DECIMAL', 4, 'Decimal128');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (59, 'DATE', 4, 'DateTime');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (60, 'DATE', 4, 'DATE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (61, 'DATE', 4, 'DATE32');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (62, 'DATE', 4, 'DateTime64');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (63, 'STRING', 4, 'JSON');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (64, 'STRING', 4, 'UUID');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (65, 'STRING', 4, 'fixedString');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (66, 'STRING', 0, 'TEXT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (67, 'STRING', 3, 'ARRAY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (68, 'STRING', 3, 'BINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (69, 'STRING', 3, 'BLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (70, 'STRING', 3, 'CHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (71, 'STRING', 3, 'CLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (72, 'STRING', 3, 'LONGNVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (73, 'STRING', 3, 'LONGVARBINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (74, 'STRING', 3, 'LONGVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (75, 'STRING', 3, 'NCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (76, 'STRING', 3, 'NCLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (77, 'STRING', 3, 'NVARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (78, 'STRING', 3, 'TEXT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (79, 'STRING', 3, 'VARBINARY');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (80, 'STRING', 3, 'VARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (81, 'STRING', 3, 'UUID');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (82, 'STRING', 3, 'XML');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (83, 'STRING', 3, 'JSON');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (84, 'INTEGER', 3, 'BIT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (85, 'INTEGER', 3, 'BOOLEAN');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (86, 'INTEGER', 3, 'INT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (87, 'INTEGER', 3, 'INTEGER');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (88, 'INTEGER', 3, 'SMALLINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (89, 'INTEGER', 3, 'TINYINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (90, 'INTEGER', 3, 'int2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (91, 'INTEGER', 3, 'int4');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (92, 'INTEGER', 3, 'int8');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (93, 'LONG', 3, 'BIGINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (94, 'DOUBLE', 3, 'double precision');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (95, 'DOUBLE', 3, 'DOUBLE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (96, 'DECIMAL', 3, 'REAL');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (97, 'DECIMAL', 3, 'DECIMAL');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (98, 'FLOAT', 3, 'FLOAT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (99, 'DATE', 3, 'DATETIME');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (100, 'DATE', 3, 'DATE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (101, 'DATE', 3, 'TIME');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (102, 'DATE', 3, 'TIMESTAMP');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (103, 'STRING', 5, 'varchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (104, 'STRING', 5, 'char');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (105, 'STRING', 5, 'text');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (106, 'STRING', 5, 'character varying');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (107, 'STRING', 5, 'varchar2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (108, 'STRING', 5, 'nvarchar2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (109, 'STRING', 5, 'nvarchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (110, 'STRING', 5, 'character');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (111, 'STRING', 5, 'longtext');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (112, 'STRING', 5, 'mediumtext');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (113, 'STRING', 5, 'tinytext');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (114, 'DECIMAL', 5, 'decimal');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (115, 'DECIMAL', 5, 'numeric');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (116, 'DECIMAL', 5, 'number');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (117, 'DECIMAL', 5, 'fixed');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (118, 'DOUBLE', 5, 'double');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (119, 'FLOAT', 5, 'real');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (120, 'DOUBLE', 5, 'double precision');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (121, 'DOUBLE', 5, 'bigserial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (122, 'FLOAT', 5, 'float');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (123, 'FLOAT', 5, 'smallserial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (124, 'FLOAT', 5, 'serial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (125, 'DATE', 5, 'date');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (126, 'DATE', 5, 'timestamp');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (127, 'LONG', 5, 'int8');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (128, 'LONG', 5, 'bigint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (129, 'INTEGER', 5, 'int');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (130, 'INTEGER', 5, 'int4');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (131, 'INTEGER', 5, 'tinyint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (132, 'INTEGER', 5, 'int1');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (133, 'INTEGER', 5, 'smallint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (134, 'INTEGER', 5, 'middleint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (135, 'INTEGER', 5, 'mediumint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (136, 'INTEGER', 5, 'int3');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (137, 'INTEGER', 5, 'integer');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (138, 'DOUBLE', 5, 'Float8');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (139, 'INTEGER', 5, 'int2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (140, 'INTEGER', 6, 'INT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (141, 'INTEGER', 6, 'SMALLINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (142, 'INTEGER', 6, 'TINYINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (143, 'INTEGER', 6, 'INTEGER');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (144, 'INTEGER', 6, 'PLS_INTEGER');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (145, 'DECIMAL', 6, 'NUMERIC');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (146, 'DECIMAL', 6, 'DECIMAL');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (147, 'FLOAT', 6, 'FLOAT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (148, 'DOUBLE', 6, 'DOUBLE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (149, 'DATE', 6, 'TIMESTAMP');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (150, 'DATE', 6, 'DATE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (151, 'DATE', 6, 'TIME');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (152, 'LONG', 6, 'BIGINT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (153, 'STRING', 6, 'VARCHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (154, 'STRING', 6, 'TEXT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (155, 'STRING', 6, 'CHAR');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (156, 'STRING', 0, 'LONGTEXT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (157, 'STRING', 2, 'char');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (158, 'STRING', 2, 'varchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (159, 'STRING', 2, 'text');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (160, 'STRING', 2, 'nchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (161, 'STRING', 2, 'nvarchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (162, 'STRING', 2, 'ntext');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (163, 'STRING', 2, 'uniqueidentifier');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (164, 'STRING', 2, 'xml');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (165, 'LONG', 2, 'bigint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (166, 'DECIMAL', 2, 'decimal');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (167, 'DECIMAL', 2, 'money');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (168, 'DECIMAL', 2, 'smallmoney');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (169, 'DECIMAL', 2, 'numeric');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (170, 'INTEGER', 2, 'int');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (171, 'INTEGER', 2, 'smallint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (172, 'INTEGER', 2, 'tinyint');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (173, 'DOUBLE', 2, 'float');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (174, 'FLOAT', 2, 'real');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (175, 'DATE', 2, 'time');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (176, 'DATE', 2, 'date');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (177, 'DATE', 2, 'datetime2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (178, 'DATE', 2, 'datetimeoffset');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (179, 'DATE', 2, 'datetime');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (180, 'DATE', 2, 'smalldatetime');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (181, 'DOUBLE', 3, 'NUMERIC');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (182, 'INTEGER', 3, 'smallserial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (183, 'INTEGER', 3, 'serial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (184, 'LONG', 3, 'bigserial');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (185, 'STRING', 2, 'bit');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (186, 'STRING', 2, 'binary');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (187, 'STRING', 2, 'varbinary');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (188, 'STRING', 1, 'CLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (189, 'STRING', 1, 'NCLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (190, 'STRING', 1, 'BLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (191, 'STRING', 1, 'RAW');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (192, 'STRING', 1, 'BFILE');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (193, 'STRING', 1, 'ROWID');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (194, 'STRING', 1, 'NROWID');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (195, 'STRING', 1, 'nvarchar2');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (197, 'DOUBLE', 1, 'real');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (198, 'LONG', 1, 'long');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (199, 'STRING', 1, 'nchar');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (200, 'INTEGER', 1, 'integer');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (201, 'DECIMAL', 1, 'decimal');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (202, 'STRING', 1, 'UROWID');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (203, 'STRING', 0, 'LONGBLOB');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (204, 'INTEGER', 0, 'INT UNSIGNED');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (210, 'INTEGER', 0, 'INT');
INSERT INTO `etl_sql_column` (`id`, `sql_column_type`, `ds_type`, `column_type`) VALUES (213, 'STRING', 0, 'MEDIUMTEXT');
COMMIT;

-- ----------------------------
-- Table structure for foreign_white_list
-- ----------------------------
DROP TABLE IF EXISTS `foreign_white_list`;
CREATE TABLE `foreign_white_list` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ip_address` varchar(100) NOT NULL COMMENT 'ip地址',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of foreign_white_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for headquarters_conference_record
-- ----------------------------
DROP TABLE IF EXISTS `headquarters_conference_record`;
CREATE TABLE `headquarters_conference_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `conference_time` date DEFAULT NULL COMMENT '会议时间',
  `week` varchar(20) DEFAULT NULL COMMENT '星期',
  `content` varchar(2000) DEFAULT NULL COMMENT '会议内容',
  `remark` varchar(50) DEFAULT NULL COMMENT '备注',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会议记录表';

-- ----------------------------
-- Records of headquarters_conference_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for history_report_folder
-- ----------------------------
DROP TABLE IF EXISTS `history_report_folder`;
CREATE TABLE `history_report_folder` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `sort_order` int NOT NULL DEFAULT '0' COMMENT '显示排序',
  `folder_name` varchar(50) NOT NULL COMMENT '文件夹名称',
  `user_id` bigint NOT NULL DEFAULT '0' COMMENT '用户id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of history_report_folder
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for history_report_info
-- ----------------------------
DROP TABLE IF EXISTS `history_report_info`;
CREATE TABLE `history_report_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `folder_id` int NOT NULL COMMENT '文件夹id',
  `report_month` varchar(50) DEFAULT NULL COMMENT '月份',
  `report_title` varchar(50) DEFAULT NULL COMMENT '报告名称',
  `background_url` varchar(300) DEFAULT NULL COMMENT '背景图url',
  `sort_order` int DEFAULT '0' COMMENT '显示排序',
  `is_deleted` int DEFAULT '0',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of history_report_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for login_record
-- ----------------------------
DROP TABLE IF EXISTS `login_record`;
CREATE TABLE `login_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `login_ip` varchar(100) DEFAULT NULL COMMENT '登录ip',
  `login_address` varchar(100) DEFAULT NULL COMMENT '登录地址',
  `login_time` datetime DEFAULT NULL COMMENT '登录时间',
  `login_user` varchar(100) DEFAULT NULL COMMENT '登录账号',
  `login_type` int DEFAULT NULL COMMENT '登录类型  1 账号密码登录 2 小程序登录 3 人脸登录',
  `user_id` bigint DEFAULT NULL COMMENT '账号id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户 id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of login_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mcp_user
-- ----------------------------
DROP TABLE IF EXISTS `mcp_user`;
CREATE TABLE `mcp_user` (
  `user_id` bigint NOT NULL,
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  `pass_word` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码',
  `nick_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `user_name` (`user_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理中台用户表';

-- ----------------------------
-- Records of mcp_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mcp_visual_component_define
-- ----------------------------
DROP TABLE IF EXISTS `mcp_visual_component_define`;
CREATE TABLE `mcp_visual_component_define` (
  `id` int NOT NULL AUTO_INCREMENT,
  `component_name` varchar(100) NOT NULL COMMENT '组件名称',
  `image_url` varchar(500) DEFAULT NULL COMMENT '组件图标',
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组件描述',
  `component_version` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组件版本号',
  `code_text` text COLLATE utf8mb4_unicode_ci COMMENT '代码内容',
  `enable_tenants` varchar(500) NOT NULL DEFAULT '0' COMMENT '对某些租户公开，租户id通过逗号分割',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '启用/禁用 0是禁用1是启用',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `update_by` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='自定义组件';

-- ----------------------------
-- Records of mcp_visual_component_define
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mcp_visual_component_sys
-- ----------------------------
DROP TABLE IF EXISTS `mcp_visual_component_sys`;
CREATE TABLE `mcp_visual_component_sys` (
  `id` int NOT NULL AUTO_INCREMENT,
  `component_code` varchar(255) DEFAULT NULL COMMENT '组件code',
  `component_name` varchar(100) DEFAULT NULL COMMENT '组件名称',
  `image_url` varchar(500) DEFAULT NULL COMMENT '组件图标',
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组件描述',
  `component_version` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组件版本号',
  `status` tinyint DEFAULT '0' COMMENT '是否禁用(0禁用 1 启用)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统组件';

-- ----------------------------
-- Records of mcp_visual_component_sys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mcp_visual_component_sys_category
-- ----------------------------
DROP TABLE IF EXISTS `mcp_visual_component_sys_category`;
CREATE TABLE `mcp_visual_component_sys_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分类名称',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '图标',
  `sort` int DEFAULT NULL COMMENT '排序从0开始',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统组件分类表';

-- ----------------------------
-- Records of mcp_visual_component_sys_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mcp_visual_component_sys_relation
-- ----------------------------
DROP TABLE IF EXISTS `mcp_visual_component_sys_relation`;
CREATE TABLE `mcp_visual_component_sys_relation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int DEFAULT NULL COMMENT '分类id',
  `sys_component_id` int DEFAULT NULL COMMENT '系统组件id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统组件分类关系表';

-- ----------------------------
-- Records of mcp_visual_component_sys_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for micro_app
-- ----------------------------
DROP TABLE IF EXISTS `micro_app`;
CREATE TABLE `micro_app` (
  `app_id` int NOT NULL AUTO_INCREMENT,
  `app_name` varchar(50) NOT NULL COMMENT '应用名称',
  `app_icon` varchar(200) DEFAULT NULL COMMENT '应用图标',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '公共状态(0-否/1-是)',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `publish_status` tinyint NOT NULL DEFAULT '0' COMMENT '发布状态',
  `app_description` varchar(500) DEFAULT NULL COMMENT '应用描述',
  `menu_show_type` varchar(50) DEFAULT NULL COMMENT '菜单展现形式',
  `menu_color` varchar(20) DEFAULT NULL COMMENT '菜单颜色',
  `water_mark_text` varchar(500) DEFAULT NULL COMMENT '水印文字',
  `water_mark_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否显示水印(1-是/0-否)',
  `ext_json` text COMMENT '扩展字段',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应用表';

-- ----------------------------
-- Records of micro_app
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for micro_app_data_permission
-- ----------------------------
DROP TABLE IF EXISTS `micro_app_data_permission`;
CREATE TABLE `micro_app_data_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `app_id` int NOT NULL COMMENT '应用ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='微应用权限组';

-- ----------------------------
-- Records of micro_app_data_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for micro_app_menu
-- ----------------------------
DROP TABLE IF EXISTS `micro_app_menu`;
CREATE TABLE `micro_app_menu` (
  `menu_id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `app_id` int NOT NULL COMMENT '应用ID',
  `menu_name` varchar(50) NOT NULL COMMENT '菜单名称',
  `menu_icon` varchar(200) DEFAULT NULL COMMENT '菜单图标',
  `visual_id` int DEFAULT NULL COMMENT '关联显示大屏ID',
  `visual_name` varchar(100) DEFAULT NULL COMMENT '大屏名称',
  `home_page_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否首页显示(0-否/1-是)',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应用菜单表';

-- ----------------------------
-- Records of micro_app_menu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for micro_app_role
-- ----------------------------
DROP TABLE IF EXISTS `micro_app_role`;
CREATE TABLE `micro_app_role` (
  `app_role_id` int NOT NULL AUTO_INCREMENT,
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `app_id` int NOT NULL COMMENT '应用ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`app_role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应用角色关联表';

-- ----------------------------
-- Records of micro_app_role
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for micro_app_shortcut_menu
-- ----------------------------
DROP TABLE IF EXISTS `micro_app_shortcut_menu`;
CREATE TABLE `micro_app_shortcut_menu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `menu_name` varchar(50) NOT NULL COMMENT '菜单名称',
  `menu_icon` text NOT NULL COMMENT '菜单图标',
  `menu_url` text NOT NULL COMMENT '菜单路径',
  `menu_order` int NOT NULL DEFAULT '1' COMMENT '菜单排名',
  `create_user` varchar(20) NOT NULL COMMENT '创建人名称',
  `create_user_id` bigint NOT NULL COMMENT '创建人id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='小程序快捷菜单';

-- ----------------------------
-- Records of micro_app_shortcut_menu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for oauth_client_details
-- ----------------------------
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details` (
  `client_id` varchar(48) NOT NULL,
  `resource_ids` varchar(256) DEFAULT NULL,
  `client_secret` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `authorized_grant_types` varchar(256) DEFAULT NULL,
  `web_server_redirect_uri` varchar(256) DEFAULT NULL,
  `authorities` varchar(256) DEFAULT NULL,
  `access_token_validity` int DEFAULT NULL,
  `refresh_token_validity` int DEFAULT NULL,
  `additional_information` varchar(4096) DEFAULT NULL,
  `autoapprove` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`client_id`) USING BTREE
);

-- ----------------------------
-- Records of oauth_client_details
-- ----------------------------
BEGIN;
INSERT INTO `oauth_client_details` (`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`) VALUES ('admin', NULL, 'e10adc3949ba59abbe56e057f20f883e', 'all', 'password,refresh_token', '', NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for product_sub_category
-- ----------------------------
DROP TABLE IF EXISTS `product_sub_category`;
CREATE TABLE `product_sub_category` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `large_type` varchar(200) DEFAULT NULL COMMENT '产品大类名称',
  `small_type` varchar(200) DEFAULT NULL COMMENT '产品小类名称',
  `cpid` varchar(50) DEFAULT NULL COMMENT 'CPID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of product_sub_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_analysis_book
-- ----------------------------
DROP TABLE IF EXISTS `profile_analysis_book`;
CREATE TABLE `profile_analysis_book` (
  `id` int NOT NULL AUTO_INCREMENT,
  `event_type` tinyint NOT NULL COMMENT '事件类型(1-事件分析/2-留存分析/3-漏斗分析/4-分布分析)',
  `aly_name` varchar(100) NOT NULL COMMENT '分析名称',
  `aly_desc` varchar(1000) DEFAULT NULL COMMENT '分析说明',
  `content` longtext NOT NULL COMMENT 'json字符串',
  `share_status` tinyint NOT NULL COMMENT '共享状态(0-独享 1-共享)',
  `default_status` tinyint NOT NULL COMMENT '是否默认(0-否 1-是)',
  `create_user_id` bigint NOT NULL,
  `create_by` varchar(100) NOT NULL COMMENT '创建人',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_by` varchar(100) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户画像-行为分析-标签';

-- ----------------------------
-- Records of profile_analysis_book
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_event
-- ----------------------------
DROP TABLE IF EXISTS `profile_event`;
CREATE TABLE `profile_event` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(50) DEFAULT NULL COMMENT '事件名',
  `code` varchar(50) DEFAULT NULL COMMENT '事件code',
  `platform` varchar(50) DEFAULT NULL COMMENT '可埋点平台',
  `desc_message` varchar(50) DEFAULT NULL COMMENT '事件描述',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='事件表';

-- ----------------------------
-- Records of profile_event
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_event_prop_map
-- ----------------------------
DROP TABLE IF EXISTS `profile_event_prop_map`;
CREATE TABLE `profile_event_prop_map` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `event_id` bigint DEFAULT NULL COMMENT '事件ID',
  `prop_id` bigint DEFAULT NULL COMMENT '属性ID',
  `prop_position` varchar(255) DEFAULT NULL COMMENT '事件属性位置',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='事件属性关联表';

-- ----------------------------
-- Records of profile_event_prop_map
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_project
-- ----------------------------
DROP TABLE IF EXISTS `profile_project`;
CREATE TABLE `profile_project` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(50) DEFAULT NULL COMMENT '项目名',
  `proj_code` varchar(500) DEFAULT NULL COMMENT '项目编码',
  `ptype_code` varchar(500) DEFAULT NULL COMMENT '项目类型编码',
  `platform` varchar(50) DEFAULT NULL COMMENT '平台',
  `desc_message` varchar(50) DEFAULT NULL COMMENT '项目描述',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='项目表';

-- ----------------------------
-- Records of profile_project
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_project_event_map
-- ----------------------------
DROP TABLE IF EXISTS `profile_project_event_map`;
CREATE TABLE `profile_project_event_map` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `project_id` bigint DEFAULT NULL COMMENT '项目id',
  `event_id` bigint DEFAULT NULL COMMENT '事件id',
  `level` int DEFAULT NULL COMMENT '无等级 0  其他等级 1-5级',
  `sort` bigint DEFAULT NULL COMMENT '排序',
  `prop_id_json` json DEFAULT NULL COMMENT '属性ID_JSON',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='项目事件关联表';

-- ----------------------------
-- Records of profile_project_event_map
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profile_prop
-- ----------------------------
DROP TABLE IF EXISTS `profile_prop`;
CREATE TABLE `profile_prop` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(50) DEFAULT NULL COMMENT '属性名',
  `code` varchar(50) DEFAULT NULL COMMENT '属性code',
  `type` int DEFAULT NULL COMMENT '属性类别  事件属性1 用户属性0',
  `datatype` int DEFAULT NULL COMMENT '数据类型 0 数字\n1 字符串\n2 布尔\n3 时间\n',
  `is_preset` int DEFAULT NULL COMMENT '是否预置  0 否 1 是',
  `is_common` int DEFAULT NULL COMMENT '是否公共属性 0 否 1 是',
  `desc_message` varchar(50) DEFAULT NULL COMMENT '属性描述',
  `options` text COMMENT '属性可选值json',
  `distributions` text COMMENT '属性预置区间json',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `dic_table` varchar(50) DEFAULT NULL COMMENT '关联的字典表',
  `join_field` varchar(50) DEFAULT NULL COMMENT 'join的字段名称',
  `target_field` varchar(50) DEFAULT NULL COMMENT '要查询的字段名称',
  `order_field` varchar(255) DEFAULT NULL COMMENT '字典表的排序字段',
  `hidden_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否隐藏(1-是/0-否)',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='属性表';

-- ----------------------------
-- Records of profile_prop
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report
-- ----------------------------
DROP TABLE IF EXISTS `report`;
CREATE TABLE `report` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '分期报告的上级报告',
  `title` varchar(50) NOT NULL COMMENT '报表名称',
  `type` int DEFAULT '0' COMMENT '报表类型 0-月报1-周报 2-日报 3-年报 4-季报',
  `status` int DEFAULT '0' COMMENT '报表状态 0-下线 1-发布',
  `sort_order` int DEFAULT '0' COMMENT '显示次序',
  `is_deleted` int DEFAULT '0',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of report
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_config
-- ----------------------------
DROP TABLE IF EXISTS `report_config`;
CREATE TABLE `report_config` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `report_id` bigint DEFAULT NULL COMMENT '报表id',
  `report_name` varchar(50) DEFAULT NULL COMMENT '报表名称',
  `config_type` int DEFAULT NULL COMMENT '配置类型 1-列维度 2-行维度 3-指标',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_config_detail
-- ----------------------------
DROP TABLE IF EXISTS `report_config_detail`;
CREATE TABLE `report_config_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `report_config_id` int DEFAULT NULL COMMENT '配置id',
  `report_dimension_id` int DEFAULT NULL COMMENT '维度id',
  `sort_order` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_config_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_datasource
-- ----------------------------
DROP TABLE IF EXISTS `report_datasource`;
CREATE TABLE `report_datasource` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `ds_ip` varchar(50) DEFAULT NULL COMMENT 'ip地址',
  `ds_port` int DEFAULT NULL COMMENT '端口',
  `ds_db` varchar(50) DEFAULT NULL COMMENT '数据库名/SID',
  `url` varchar(300) DEFAULT NULL COMMENT '连接url',
  `pool_name` varchar(50) NOT NULL COMMENT '连接名称',
  `driver_class_name` varchar(50) DEFAULT NULL COMMENT 'driverClassName',
  `ds_user` varchar(50) DEFAULT NULL COMMENT '用户名',
  `ds_password` varchar(50) DEFAULT NULL COMMENT '密码',
  `ds_type` int DEFAULT NULL COMMENT '数据源类型 0-mysql 1-oracle 2-sqlserver 3-postgresql 4-clickhouse',
  `is_deleted` int DEFAULT '0',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `responsible_person_id` bigint DEFAULT NULL COMMENT '责任人ID',
  `responsible_person_name` varchar(50) DEFAULT NULL COMMENT '责任人姓名',
  `db_schema` varchar(255) DEFAULT NULL COMMENT '模式',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `is_edit` int DEFAULT '1' COMMENT '是否你能够编辑 0：不可以，1：可以',
  `custom_connect_properties` text,
  `jdbc_driver_jar_paths` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `pool_name` (`pool_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_datasource
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_datasource_perm
-- ----------------------------
DROP TABLE IF EXISTS `report_datasource_perm`;
CREATE TABLE `report_datasource_perm` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `datasource_id` bigint DEFAULT NULL COMMENT '数据源ID',
  `view_type` int DEFAULT NULL COMMENT '0 全部可见 1 部门可见',
  `dept_ids` varchar(500) DEFAULT NULL COMMENT '部门ids',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `datasource_id` (`datasource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据源权限设置表';

-- ----------------------------
-- Records of report_datasource_perm
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_datasource_permission
-- ----------------------------
DROP TABLE IF EXISTS `report_datasource_permission`;
CREATE TABLE `report_datasource_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `datasource_id` int NOT NULL COMMENT '数据源ID',
  `table_names` json NOT NULL COMMENT '数据表名JSON数组',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ds_id` (`datasource_id`,`data_perm_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据源权限组';

-- ----------------------------
-- Records of report_datasource_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_datasource_table_perm
-- ----------------------------
DROP TABLE IF EXISTS `report_datasource_table_perm`;
CREATE TABLE `report_datasource_table_perm` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `datasource_id` bigint DEFAULT NULL COMMENT '数据源Id',
  `dept_ids` varchar(200) DEFAULT NULL COMMENT '部门ids',
  `user_id` bigint DEFAULT NULL COMMENT '账号id',
  `table_view_type` int DEFAULT NULL COMMENT '0 全部可见 1 部门账号可见',
  `table_names` text COMMENT '数据源表名',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据表权限设置表';

-- ----------------------------
-- Records of report_datasource_table_perm
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_dimension
-- ----------------------------
DROP TABLE IF EXISTS `report_dimension`;
CREATE TABLE `report_dimension` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `dimension_comments` varchar(200) DEFAULT NULL COMMENT '维度名称',
  `dimension_name` varchar(50) DEFAULT NULL COMMENT '维度字段',
  `dimension_title` varchar(50) DEFAULT NULL COMMENT '显示名称',
  `table_view_name` varchar(50) DEFAULT NULL COMMENT '表视图名称',
  `sql_text` varchar(300) DEFAULT NULL COMMENT 'sql信息',
  `data` varchar(300) DEFAULT NULL COMMENT '附加信息',
  `dimension_type` int DEFAULT '0' COMMENT '0-维度 1-指标',
  `format_type` int DEFAULT NULL COMMENT '格式化类型',
  `datasource_id` int DEFAULT NULL COMMENT '数据源id',
  `having_text` varchar(200) DEFAULT NULL COMMENT 'having信息',
  `order_index` int DEFAULT '0' COMMENT '排序',
  `is_deleted` int DEFAULT '0' COMMENT '是否删除',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of report_dimension
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_index_category
-- ----------------------------
DROP TABLE IF EXISTS `report_index_category`;
CREATE TABLE `report_index_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 自增',
  `order_index` int DEFAULT '0' COMMENT '排序值，从小到大排',
  `category_name` varchar(50) NOT NULL COMMENT '指标分类名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_index_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_index_info
-- ----------------------------
DROP TABLE IF EXISTS `report_index_info`;
CREATE TABLE `report_index_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 自增',
  `category_id` int DEFAULT NULL COMMENT '分类id',
  `order_index` int DEFAULT '0' COMMENT '排序值，从小到大排',
  `table_name` varchar(50) DEFAULT NULL COMMENT '表名',
  `table_comment` varchar(50) DEFAULT NULL COMMENT '表注释',
  `data` text COMMENT '指标数据',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of report_index_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_role
-- ----------------------------
DROP TABLE IF EXISTS `report_role`;
CREATE TABLE `report_role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `report_id` int NOT NULL DEFAULT '0' COMMENT '报表id',
  `role_id` bigint DEFAULT NULL COMMENT '角色id',
  `type` int DEFAULT '0' COMMENT '权限类型 1-查看 2-编辑',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_role
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_table_category
-- ----------------------------
DROP TABLE IF EXISTS `report_table_category`;
CREATE TABLE `report_table_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 自增',
  `order_index` int DEFAULT '0' COMMENT '排序值，从小到大排',
  `datasource_id` int DEFAULT '0' COMMENT '数据源id',
  `category_name` varchar(50) NOT NULL COMMENT '指标分类名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_table_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_table_category_relation
-- ----------------------------
DROP TABLE IF EXISTS `report_table_category_relation`;
CREATE TABLE `report_table_category_relation` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 自增',
  `order_index` int NOT NULL DEFAULT '0' COMMENT '排序值，从小到大排',
  `category_id` int NOT NULL DEFAULT '0' COMMENT '分类id',
  `table_view_name` varchar(50) NOT NULL COMMENT '视图表名称',
  `table_comments` varchar(50) NOT NULL COMMENT '表中文名',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of report_table_category_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for reset_serialnumber
-- ----------------------------
DROP TABLE IF EXISTS `reset_serialnumber`;
CREATE TABLE `reset_serialnumber` (
  `id` int NOT NULL,
  `model_id` varchar(50) NOT NULL COMMENT '模型 id',
  `reset_cycle` int NOT NULL COMMENT '重置周期 0 不重置 1年2月3日4分\n',
  `start_value` bigint NOT NULL COMMENT '从几开始',
  `count` bigint NOT NULL DEFAULT '0' COMMENT '当前计数',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='流水号记录表';

-- ----------------------------
-- Records of reset_serialnumber
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_backup_record
-- ----------------------------
DROP TABLE IF EXISTS `sql_backup_record`;
CREATE TABLE `sql_backup_record` (
  `id` int NOT NULL AUTO_INCREMENT,
  `file_name` varchar(50) NOT NULL COMMENT '文件名称',
  `file_path` varchar(100) NOT NULL COMMENT '文件备份位置',
  `file_size` bigint DEFAULT NULL COMMENT '文件大小',
  `backup_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '备份时间',
  `data_source` int NOT NULL DEFAULT '0' COMMENT '文件来源',
  `remarks` varchar(500) DEFAULT '手动备份' COMMENT '备注',
  `tenant_id` varchar(10) DEFAULT NULL COMMENT '租户id',
  `restore_status` int DEFAULT '0' COMMENT '恢复状态',
  `restore_time` datetime DEFAULT NULL COMMENT '恢复时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='sql备份上传记录表';

-- ----------------------------
-- Records of sql_backup_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_job
-- ----------------------------
DROP TABLE IF EXISTS `sql_job`;
CREATE TABLE `sql_job` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `category_id` int NOT NULL COMMENT '分类ID',
  `job_name` varchar(100) NOT NULL COMMENT '任务名称',
  `job_desc` varchar(500) DEFAULT NULL COMMENT '任务描述',
  `job_status` tinyint NOT NULL COMMENT '上线状态',
  `trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '调度状态',
  `job_cron` varchar(100) DEFAULT NULL COMMENT 'xxljob的任务Cron',
  `xxl_job_id` int DEFAULT NULL COMMENT 'xxljob的任务ID',
  `ds_id` int NOT NULL COMMENT '数据源ID',
  `ds_type` tinyint DEFAULT NULL COMMENT '数据源类型',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '公开状态(0-不公开/1-公开)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_user_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL任务';

-- ----------------------------
-- Records of sql_job
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_job_category
-- ----------------------------
DROP TABLE IF EXISTS `sql_job_category`;
CREATE TABLE `sql_job_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `cate_name` varchar(50) NOT NULL COMMENT '分类名称',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL任务分类';

-- ----------------------------
-- Records of sql_job_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_job_instance
-- ----------------------------
DROP TABLE IF EXISTS `sql_job_instance`;
CREATE TABLE `sql_job_instance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `job_id` int NOT NULL COMMENT '任务ID',
  `job_script_id` int NOT NULL COMMENT '任务脚本ID',
  `start_time` datetime DEFAULT NULL COMMENT '作业开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '作业结束时间',
  `instance_run_type` tinyint NOT NULL COMMENT '作业运行类型(手动 自动)',
  `instance_status` tinyint NOT NULL COMMENT '作业状态',
  `err_msg` longtext COMMENT '错误描述',
  `create_time` datetime NOT NULL COMMENT '任务创建时间',
  `job_script_sort_num` int NOT NULL DEFAULT '0' COMMENT '任务脚本执行顺序号',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `instance_status` (`instance_status`),
  KEY `job_id` (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL任务实例';

-- ----------------------------
-- Records of sql_job_instance
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_job_permission
-- ----------------------------
DROP TABLE IF EXISTS `sql_job_permission`;
CREATE TABLE `sql_job_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `job_id` int NOT NULL COMMENT '任务ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL任务权限组';

-- ----------------------------
-- Records of sql_job_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sql_job_script
-- ----------------------------
DROP TABLE IF EXISTS `sql_job_script`;
CREATE TABLE `sql_job_script` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `job_id` int NOT NULL COMMENT '任务ID',
  `sql_script` text NOT NULL COMMENT 'SQL脚本内容',
  `sql_script_name` varchar(200) DEFAULT NULL COMMENT 'SQL脚本名称',
  `sql_script_comment` varchar(500) DEFAULT NULL COMMENT 'SQL脚本注释说明',
  `sql_script_type` tinyint DEFAULT NULL COMMENT 'SQL脚本类型',
  `sql_sort_num` int NOT NULL COMMENT 'SQL脚本执行顺序',
  `create_time` datetime NOT NULL COMMENT '任务创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `job_id` (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='SQL任务脚本';

-- ----------------------------
-- Records of sql_job_script
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_package
-- ----------------------------
DROP TABLE IF EXISTS `sys_package`;
CREATE TABLE `sys_package` (
  `id` int NOT NULL AUTO_INCREMENT,
  `package_name` varchar(100) NOT NULL COMMENT '套餐名称',
  `remark` varchar(500) DEFAULT NULL COMMENT '套餐说明',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='套餐表';

-- ----------------------------
-- Records of sys_package
-- ----------------------------
BEGIN;
INSERT INTO `sys_package` (`id`, `package_name`, `remark`, `create_time`, `sort_num`, `is_deleted`) VALUES (1, '默认套餐', '', '2024-03-07 00:57:03', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_package_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_package_menu`;
CREATE TABLE `sys_package_menu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `package_id` int NOT NULL COMMENT '套餐ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`),
  KEY `package_id` (`package_id`,`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='套餐菜单关联表';

-- ----------------------------
-- Records of sys_package_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (1, 1, 1123598815738675203);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (2, 1, 1123598815738675204);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (9, 1, 1123598815738675205);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (14, 1, 1123598815738675207);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (19, 1, 1123598815738675209);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (27, 1, 1123598815738675213);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (28, 1, 1123598815738675214);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (30, 1, 1123598815738675215);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (32, 1, 1123598815738675216);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (3, 1, 1123598815738675223);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (4, 1, 1123598815738675224);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (5, 1, 1123598815738675225);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (6, 1, 1123598815738675226);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (7, 1, 1123598815738675227);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (8, 1, 1123598815738675228);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (10, 1, 1123598815738675229);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (11, 1, 1123598815738675230);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (12, 1, 1123598815738675231);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (13, 1, 1123598815738675232);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (15, 1, 1123598815738675237);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (16, 1, 1123598815738675238);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (17, 1, 1123598815738675239);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (18, 1, 1123598815738675240);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (36, 1, 1123598815738675241);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (37, 1, 1123598815738675242);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (38, 1, 1123598815738675243);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (39, 1, 1123598815738675244);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (29, 1, 1123598815738675249);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (31, 1, 1123598815738675250);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (33, 1, 1123598815738675251);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (34, 1, 1123598815738675307);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (35, 1, 1123598815738675308);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (57, 1, 1161272593873321991);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (58, 1, 1161272593873321992);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (59, 1, 1161272593873321993);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (60, 1, 1161272593873321994);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (61, 1, 1161272593873321995);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (20, 1, 1164733389658962251);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (21, 1, 1164733389658962252);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (22, 1, 1164733389658962253);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (23, 1, 1164733389658962254);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (24, 1, 1164733389658962255);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (25, 1, 1164733389658962256);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (41, 1, 1164733389668962251);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (42, 1, 1164733389668962252);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (43, 1, 1164733389668962253);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (44, 1, 1164733389668962254);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (45, 1, 1164733389668962255);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (62, 1, 1367669015094308865);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (63, 1, 1467678087986257921);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (77, 1, 1467681760623697921);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (78, 1, 1501471635629920258);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (50, 1, 1506104732795191298);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (51, 1, 1506105715373817857);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (52, 1, 1506105897238839297);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (40, 1, 1544607807797161986);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (64, 1, 1554418372912480258);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (65, 1, 1557612821155127297);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (46, 1, 1582611460944187394);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (53, 1, 1584570735518212097);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (79, 1, 1584973052717547522);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (80, 1, 1585953641910206466);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (81, 1, 1585953975894245377);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (83, 1, 1587363154609532930);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (26, 1, 1589512651703767042);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (82, 1, 1597077352725745666);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (54, 1, 1600405207606059010);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (84, 1, 1607568290728321026);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (55, 1, 1607615579387797505);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (87, 1, 1619156606935465985);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (76, 1, 1619159462254051330);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (85, 1, 1619214858069966849);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (86, 1, 1619215151222456321);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (66, 1, 1619215847942488065);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (56, 1, 1624402915081576449);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (69, 1, 1627854531784859649);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (47, 1, 1630116849440702466);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (48, 1, 1630117165196296193);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (49, 1, 1642125129009422337);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (67, 1, 1689465690065170434);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (68, 1, 1689466226315325441);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (70, 1, 1714193048967127041);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (71, 1, 1714193193972604929);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (72, 1, 1714193309215301633);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (73, 1, 1734067670720049153);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (74, 1, 1734067994608398338);
INSERT INTO `sys_package_menu` (`id`, `package_id`, `menu_id`) VALUES (75, 1, 1734068192759902209);
COMMIT;

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant`;
CREATE TABLE `sys_tenant` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `tenant_name` varchar(50) NOT NULL COMMENT '租户名称',
  `domain` varchar(255) DEFAULT NULL COMMENT '域名地址',
  `background_url` varchar(1000) DEFAULT NULL COMMENT '系统背景',
  `linkman` varchar(20) DEFAULT NULL COMMENT '联系人',
  `contact_number` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `address` varchar(255) DEFAULT NULL COMMENT '联系地址',
  `account_number` int DEFAULT '-1' COMMENT '账号额度',
  `expire_time` datetime DEFAULT NULL COMMENT '过期时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int DEFAULT NULL COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `client_manager` varchar(100) DEFAULT NULL COMMENT '客户经理',
  `package_id` varchar(1000) DEFAULT NULL COMMENT '套餐ID',
  `admin_id` bigint NOT NULL COMMENT '管理员id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1764966777935187970 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='租户信息表';

-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
BEGIN;
INSERT INTO `sys_tenant` (`id`, `tenant_id`, `tenant_name`, `domain`, `background_url`, `linkman`, `contact_number`, `address`, `account_number`, `expire_time`, `create_user`, `create_dept`, `create_time`, `update_user`, `update_time`, `status`, `is_deleted`, `client_manager`, `package_id`, `admin_id`) VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, '2024-07-06 00:00:00', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2023-07-20 14:12:33', 1, 0, 'admin', '2', 1123598821738675201);
COMMIT;

-- ----------------------------
-- Table structure for sys_tenant_package
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant_package`;
CREATE TABLE `sys_tenant_package` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(12) NOT NULL COMMENT '租户ID',
  `package_id` int NOT NULL COMMENT '套餐ID',
  PRIMARY KEY (`id`),
  KEY `package_id` (`package_id`,`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='租户套餐关联表';

-- ----------------------------
-- Records of sys_tenant_package
-- ----------------------------
BEGIN;
INSERT INTO `sys_tenant_package` (`id`, `tenant_id`, `package_id`) VALUES (1, '000000', 1);
COMMIT;

-- ----------------------------
-- Table structure for tag_record
-- ----------------------------
DROP TABLE IF EXISTS `tag_record`;
CREATE TABLE `tag_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `remote_name` varchar(50) DEFAULT NULL COMMENT '操作人姓名',
  `remote_account` varchar(50) DEFAULT NULL COMMENT '操作账号',
  `tag_user_id` bigint DEFAULT NULL COMMENT '标识账号id',
  `remark` varchar(50) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tag_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for third_bind_count_record
-- ----------------------------
DROP TABLE IF EXISTS `third_bind_count_record`;
CREATE TABLE `third_bind_count_record` (
  `id` int NOT NULL AUTO_INCREMENT,
  `wechat_open_id` varchar(64) DEFAULT NULL COMMENT '微信openId',
  `qy_wechat_code` varchar(64) DEFAULT NULL COMMENT '企业微信code',
  `ding_open_id` varchar(64) DEFAULT NULL COMMENT '钉钉openId',
  `fei_shu_open_id` varchar(64) DEFAULT NULL COMMENT '飞书openId',
  `micro_app_openId` varchar(64) DEFAULT NULL COMMENT '小程序openId',
  `micro_app_unionid` varchar(64) DEFAULT NULL COMMENT '小程序unionid',
  `micro_app_phone` varchar(11) DEFAULT NULL COMMENT '小程序绑定的手机号',
  `user_id` bigint NOT NULL COMMENT '绑定人员id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户 id',
  `public_account_open_id` varchar(50) DEFAULT NULL COMMENT '公众号openid',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='三方登录绑定账号记录表';

-- ----------------------------
-- Records of third_bind_count_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for third_login_conf
-- ----------------------------
DROP TABLE IF EXISTS `third_login_conf`;
CREATE TABLE `third_login_conf` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(20) DEFAULT NULL COMMENT '租户id',
  `login_conf` text NOT NULL COMMENT '登录配置',
  `login_type` varchar(20) NOT NULL COMMENT '三方登录类型',
  `status` int NOT NULL DEFAULT '1' COMMENT '配置是否可用(0：不可用，1: 可用)',
  `create_user` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `name` varchar(50) DEFAULT NULL COMMENT '配置名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='三方登录配置表';

-- ----------------------------
-- Records of third_login_conf
-- ----------------------------
BEGIN;
INSERT INTO `third_login_conf` (`id`, `tenant_id`, `login_conf`, `login_type`, `status`, `create_user`, `create_user_id`, `create_time`, `update_time`, `name`) VALUES (5, '111111', '{\"clientId\":\"公众号 key\",\"clientSecret\":\" 公众号 Secret\"}', 'publicAccount', 1, '管理员', 1123598821738675201, '2023-07-18 16:32:31', '2023-09-15 15:01:00', 'BI公众号');
INSERT INTO `third_login_conf` (`id`, `tenant_id`, `login_conf`, `login_type`, `status`, `create_user`, `create_user_id`, `create_time`, `update_time`, `name`) VALUES (8, '111111', '{\"apiKey\":\"apiKey\",\"secretKey\":\"secretKey\",\"accUrl\":\"accUrl\",\"groupId\":\"groupId\"}', 'face', 1, '管理员', 1123598821738675201, '2023-08-04 15:59:34', '2023-09-15 15:01:26', '百度人脸识别配置');
COMMIT;

-- ----------------------------
-- Table structure for upgrade_project
-- ----------------------------
DROP TABLE IF EXISTS `upgrade_project`;
CREATE TABLE `upgrade_project` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_model` varchar(20) DEFAULT NULL COMMENT '后端项目模块（gmetry-xxljob/gmetry-bi/gmetry-system/gmetry-lowcode/gmetry-pdf）',
  `project_type` int NOT NULL COMMENT '项目类型（0：前端，1：后端）',
  `env_name` varchar(20) DEFAULT NULL COMMENT '.env文件需要修改的模块名称（bi_version/pdf_version/xxljob_version/system_version/lowcode_version）',
  `project_version` varchar(20) DEFAULT NULL COMMENT '项目版本号，修改.env文件需要用到',
  `upgrade_log` text NOT NULL COMMENT '升级日志',
  `result_msg` text COMMENT '部署服务器返回的信息',
  `upgrade_result` int NOT NULL DEFAULT '0' COMMENT '升级结果 0：成功，1：失败',
  `operation_user_id` bigint NOT NULL COMMENT '操作人员id',
  `operation_user_name` varchar(50) DEFAULT NULL COMMENT '操作人员名称',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `old_version` varchar(20) DEFAULT NULL COMMENT '项目旧的版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='项目升级日志记录';

-- ----------------------------
-- Records of upgrade_project
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for upgrade_project_sql
-- ----------------------------
DROP TABLE IF EXISTS `upgrade_project_sql`;
CREATE TABLE `upgrade_project_sql` (
  `id` int NOT NULL AUTO_INCREMENT,
  `database_name` varchar(20) DEFAULT NULL COMMENT '修改的数据库名称',
  `upgrade_log` text NOT NULL COMMENT '升级日志',
  `result_msg` text COMMENT '部署服务器返回的信息',
  `upgrade_result` int NOT NULL DEFAULT '0' COMMENT '升级结果 1：成功，0：失败',
  `operation_user_id` bigint NOT NULL COMMENT '操作人员id',
  `operation_user_name` varchar(50) DEFAULT NULL COMMENT '操作人员名称',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='mysql修改日志记录';

-- ----------------------------
-- Records of upgrade_project_sql
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_click_menu_record
-- ----------------------------
DROP TABLE IF EXISTS `user_click_menu_record`;
CREATE TABLE `user_click_menu_record` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `menu_id` bigint NOT NULL COMMENT '菜单id',
  `click_num` int NOT NULL DEFAULT '1' COMMENT '菜单点击量',
  `click_user_id` bigint DEFAULT '0' COMMENT '菜单点击人',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`),
  KEY `click_user_id` (`click_user_id`) USING BTREE,
  KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='人员点击菜单记录表';

-- ----------------------------
-- Records of user_click_menu_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_classify
-- ----------------------------
DROP TABLE IF EXISTS `visual_classify`;
CREATE TABLE `visual_classify` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父分类id',
  `classify_type` int DEFAULT NULL COMMENT '分类类型 1 pc端 2 移动端',
  `category_key` varchar(500) DEFAULT NULL COMMENT '分类键值',
  `category_value` varchar(64) DEFAULT NULL COMMENT '分类名称',
  `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否已删除',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序',
  `create_user_id` bigint NOT NULL DEFAULT '0' COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='大屏分类表';

-- ----------------------------
-- Records of visual_classify
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_classify_favourite
-- ----------------------------
DROP TABLE IF EXISTS `visual_classify_favourite`;
CREATE TABLE `visual_classify_favourite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `classify_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='我的收藏-分类表';

-- ----------------------------
-- Records of visual_classify_favourite
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_component
-- ----------------------------
DROP TABLE IF EXISTS `visual_component`;
CREATE TABLE `visual_component` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '组件名称',
  `title` varchar(255) DEFAULT NULL COMMENT '图层名称',
  `visual_id` int DEFAULT NULL COMMENT '可视化主键ID',
  `datasource_id` int DEFAULT '0' COMMENT '数据源ID',
  `cube_data_id` int DEFAULT NULL COMMENT '数据集ID',
  `content` longtext COMMENT '组件内容JSON',
  `filter_json` text COMMENT '查询条件JSON',
  `filter_relation_json` text COMMENT '查询条件关系JSON',
  `column_json` longtext COMMENT '字段JSON',
  `sort_json` text COMMENT '排序JSON',
  `ext_json` longtext COMMENT '额外JSON',
  `query_sql` text COMMENT '组装好的查询SQL',
  `column_id_list` json DEFAULT NULL COMMENT '字段ID列表JSON',
  `limit_val` int DEFAULT '0' COMMENT '显示条数',
  `use_type` tinyint DEFAULT '0' COMMENT '使用方式',
  `comp_type` tinyint NOT NULL DEFAULT '0' COMMENT '组件类型',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `is_mobile` int NOT NULL DEFAULT '0' COMMENT '是否为移动大屏组件',
  `static_data_path` varchar(255) DEFAULT NULL COMMENT '静态数据地址',
  `whether_static` tinyint DEFAULT '0' COMMENT '是否是静态，默认0不是',
  `component_source` int DEFAULT NULL COMMENT '组件来源 0是系统组件 1是超管自定义组件',
  `component_source_id` int DEFAULT NULL COMMENT '组件来源id',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='大屏_组件表';

-- ----------------------------
-- Records of visual_component
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_component_define
-- ----------------------------
DROP TABLE IF EXISTS `visual_component_define`;
CREATE TABLE `visual_component_define` (
  `id` int NOT NULL AUTO_INCREMENT,
  `component_name` varchar(100) NOT NULL COMMENT '组件名称',
  `image_url` varchar(100) DEFAULT NULL COMMENT '组件图标',
  `description` varchar(500) DEFAULT NULL COMMENT '组件描述',
  `component_version` varchar(50) DEFAULT NULL COMMENT '组件版本号',
  `code_text` text COMMENT '代码内容',
  `publish_status` tinyint NOT NULL DEFAULT '0' COMMENT '是否发布(0-否[默认]/1-是)',
  `view_scope_status` tinyint NOT NULL DEFAULT '0' COMMENT '可视范围状态(0-个人[默认]/1-公开)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义组件';

-- ----------------------------
-- Records of visual_component_define
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_component_export
-- ----------------------------
DROP TABLE IF EXISTS `visual_component_export`;
CREATE TABLE `visual_component_export` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `visual_id` int NOT NULL COMMENT '大屏ID',
  `component_id` int NOT NULL COMMENT '组件ID',
  `visual_name` varchar(255) DEFAULT NULL COMMENT '大屏名称',
  `visual_category_id` int DEFAULT NULL COMMENT '大屏分类ID',
  `component_name` varchar(255) DEFAULT NULL COMMENT '组件名称',
  `operator` varchar(255) DEFAULT NULL COMMENT '操作员',
  `operator_id` bigint DEFAULT NULL COMMENT '操作员ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `export_status` tinyint NOT NULL DEFAULT '0' COMMENT '任务状态（0-进行中；1-成功；2-失败）',
  `file_name` varchar(300) DEFAULT NULL COMMENT '文件名',
  `ext` text COMMENT '扩展字段，比如存储错误信息',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='清单组件数据导出任务';

-- ----------------------------
-- Records of visual_component_export
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_component_history_record
-- ----------------------------
DROP TABLE IF EXISTS `visual_component_history_record`;
CREATE TABLE `visual_component_history_record` (
  `id` int NOT NULL AUTO_INCREMENT,
  `visual_id` int DEFAULT NULL COMMENT '大屏id',
  `setting_info` text NOT NULL COMMENT '查询条件',
  `setting_info_md5` varchar(32) DEFAULT NULL COMMENT '查询条件MD5加密',
  `component_key` varchar(64) DEFAULT NULL COMMENT '组件key',
  `operation_user_id` bigint NOT NULL COMMENT '操作人员id',
  `operation_user_name` varchar(50) DEFAULT NULL COMMENT '操作人员名称',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='组件查询历史记录表';

-- ----------------------------
-- Records of visual_component_history_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_data
-- ----------------------------
DROP TABLE IF EXISTS `visual_data`;
CREATE TABLE `visual_data` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) DEFAULT NULL COMMENT '大屏标题',
  `background_url` longtext COMMENT '大屏背景',
  `category` int DEFAULT NULL COMMENT '大屏类型',
  `history_report_id` int DEFAULT NULL COMMENT '历史报告id',
  `password` varchar(255) DEFAULT NULL COMMENT '发布密码',
  `user_str` varchar(255) DEFAULT NULL COMMENT '用户ID组',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `status` int DEFAULT '1' COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `order_index` int DEFAULT NULL COMMENT '排序值 从小到大排序',
  `content` longtext COMMENT '组件内容JSON',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '大屏公开状态',
  `visual_type` tinyint NOT NULL DEFAULT '0' COMMENT '大屏类型(0-普通大屏/1-我的收藏/2-我的报告)',
  `ref_visual_id` int DEFAULT NULL COMMENT '复制大屏ID',
  `power_point_id` int DEFAULT NULL COMMENT '幻灯片ID',
  `visual_data_type` int NOT NULL DEFAULT '0' COMMENT '是否为自主报表 1：是，0：否',
  `is_mobile` int NOT NULL DEFAULT '0' COMMENT '是否为移动大屏(0:否，1:是)',
  `mobile_content` longtext COMMENT '移动组件json内容',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `is_edit` int DEFAULT '1' COMMENT '是否可以被编辑 0：不可以，1：可以',
  `disable_reason` varchar(255) DEFAULT '1' COMMENT '禁用原因',
  `review_status` int DEFAULT '1' COMMENT '审核状态（0未审核，1审核通过2审核未通过）',
  `template_id` int DEFAULT NULL COMMENT '模板id',
  PRIMARY KEY (`id`),
  KEY `category` (`category`,`order_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of visual_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_data_permission
-- ----------------------------
DROP TABLE IF EXISTS `visual_data_permission`;
CREATE TABLE `visual_data_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `visual_classify_id` int DEFAULT NULL COMMENT '大屏分类ID',
  `visual_id` int NOT NULL COMMENT '大屏ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据大屏权限组';

-- ----------------------------
-- Records of visual_data_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_data_template
-- ----------------------------
DROP TABLE IF EXISTS `visual_data_template`;
CREATE TABLE `visual_data_template` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模板名字',
  `category` int DEFAULT NULL COMMENT '模板分类',
  `mcp_category` int DEFAULT NULL COMMENT '中台模板分类',
  `review_status` int DEFAULT '0' COMMENT '0未发起审核，1审核中，2审核通过 3审核未通过',
  `status` int DEFAULT '0' COMMENT '状态',
  `order_index` int DEFAULT NULL COMMENT '排序值 从小到大排序',
  `visual_id` int DEFAULT NULL COMMENT '大屏ID',
  `disable_reason` varchar(500) DEFAULT NULL COMMENT '禁用原因',
  `preview_img_url` varchar(255) DEFAULT NULL COMMENT '大屏预览图片地址',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `tenant_id` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户id',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_visual_id` (`visual_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='大屏模板表';

-- ----------------------------
-- Records of visual_data_template
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_data_template_category
-- ----------------------------
DROP TABLE IF EXISTS `visual_data_template_category`;
CREATE TABLE `visual_data_template_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分类名字',
  `parent_id` int DEFAULT '0' COMMENT 'parent_id',
  `order_index` int DEFAULT NULL COMMENT '排序值 从小到大排序',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `tenant_id` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户id',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='大屏模板分类表';

-- ----------------------------
-- Records of visual_data_template_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_enum
-- ----------------------------
DROP TABLE IF EXISTS `visual_enum`;
CREATE TABLE `visual_enum` (
  `id` int NOT NULL AUTO_INCREMENT,
  `key_code` varchar(20) NOT NULL COMMENT '唯一Key值',
  `content` text NOT NULL COMMENT '数据JSON',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `user_id` bigint NOT NULL COMMENT '创建人ID',
  `user_name` varchar(30) DEFAULT NULL COMMENT '创建人姓名',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户 id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `key_code` (`key_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='大屏自定义枚举';

-- ----------------------------
-- Records of visual_enum
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_external_link_info
-- ----------------------------
DROP TABLE IF EXISTS `visual_external_link_info`;
CREATE TABLE `visual_external_link_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `path` varchar(50) DEFAULT NULL COMMENT '文件访问路径',
  `upload_user` varchar(20) DEFAULT NULL COMMENT '文件上传人姓名',
  `upload_user_id` varchar(20) DEFAULT NULL COMMENT '文件上传人id',
  `status` tinyint DEFAULT '1' COMMENT '文件是否可用，0：不可用，1：可用',
  `trend_id` varchar(20) DEFAULT NULL COMMENT '租户id',
  `upload_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '文件上传时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义iframe记录表';

-- ----------------------------
-- Records of visual_external_link_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_global_param_type
-- ----------------------------
DROP TABLE IF EXISTS `visual_global_param_type`;
CREATE TABLE `visual_global_param_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL COMMENT '父级ID',
  `type_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据集全局筛选器参数-分类表';

-- ----------------------------
-- Records of visual_global_param_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_login_free_link
-- ----------------------------
DROP TABLE IF EXISTS `visual_login_free_link`;
CREATE TABLE `visual_login_free_link` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `visual_data_id` int DEFAULT NULL COMMENT '大屏id',
  `visual_data_title` varchar(100) DEFAULT NULL COMMENT '大屏名称',
  `link_type` int DEFAULT NULL COMMENT '链接类型：0免登录 1账号匹配',
  `user_id` bigint DEFAULT NULL COMMENT '账号id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '账号名称',
  `valid_date` date DEFAULT NULL COMMENT '有效期',
  `purpose` longtext COMMENT '用途',
  `is_verify` int DEFAULT NULL COMMENT '是否验证用户有效性：0是 1否',
  `short_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `real_url` varchar(255) DEFAULT NULL COMMENT '真实链接',
  `status` int DEFAULT NULL COMMENT '状态：0下线  1上线',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(100) DEFAULT NULL COMMENT '修改人',
  `update_user_id` bigint DEFAULT NULL COMMENT '修改人id',
  `user_token` varchar(100) DEFAULT NULL COMMENT '三方系统token',
  `access_token` text COMMENT '本系统token',
  `public_status` int DEFAULT '0' COMMENT '是否公共可见 1：是，0：否',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `pass` varchar(100) DEFAULT NULL COMMENT '验证密码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='免登录链接';

-- ----------------------------
-- Records of visual_login_free_link
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_login_free_link_permission
-- ----------------------------
DROP TABLE IF EXISTS `visual_login_free_link_permission`;
CREATE TABLE `visual_login_free_link_permission` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `link_id` int NOT NULL COMMENT '三方接入web的id',
  `data_perm_id` int DEFAULT NULL COMMENT '权限组id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of visual_login_free_link_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_power_classify_archiving
-- ----------------------------
DROP TABLE IF EXISTS `visual_power_classify_archiving`;
CREATE TABLE `visual_power_classify_archiving` (
  `id` int NOT NULL AUTO_INCREMENT,
  `classify_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='我的归档-分类表';

-- ----------------------------
-- Records of visual_power_classify_archiving
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_power_classify_favourite
-- ----------------------------
DROP TABLE IF EXISTS `visual_power_classify_favourite`;
CREATE TABLE `visual_power_classify_favourite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `classify_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='我的收藏-幻灯片分类表';

-- ----------------------------
-- Records of visual_power_classify_favourite
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_power_point_category
-- ----------------------------
DROP TABLE IF EXISTS `visual_power_point_category`;
CREATE TABLE `visual_power_point_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `cate_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='幻灯片分类';

-- ----------------------------
-- Records of visual_power_point_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_power_point_info
-- ----------------------------
DROP TABLE IF EXISTS `visual_power_point_info`;
CREATE TABLE `visual_power_point_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cate_id` int NOT NULL COMMENT '分类ID',
  `pp_name` varchar(100) NOT NULL COMMENT '幻灯片名称',
  `pp_month` varchar(100) DEFAULT NULL COMMENT '幻灯片月份',
  `settings` varchar(1000) DEFAULT NULL COMMENT '幻灯片设置',
  `visual_ids` text COMMENT '大屏ID列表，逗号分隔',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_by` varchar(100) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `public_status` int NOT NULL DEFAULT '0',
  `visual_type` tinyint NOT NULL DEFAULT '0' COMMENT '幻灯片类型(0-普通幻灯片/1-我的收藏/2-归档)',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `ref_power_id` int DEFAULT NULL COMMENT '被备份的幻灯片id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='幻灯片信息';

-- ----------------------------
-- Records of visual_power_point_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_power_point_permission
-- ----------------------------
DROP TABLE IF EXISTS `visual_power_point_permission`;
CREATE TABLE `visual_power_point_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pp_id` int NOT NULL COMMENT '幻灯片ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='幻灯片权限组表';

-- ----------------------------
-- Records of visual_power_point_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_report_category_favourite
-- ----------------------------
DROP TABLE IF EXISTS `visual_report_category_favourite`;
CREATE TABLE `visual_report_category_favourite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) NOT NULL COMMENT '分类名称',
  `sort_num` int DEFAULT '0' COMMENT '排序号',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='我的收藏-自主报表分类';

-- ----------------------------
-- Records of visual_report_category_favourite
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_report_folder
-- ----------------------------
DROP TABLE IF EXISTS `visual_report_folder`;
CREATE TABLE `visual_report_folder` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `sort_order` int NOT NULL DEFAULT '0' COMMENT '显示排序',
  `folder_name` varchar(50) NOT NULL COMMENT '文件夹名称',
  `user_id` bigint NOT NULL DEFAULT '0' COMMENT '用户id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='我的报告目录';

-- ----------------------------
-- Records of visual_report_folder
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_report_info
-- ----------------------------
DROP TABLE IF EXISTS `visual_report_info`;
CREATE TABLE `visual_report_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `folder_id` int NOT NULL COMMENT '文件夹id',
  `report_month` varchar(50) DEFAULT NULL COMMENT '月份',
  `report_title` varchar(50) DEFAULT NULL COMMENT '报告名称',
  `background_url` varchar(300) DEFAULT NULL COMMENT '背景图url',
  `sort_order` int DEFAULT '0' COMMENT '显示排序',
  `is_deleted` int DEFAULT '0',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='我的报告';

-- ----------------------------
-- Records of visual_report_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_review_log
-- ----------------------------
DROP TABLE IF EXISTS `visual_review_log`;
CREATE TABLE `visual_review_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `relation_id` int DEFAULT NULL COMMENT '关联id',
  `type` int DEFAULT NULL COMMENT '类型 0大屏模板/1大屏',
  `review_status` int DEFAULT NULL COMMENT '审核状态(0发起审核，1审核通过，2审核驳回)',
  `review_reason` varchar(500) DEFAULT NULL COMMENT '审核理由',
  `Initiate_reason` varchar(500) DEFAULT NULL COMMENT '理由',
  `review_time` datetime DEFAULT NULL COMMENT '审核时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人',
  `review_user_id` bigint DEFAULT NULL COMMENT '审核人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='审核记录';

-- ----------------------------
-- Records of visual_review_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_self_report_category
-- ----------------------------
DROP TABLE IF EXISTS `visual_self_report_category`;
CREATE TABLE `visual_self_report_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父分类id',
  `classify_type` int DEFAULT NULL COMMENT '分类类型 1 pc端 2 移动端',
  `category_key` varchar(500) DEFAULT NULL COMMENT '分类键值',
  `category_value` varchar(64) DEFAULT NULL COMMENT '分类名称',
  `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否已删除',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序',
  `create_user_id` bigint NOT NULL DEFAULT '0' COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自主报表分类表';

-- ----------------------------
-- Records of visual_self_report_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_self_report_permission
-- ----------------------------
DROP TABLE IF EXISTS `visual_self_report_permission`;
CREATE TABLE `visual_self_report_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `self_report_id` int NOT NULL COMMENT '报表ID',
  `data_perm_id` int NOT NULL COMMENT '权限组ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(50) NOT NULL COMMENT '创建人',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自主报表权限组';

-- ----------------------------
-- Records of visual_self_report_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_short_code_generator
-- ----------------------------
DROP TABLE IF EXISTS `visual_short_code_generator`;
CREATE TABLE `visual_short_code_generator` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `code_num` bigint DEFAULT NULL COMMENT 'code码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of visual_short_code_generator
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_subscribe
-- ----------------------------
DROP TABLE IF EXISTS `visual_subscribe`;
CREATE TABLE `visual_subscribe` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sub_title` varchar(100) NOT NULL COMMENT '订阅名称/标题',
  `data_type` tinyint NOT NULL COMMENT '订阅内容类型',
  `data_id` int NOT NULL COMMENT '订阅内容ID',
  `trigger_period` tinyint NOT NULL COMMENT '触发周期',
  `trigger_week_value` tinyint DEFAULT NULL COMMENT '触发周几',
  `trigger_day_value` tinyint DEFAULT NULL COMMENT '触发哪一天',
  `trigger_hour` tinyint NOT NULL DEFAULT '0' COMMENT '触发时间小时数',
  `trigger_minute` tinyint NOT NULL DEFAULT '0' COMMENT '触发时间分钟数',
  `job_id` int DEFAULT NULL COMMENT 'xxl-job任务ID',
  `notify_type` tinyint NOT NULL COMMENT '通知方式(0-邮件)',
  `notify_title` varchar(150) NOT NULL COMMENT '邮件标题',
  `notify_content` text COMMENT '邮件内容',
  `user_id` bigint NOT NULL COMMENT '订阅人ID',
  `user_name` varchar(100) NOT NULL COMMENT '订阅人姓名',
  `create_time` datetime NOT NULL COMMENT '订阅时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `begin_trigger_hour` tinyint DEFAULT NULL COMMENT '开始触发的时间(triggerPeriod=hour有效)',
  `end_trigger_hour` tinyint DEFAULT NULL COMMENT '结束触发的时间(triggerPeriod=hour有效)',
  `period` int DEFAULT NULL COMMENT '间隔(triggerPeriod=hour有效)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订阅服务';

-- ----------------------------
-- Records of visual_subscribe
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_subscribe_notify_conf
-- ----------------------------
DROP TABLE IF EXISTS `visual_subscribe_notify_conf`;
CREATE TABLE `visual_subscribe_notify_conf` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `attri_key` varchar(255) DEFAULT NULL COMMENT '配置键',
  `attri_value` varchar(255) DEFAULT NULL COMMENT '值',
  `attri_name` varchar(100) DEFAULT NULL COMMENT '键名称',
  `notify_type` tinyint DEFAULT NULL COMMENT '通知方式',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `sort` tinyint DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2132 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of visual_subscribe_notify_conf
-- ----------------------------
BEGIN;
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (75, 'water_mark', '1', '是否开启水印', 100, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (76, 'water_mark_type', '1', '水印内容', 100, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (77, 'water_mark_content', '注意数据保密', '自定义', 100, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (78, 'username', '邮箱地址', '发送邮箱', 0, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (79, 'password', '授权码', '授权码', 0, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (80, 'smtp', 'smtp', 'smtp', 0, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (81, 'agent_id', '2324020760', '钉钉应用id', 2, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (82, 'app_key', 'dingbiynivssjr7mvnys', '钉钉应用app_key', 2, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (83, 'app_secret', '4-bpDLUk7eMKPyQ3GUR_LY7iLU1IcnCm8Cszg-cLqW6WE9bKbY2BqHOmjFPjHpIC', '钉钉应用secret', 2, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (84, 'app_id', 'cli_a32758d53778d00d', '飞书应用id', 3, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (85, 'app_secret', 'RCSN31OJwWEeghDNROLfqSKG5Lz2lE3R', '飞书应用密钥', 3, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (86, 'bi', 'bi_version', 'bi说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (87, 'system', 'system_version', 'system说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (88, 'pdf', 'pdf_version', 'pdf说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (89, 'lowcode', 'lowcode_version', 'lowcode说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (90, 'xxljob', 'xxljob_version', 'xxljob说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (91, 'upgrade', 'upgrade_version', 'upgrade说明', 6, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (92, 'bi', 'gmetry-bi', 'bi说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (93, 'system', 'gmetry-system', 'system说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (94, 'pdf', 'gmetry-pdf', 'pdf说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (95, 'lowcode', 'gmetry-lowcode', 'lowcode说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (96, 'xxljob', 'gmetry-xxljob', 'xxljob说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (97, 'upgrade', 'gemtry-upgrade', 'upgrade说明', 7, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (98, 'systemName', '数据可视化平台', '系统名称', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (99, 'systemVersion', '3.4.0', '系统版本', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (100, 'loginType', '1', '登录方式', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (101, 'systemLogo', '', '系统LOGO', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (102, 'homeUrl', '', '首页url', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (103, 'isTop', '', '是否启用顶部菜单', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (104, 'apiUrl', '', '接口路径', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (105, 'pdfUrl', '', 'pdf路径', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (106, 'imgUploadUrl', '', '图片上传路径', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (107, 'imgViewUrl', '', '图片预览地址', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (108, 'app_id', '', '微信应用id', 8, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (109, 'app_secret', '', '微信应用secret', 8, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (110, 'app_id', 'wxf6c238d9e4698994', '小程序appid', 9, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (111, 'app_secret', 'b567044d42a63a0b160aa0621dc28340', '小程序secret', 9, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (112, 'app_url', 'https://api.weixin.qq.com/sns/jscode2session', '小程序请求url', 9, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (113, 'appid', 'T1001', '应用appid', 4, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (114, 'secret', '1c38fcc48bf79b4d05c8204104267529', '应用secret', 4, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (115, 'version', 'V10', '版本', 4, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (116, 'templateId', 'OPENTM207793577', '模板id', 4, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (117, 'mcCode', '0428082539', '企业代码', 4, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (582, 'loginTypeApp', '1', '小程序登录方式', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (583, 'loginTypeH5', '1', 'H5登录方式', 5, '111111', NULL);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (584, 'corp_name', '企业名称', '企业名称', 1, '111111', 1);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (585, 'corp_id', '企业微信id', '企业微信id', 1, '111111', 2);
INSERT INTO `visual_subscribe_notify_conf` (`id`, `attri_key`, `attri_value`, `attri_name`, `notify_type`, `tenant_id`, `sort`) VALUES (586, 'corp_secret', '企业微信secret', '企业微信secret', 1, '1111111', 3);
COMMIT;

-- ----------------------------
-- Table structure for visual_subscribe_operate_log
-- ----------------------------
DROP TABLE IF EXISTS `visual_subscribe_operate_log`;
CREATE TABLE `visual_subscribe_operate_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sub_title` varchar(255) NOT NULL COMMENT '标题',
  `data_type` tinyint NOT NULL COMMENT '订阅内容类型',
  `notify_type` tinyint DEFAULT NULL COMMENT '通知方式',
  `data_id` int NOT NULL COMMENT '订阅内容ID',
  `operator_id` bigint NOT NULL COMMENT '订阅人ID',
  `operator_name` varchar(100) NOT NULL COMMENT '订阅人姓名',
  `user_id` bigint NOT NULL COMMENT '订阅人ID',
  `user_name` varchar(100) NOT NULL COMMENT '订阅人姓名',
  `operate_type` tinyint DEFAULT NULL COMMENT '操作',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订阅操作日志';

-- ----------------------------
-- Records of visual_subscribe_operate_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_subscribe_push_log
-- ----------------------------
DROP TABLE IF EXISTS `visual_subscribe_push_log`;
CREATE TABLE `visual_subscribe_push_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sub_title` varchar(255) NOT NULL COMMENT '标题',
  `data_type` tinyint NOT NULL COMMENT '订阅内容类型',
  `notify_type` tinyint DEFAULT NULL COMMENT '通知方式',
  `data_id` int NOT NULL COMMENT '订阅内容ID',
  `content` text COMMENT '发送内容',
  `user_id` bigint NOT NULL COMMENT '订阅人ID',
  `user_name` varchar(100) NOT NULL COMMENT '订阅人姓名',
  `err_code` tinyint NOT NULL DEFAULT '0' COMMENT '错误码(0-成功/1-失败)',
  `err_msg` varchar(4000) DEFAULT NULL COMMENT '错误描述',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`),
  KEY `data_id` (`data_id`,`data_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订阅发送日志';

-- ----------------------------
-- Records of visual_subscribe_push_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_template
-- ----------------------------
DROP TABLE IF EXISTS `visual_template`;
CREATE TABLE `visual_template` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) DEFAULT NULL COMMENT '大屏标题',
  `background_url` longtext COMMENT '大屏背景',
  `category` int DEFAULT NULL COMMENT '大屏类型',
  `history_report_id` int DEFAULT NULL COMMENT '历史报告id',
  `password` varchar(255) DEFAULT NULL COMMENT '发布密码',
  `user_str` varchar(255) DEFAULT NULL COMMENT '用户ID组',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `status` int DEFAULT '1' COMMENT '状态',
  `is_deleted` int DEFAULT '0' COMMENT '是否已删除',
  `order_index` int DEFAULT NULL COMMENT '排序值 从小到大排序',
  `content` longtext COMMENT '组件内容JSON',
  `public_status` tinyint NOT NULL DEFAULT '0' COMMENT '大屏公开状态',
  `visual_type` tinyint NOT NULL DEFAULT '0' COMMENT '大屏类型(0-普通大屏/1-我的收藏/2-我的报告)',
  `ref_visual_id` int DEFAULT NULL COMMENT '复制大屏ID',
  `power_point_id` int DEFAULT NULL COMMENT '幻灯片ID',
  `visual_data_type` int NOT NULL DEFAULT '0' COMMENT '是否为自主报表 1：是，0：否',
  `is_mobile` int NOT NULL DEFAULT '0' COMMENT '是否为移动大屏(0:否，1:是)',
  `mobile_content` longtext COMMENT '移动组件json内容',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `publish_status` int NOT NULL DEFAULT '0' COMMENT '发布状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='大屏模板表';

-- ----------------------------
-- Records of visual_template
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_template_classify
-- ----------------------------
DROP TABLE IF EXISTS `visual_template_classify`;
CREATE TABLE `visual_template_classify` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` int NOT NULL DEFAULT '0' COMMENT '父分类id',
  `classify_type` int DEFAULT NULL COMMENT '分类类型 1 pc端 2 移动端',
  `category_key` varchar(500) DEFAULT NULL COMMENT '分类键值',
  `category_value` varchar(64) DEFAULT NULL COMMENT '分类名称',
  `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否已删除',
  `sort_num` int NOT NULL DEFAULT '0' COMMENT '排序',
  `create_user_id` bigint NOT NULL DEFAULT '0' COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板分类';

-- ----------------------------
-- Records of visual_template_classify
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_template_use_situation
-- ----------------------------
DROP TABLE IF EXISTS `visual_template_use_situation`;
CREATE TABLE `visual_template_use_situation` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `visual_id` int NOT NULL COMMENT '模板 id',
  `use_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '模板使用时间',
  `user_id` bigint NOT NULL COMMENT '使用人',
  `user_name` varchar(100) NOT NULL COMMENT '使用人名称',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板使用情况';

-- ----------------------------
-- Records of visual_template_use_situation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_warning
-- ----------------------------
DROP TABLE IF EXISTS `visual_warning`;
CREATE TABLE `visual_warning` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '预警器名称',
  `request_freq` int NOT NULL COMMENT '请求频率',
  `datasource_id` int NOT NULL DEFAULT '0' COMMENT '数据源ID',
  `datasource_name` varchar(100) DEFAULT NULL COMMENT '数据源名称',
  `cube_data_id` int NOT NULL DEFAULT '0' COMMENT '数据集ID',
  `cube_data_name` varchar(100) DEFAULT NULL COMMENT '数据集名称',
  `filter_json` text COMMENT '查询条件JSON',
  `filter_relation_json` text COMMENT '查询条件关系JSON',
  `filter_time_json` text COMMENT '时间设置JSON',
  `column_json` text COMMENT '字段JSON',
  `sort_json` text COMMENT '排序JSON',
  `column_id_list` json DEFAULT NULL COMMENT '字段ID列表JSON',
  `message_template_id` int DEFAULT NULL COMMENT '消息模版ID',
  `message_dynamic_content` varchar(1000) DEFAULT NULL COMMENT '消息动态内容',
  `warn_message_way` tinyint NOT NULL COMMENT '预警消息方式(0-短信/1-邮件/2-所有)',
  `warn_user_ids` varchar(2000) DEFAULT NULL COMMENT '预警人ID',
  `next_loop_ts` bigint NOT NULL DEFAULT '0' COMMENT '下次轮询时间戳(毫秒)',
  `enable_status` tinyint NOT NULL DEFAULT '1' COMMENT '是否开启(0-否/1-是)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(30) NOT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `sms_params` json DEFAULT NULL COMMENT '短信变量参数',
  `sms_id` int DEFAULT NULL COMMENT '短信模版ID',
  `job_id` int DEFAULT NULL COMMENT 'XXLJOB任务ID',
  `visual_data_json` json DEFAULT NULL COMMENT '大屏列表基础信息JSON',
  `approve_status` tinyint NOT NULL DEFAULT '1' COMMENT '审批状态(0-审核中/1-审核通过/2-审核拒绝)',
  `warning_ways` varchar(200) DEFAULT NULL COMMENT '预警消息方式',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智能预警器表';

-- ----------------------------
-- Records of visual_warning
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_warning_message_template
-- ----------------------------
DROP TABLE IF EXISTS `visual_warning_message_template`;
CREATE TABLE `visual_warning_message_template` (
  `id` int NOT NULL AUTO_INCREMENT,
  `content_id` varchar(100) NOT NULL COMMENT '短信运营商模版ID',
  `name` varchar(50) NOT NULL COMMENT '模版名称',
  `content` text NOT NULL COMMENT '模版内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智能预警消息模版';

-- ----------------------------
-- Records of visual_warning_message_template
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_warning_record
-- ----------------------------
DROP TABLE IF EXISTS `visual_warning_record`;
CREATE TABLE `visual_warning_record` (
  `id` int NOT NULL AUTO_INCREMENT,
  `warning_id` int NOT NULL COMMENT '预警器ID',
  `warning_name` varchar(50) NOT NULL COMMENT '预警器名称',
  `warn_data` text NOT NULL COMMENT '预警数据',
  `warn_message` text COMMENT '预警内容',
  `warn_message_way` tinyint DEFAULT NULL COMMENT '预警消息类型(0-短信/1-邮件/2-所有)',
  `warn_type` tinyint DEFAULT NULL COMMENT '预警类型',
  `resolve_status` tinyint NOT NULL DEFAULT '0' COMMENT '解决状态(0-待解决/1-已解决)',
  `distort_status` tinyint NOT NULL DEFAULT '0' COMMENT '误报状态(0-否/1-是)',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(30) DEFAULT NULL COMMENT '更新人',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智能预警记录表';

-- ----------------------------
-- Records of visual_warning_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for visual_warning_record_user
-- ----------------------------
DROP TABLE IF EXISTS `visual_warning_record_user`;
CREATE TABLE `visual_warning_record_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `warning_id` int NOT NULL COMMENT '预警器ID',
  `warning_record_id` int NOT NULL COMMENT '预警记录ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='预警记录和用户中间表';

-- ----------------------------
-- Records of visual_warning_record_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warn_brief_detail
-- ----------------------------
DROP TABLE IF EXISTS `warn_brief_detail`;
CREATE TABLE `warn_brief_detail` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `identifier` varchar(200) DEFAULT NULL COMMENT '预警消息唯一标识',
  `sender` varchar(200) DEFAULT NULL COMMENT '预警信息发布单位',
  `sendtime` datetime DEFAULT NULL COMMENT '预警信息发布时间',
  `severity` varchar(50) DEFAULT NULL COMMENT '预警级别',
  `headline` varchar(500) DEFAULT NULL COMMENT '预警信息标题',
  `eventtype` varchar(50) DEFAULT NULL COMMENT '预警类型',
  `eventname` varchar(50) DEFAULT NULL COMMENT '预警类型名称',
  `msgtype` varchar(50) DEFAULT NULL COMMENT '预警信息类型',
  `senderlevel` varchar(10) DEFAULT NULL COMMENT '1,国家级 2,省级 3,市级 4,县级',
  `regionid` varchar(50) DEFAULT NULL COMMENT '行政区划编码',
  `adnm` varchar(200) DEFAULT NULL,
  `orgIdentifier` varchar(200) DEFAULT NULL,
  `sendercode` varchar(100) DEFAULT NULL COMMENT '预警信息发布单位编码',
  `status` varchar(50) DEFAULT NULL,
  `scope` varchar(50) DEFAULT NULL COMMENT '预警信息发布范围',
  `secclassification` varchar(20) DEFAULT NULL COMMENT '密级',
  `note` varchar(200) DEFAULT NULL COMMENT '对预警信息解除原因的说明',
  `reference` varchar(200) DEFAULT NULL COMMENT '描述本条预警信息引用的预警信息',
  `language` varchar(20) DEFAULT NULL COMMENT '预警信息描述所使用的语言代码',
  `urgency` varchar(50) DEFAULT NULL COMMENT '预警事件的紧急程度',
  `certainty` varchar(50) DEFAULT NULL COMMENT '预警事件发生的可能程度',
  `onset` datetime DEFAULT NULL COMMENT '预警事件的预期发生时间',
  `expires` datetime DEFAULT NULL COMMENT '预警事件的失效时间',
  `description` text COMMENT '预警信息正文',
  `instruction` varchar(50) DEFAULT NULL,
  `web` varchar(200) DEFAULT NULL COMMENT '预警信息内容中包含的网址信息',
  `areadesc` varchar(50) DEFAULT NULL COMMENT '影响区域的文本描述',
  `polygon` varchar(200) DEFAULT NULL COMMENT '用多边形表示预警信息的发布区域',
  `circle` varchar(50) DEFAULT NULL,
  `geocode` varchar(50) DEFAULT NULL,
  `effective` datetime DEFAULT NULL COMMENT '预警信息生效时间',
  `code` varchar(200) DEFAULT NULL COMMENT '预警信息的发布手段和发布对象',
  `resource` varchar(50) DEFAULT NULL,
  `province` varchar(50) DEFAULT NULL COMMENT '省级行政区',
  `prefecture` varchar(50) DEFAULT NULL COMMENT '市级行政区',
  `county` varchar(50) DEFAULT NULL COMMENT '县级行政区',
  `batch` varchar(20) DEFAULT NULL COMMENT '数据批次号',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='预警概览/详情信息';

-- ----------------------------
-- Records of warn_brief_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_authorization_account
-- ----------------------------
DROP TABLE IF EXISTS `wechat_authorization_account`;
CREATE TABLE `wechat_authorization_account` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `nick_name` varchar(50) DEFAULT NULL COMMENT '昵称',
  `head_img` varchar(200) DEFAULT NULL COMMENT '头像',
  `appid` varchar(50) DEFAULT NULL COMMENT '小程序，公众号appid',
  `account_type` int DEFAULT NULL COMMENT '授权账号类型 1 小程序  2 公众号',
  `service_type_info` varchar(50) DEFAULT NULL COMMENT '公众号 ：0 订阅号 1 由历史老帐号升级后的订阅号 2 服务号\r\n            小程序 ：0 普通小程序 12 试用小程序 4 小游戏 10 小商店',
  `verify_type_info` varchar(50) DEFAULT NULL COMMENT '公众号认证类型 ： -1 未认证  0 微信认证 1 新浪微博认证 2 腾讯微博认证 3 已资质认证通过但还未通过名称认证 4 已资质认证通过、还未通过名称认证，但通过了新浪微博认证  5 已资质认证通过、还未通过名称认证，但通过了腾讯微博认证\r\n            \r\n            小程序认证类型 ： -1 未认证 0 微信认证',
  `user_name` varchar(50) DEFAULT NULL COMMENT '原始 ID',
  `principal_name` varchar(50) DEFAULT NULL COMMENT '主体名称',
  `alias` varchar(50) DEFAULT NULL COMMENT '公众号所设置的微信号',
  `signature` varchar(50) DEFAULT NULL COMMENT '帐号介绍 (小程序)',
  `business_info` text COMMENT '用以了解功能的开通状况（0代表未开通，1代表已开通）\r\n            open_store	是否开通微信门店功能\r\n            open_scan	是否开通微信扫商品功能\r\n            open_pay	              是否开通微信支付功能\r\n            open_card	是否开通微信卡券功能\r\n            open_shake	是否开通微信摇一摇功能',
  `qrcode_url` varchar(255) DEFAULT NULL COMMENT '二维码图片的 URL，开发者最好自行也进行保存',
  `mini_program_info` text COMMENT '小程序配置 network 小程序配置的合法域名信息 categories  小程序配置的类目信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='开放平台授权账号表';

-- ----------------------------
-- Records of wechat_authorization_account
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_mpeventcontent
-- ----------------------------
DROP TABLE IF EXISTS `wechat_mpeventcontent`;
CREATE TABLE `wechat_mpeventcontent` (
  `F_EventKey` varchar(50) NOT NULL COMMENT '自然主键',
  `F_Content` text COMMENT '文本内容',
  PRIMARY KEY (`F_EventKey`) USING BTREE
);

-- ----------------------------
-- Records of wechat_mpeventcontent
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_mpmaterial
-- ----------------------------
DROP TABLE IF EXISTS `wechat_mpmaterial`;
CREATE TABLE `wechat_mpmaterial` (
  `F_Id` varchar(50) NOT NULL COMMENT '自然主键',
  `F_OpenId` text COMMENT '公众号主键',
  `F_MaterialsType` int DEFAULT NULL COMMENT '上传素材类型',
  `F_Title` text COMMENT '图文标题',
  `F_ThumbMediaId` text COMMENT '图文消息缩略图的media_id',
  `F_Author` varchar(50) DEFAULT NULL COMMENT '作者',
  `F_ContentSourceUrl` text COMMENT '原文链接',
  `F_Content` longtext COMMENT '图文内容',
  `F_Digest` text COMMENT '图文消息的描述',
  `F_ShowCoverPic` varchar(50) DEFAULT NULL COMMENT '封面状态',
  `F_ThumbUrl` text COMMENT '缩略图的URL',
  `F_NeedOpenComment` int DEFAULT NULL COMMENT '是否打开评论',
  `F_OnlyFansCanComment` int DEFAULT NULL COMMENT '是否粉丝才可评论',
  `F_FileJson` longtext COMMENT '附件',
  `F_SortCode` bigint DEFAULT NULL COMMENT '排序码',
  `F_Description` text COMMENT '备注',
  `F_UploadDate` datetime DEFAULT NULL COMMENT '上传素材时间',
  `F_UploadUser` varchar(50) DEFAULT NULL COMMENT '上传素材用户',
  `F_EnabledMark` int DEFAULT NULL COMMENT '有效标志',
  `F_Introduction` text,
  `F_ReturnUrl` text COMMENT '上传返回路径',
  `F_MediaId` text COMMENT '公众号素材Id',
  PRIMARY KEY (`F_Id`) USING BTREE
) COMMENT='公众号素材';

-- ----------------------------
-- Records of wechat_mpmaterial
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_mpmessage
-- ----------------------------
DROP TABLE IF EXISTS `wechat_mpmessage`;
CREATE TABLE `wechat_mpmessage` (
  `F_Id` varchar(50) NOT NULL COMMENT '自然主键',
  `F_IsToAll` varchar(50) DEFAULT NULL COMMENT '全部用户',
  `F_OpenId` text COMMENT '公众号主键',
  `F_MsgType` int DEFAULT NULL COMMENT '群发消息类型',
  `F_Title` text COMMENT '图文标题',
  `F_ThumbMediaId` text COMMENT '图文消息缩略图的media_id',
  `F_Author` varchar(50) DEFAULT NULL COMMENT '作者',
  `F_ContentSourceUrl` text COMMENT '原文链接',
  `F_Content` longtext COMMENT '图文内容',
  `F_TxtContent` text COMMENT '文本内容',
  `F_Digest` text COMMENT '图文消息的描述',
  `F_ShowCoverPic` varchar(50) DEFAULT NULL COMMENT '封面状态',
  `F_ThumbUrl` text COMMENT '缩略图的URL',
  `F_NeedOpenComment` int DEFAULT NULL COMMENT '是否打开评论',
  `F_OnlyFansCanComment` int DEFAULT NULL COMMENT '是否粉丝才可评论',
  `F_MsgId` text COMMENT '消息ID',
  `F_MsgDataIid` text COMMENT '消息数据ID',
  `F_FileJson` longtext COMMENT '附件',
  `F_SortCode` bigint DEFAULT NULL COMMENT '排序码',
  `F_Description` text COMMENT '备注',
  `F_SendDate` datetime DEFAULT NULL COMMENT '发送时间',
  `F_SendUser` varchar(50) DEFAULT NULL COMMENT '发送人',
  `F_EnabledMark` int DEFAULT NULL COMMENT '有效标志',
  `F_TagId` text COMMENT '标签Id',
  PRIMARY KEY (`F_Id`) USING BTREE
) COMMENT='公众号群发消息';

-- ----------------------------
-- Records of wechat_mpmessage
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_public_user
-- ----------------------------
DROP TABLE IF EXISTS `wechat_public_user`;
CREATE TABLE `wechat_public_user` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `appid` varchar(100) DEFAULT NULL COMMENT '公众号appid',
  `headimgurl` varchar(255) DEFAULT NULL COMMENT '用户头像',
  `nickname` varchar(100) DEFAULT NULL COMMENT '用户的昵称',
  `subscribe` varchar(10) DEFAULT NULL COMMENT '用户是否订阅该公众号标识，值为0时，代表此用户没有关注该公众号，拉取不到其余信息。',
  `openid` varchar(100) DEFAULT NULL COMMENT '用户的标识，对当前公众号唯一',
  `sex` varchar(10) DEFAULT NULL COMMENT '用户的性别，值为1时是男性，值为2时是女性，值为0时是未知',
  `city` varchar(20) DEFAULT NULL COMMENT '用户所在城市',
  `country` varchar(20) DEFAULT NULL COMMENT '用户所在国家',
  `province` varchar(20) DEFAULT NULL COMMENT '用户所在省份',
  `language` varchar(20) DEFAULT NULL COMMENT '用户的语言，简体中文为zh_CN',
  `subscribe_time` varchar(30) DEFAULT NULL COMMENT '用户关注时间，为时间戳。如果用户曾多次关注，则取最后关注时间',
  `unionid` varchar(100) DEFAULT NULL COMMENT '只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段。',
  `remark` varchar(100) DEFAULT NULL COMMENT '公众号运营者对粉丝的备注，公众号运营者可在微信公众平台用户管理界面对粉丝添加备注',
  `groupid` varchar(20) DEFAULT NULL COMMENT '用户所在的分组ID',
  `tagid_list` varchar(255) DEFAULT NULL COMMENT '用户被打上的标签ID列表',
  `subscribe_scene` varchar(100) DEFAULT NULL COMMENT '返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENE_PROFILE_LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_WECHAT_ADVERTISEMENT 微信广告，ADD_SCENE_OTHERS 其他',
  `qr_scene` varchar(200) DEFAULT NULL COMMENT '自定义',
  `qr_scene_str` varchar(200) DEFAULT NULL COMMENT '自定义',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='公众号用户信息';

-- ----------------------------
-- Records of wechat_public_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_qydepartment
-- ----------------------------
DROP TABLE IF EXISTS `wechat_qydepartment`;
CREATE TABLE `wechat_qydepartment` (
  `F_Id` varchar(50) NOT NULL COMMENT '自然主键',
  `F_OrganizeId` varchar(50) DEFAULT NULL COMMENT '机构上级',
  `F_WeChatDeptId` int DEFAULT NULL COMMENT '机构编号',
  `F_Category` varchar(50) DEFAULT NULL COMMENT '机构分类',
  `F_EnCode` varchar(50) DEFAULT NULL COMMENT '机构编号',
  `F_FullName` varchar(50) DEFAULT NULL COMMENT '机构名称',
  `F_ManagerId` varchar(50) DEFAULT NULL COMMENT '机构主管',
  `F_PropertyJson` longtext COMMENT '扩展属性',
  `F_Description` text COMMENT '描述',
  `F_SortCode` bigint DEFAULT NULL COMMENT '排序码',
  `F_EnabledMark` int DEFAULT NULL COMMENT '有效标志',
  `F_CreatorTime` datetime DEFAULT NULL COMMENT '创建时间',
  `F_CreatorUserId` varchar(50) DEFAULT NULL COMMENT '创建用户',
  `F_LastModifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  `F_LastModifyUserId` varchar(50) DEFAULT NULL COMMENT '修改用户',
  `F_DeleteMark` int DEFAULT NULL COMMENT '删除标志',
  `F_DeleteTime` datetime DEFAULT NULL COMMENT '删除时间',
  `F_DeleteUserId` varchar(50) DEFAULT NULL COMMENT '删除用户',
  `F_ParentId` varchar(50) DEFAULT NULL COMMENT '父级',
  `F_Order` int DEFAULT NULL COMMENT '微信排序',
  `F_SubmitState` varchar(50) DEFAULT NULL COMMENT '提交状态',
  `F_WeChatParentId` bigint DEFAULT NULL COMMENT '微信父级',
  `F_SyncState` int DEFAULT NULL COMMENT '同步状态',
  PRIMARY KEY (`F_Id`) USING BTREE
)COMMENT='企业号组织';

-- ----------------------------
-- Records of wechat_qydepartment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_qymessage
-- ----------------------------
DROP TABLE IF EXISTS `wechat_qymessage`;
CREATE TABLE `wechat_qymessage` (
  `F_Id` varchar(50) NOT NULL COMMENT '自然主键',
  `F_MsgType` int DEFAULT NULL COMMENT '消息类型',
  `F_All` int DEFAULT NULL COMMENT '全员',
  `F_Safe` int DEFAULT NULL COMMENT '保密状态',
  `F_ToUserId` longtext COMMENT '成员主键集',
  `F_ToParty` text COMMENT '部门主键集',
  `F_ToTag` text COMMENT '标签主键集',
  `F_AgentId` varchar(50) DEFAULT NULL COMMENT '企业应用主键',
  `F_MediaId` varchar(200) DEFAULT NULL COMMENT '媒体主键',
  `F_Title` varchar(200) DEFAULT NULL COMMENT '图文标题',
  `F_Author` varchar(50) DEFAULT NULL COMMENT '图文作者',
  `F_ContentSourceUrl` varchar(200) DEFAULT NULL COMMENT '原文链接',
  `F_Content` longtext COMMENT '图文内容',
  `F_Abstract` varchar(200) DEFAULT NULL COMMENT '摘要',
  `F_ShowCoverPic` int DEFAULT NULL COMMENT '封面状态',
  `F_SendDate` datetime DEFAULT NULL COMMENT '发送时间',
  `F_SendUserId` varchar(50) DEFAULT NULL COMMENT '发送人',
  `F_TXTContent` text COMMENT '文本内容',
  `F_FileJson` longtext COMMENT '附件',
  `F_SortCode` bigint DEFAULT NULL COMMENT '排序码',
  `F_EnabledMark` int DEFAULT NULL COMMENT '状态',
  `F_InvalidUser` longtext COMMENT '无效用户',
  `F_InvalidParty` text COMMENT '无效机构',
  `F_InvalidTag` text COMMENT '无效标签',
  `F_Description` text COMMENT '备注',
  `F_PicUrl` text COMMENT '图片链接',
  PRIMARY KEY (`F_Id`) USING BTREE
) COMMENT='消息发送';

-- ----------------------------
-- Records of wechat_qymessage
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wechat_qyuser
-- ----------------------------
DROP TABLE IF EXISTS `wechat_qyuser`;
CREATE TABLE `wechat_qyuser` (
  `F_Id` varchar(50) NOT NULL COMMENT '自然主键',
  `F_Account` varchar(50) DEFAULT NULL COMMENT '账户',
  `F_NickName` varchar(50) DEFAULT NULL COMMENT '呢称',
  `F_HeadIcon` varchar(50) DEFAULT NULL COMMENT '头像',
  `F_Gender` int DEFAULT NULL COMMENT '性别',
  `F_Birthday` datetime DEFAULT NULL COMMENT '生日',
  `F_MobilePhone` varchar(20) DEFAULT NULL COMMENT '手机',
  `F_TelePhone` varchar(20) DEFAULT NULL COMMENT '电话',
  `F_Landline` varchar(50) DEFAULT NULL COMMENT 'F_Landline',
  `F_Email` varchar(50) DEFAULT NULL COMMENT '邮箱',
  `F_Nation` varchar(50) DEFAULT NULL COMMENT '民族',
  `F_NativePlace` varchar(50) DEFAULT NULL COMMENT '籍贯',
  `F_EntryDate` datetime DEFAULT NULL COMMENT '入职日期',
  `F_CertificatesType` varchar(50) DEFAULT NULL COMMENT '证件类型',
  `F_CertificatesNumber` varchar(50) DEFAULT NULL COMMENT '证件号码',
  `F_Education` varchar(50) DEFAULT NULL COMMENT '文化程度',
  `F_UrgentContacts` varchar(50) DEFAULT NULL COMMENT 'F_UrgentContacts',
  `F_UrgentTelePhone` varchar(50) DEFAULT NULL COMMENT '紧急电话',
  `F_PostalAddress` text COMMENT '通讯地址',
  `F_Signature` text COMMENT '自我介绍',
  `F_Password` varchar(50) DEFAULT NULL COMMENT '密码',
  `F_Secretkey` varchar(50) DEFAULT NULL COMMENT '秘钥',
  `F_FirstLogTime` datetime DEFAULT NULL COMMENT '首次登录时间',
  `F_FirstLogIP` varchar(50) DEFAULT NULL COMMENT '首次登录IP',
  `F_PrevLogTime` datetime DEFAULT NULL COMMENT '前次登录时间',
  `F_PrevLogIP` varchar(50) DEFAULT NULL COMMENT '前次登录IP',
  `F_LastLogTime` datetime DEFAULT NULL COMMENT '最后登录时间',
  `F_LastLogIP` varchar(50) DEFAULT NULL COMMENT '最后登录IP',
  `F_LogSuccessCount` int DEFAULT NULL COMMENT '登录成功次数',
  `F_LogErrorCount` int DEFAULT NULL COMMENT '登录错误次数',
  `F_ChangePasswordDate` datetime DEFAULT NULL COMMENT '最后修改密码时间',
  `F_Language` varchar(50) DEFAULT NULL COMMENT '系统语言',
  `F_Theme` varchar(50) DEFAULT NULL COMMENT '系统样式',
  `F_CommonMenu` longtext COMMENT '常用菜单',
  `F_IsAdministrator` int DEFAULT NULL COMMENT '是否管理员',
  `F_PropertyJson` longtext COMMENT '扩展属性',
  `F_SortCode` bigint DEFAULT NULL COMMENT '排序码',
  `F_CreatorTime` datetime DEFAULT NULL COMMENT '创建时间',
  `F_LastModifyTime` datetime DEFAULT NULL COMMENT '修改时间',
  `F_DeleteMark` int DEFAULT NULL COMMENT '删除标志',
  `F_ManagerId` varchar(50) DEFAULT NULL COMMENT '主管主键',
  `F_OrganizeId` text COMMENT '组织主键',
  `F_PositionId` text COMMENT '岗位主键',
  `F_RoleId` text COMMENT '角色主键',
  `F_UserId` varchar(50) DEFAULT NULL COMMENT '用户主键',
  `F_RealName` varchar(50) DEFAULT NULL COMMENT '用户姓名',
  `F_Description` text COMMENT '备注',
  `F_EnabledMark` int DEFAULT NULL COMMENT '有效标志',
  `F_CreateTime` datetime DEFAULT NULL COMMENT '创建时间',
  `F_CreatorUserId` varchar(50) DEFAULT NULL COMMENT '创建用户',
  `F_LastModifyUserId` varchar(50) DEFAULT NULL COMMENT '编辑用户',
  `F_DeleteTime` datetime DEFAULT NULL COMMENT '删除日期',
  `F_DeleteUserId` varchar(50) DEFAULT NULL COMMENT '删除用户',
  `F_SyncState` int DEFAULT NULL COMMENT '同步状态',
  PRIMARY KEY (`F_Id`) USING BTREE
) COMMENT='企业号用户';

-- ----------------------------
-- Records of wechat_qyuser
-- ----------------------------
BEGIN;
COMMIT;

DROP TABLE IF EXISTS `platomix_system_file`;
CREATE TABLE `platomix_system_file` (
  `id` bigint NOT NULL COMMENT '主键',
  `file_name` varchar(256) NOT NULL COMMENT '文件名称',
  `file_extension` varchar(256) NOT NULL COMMENT '文件后缀名',
  `file_type` varchar(256) NOT NULL COMMENT '文件类型',
  `file_path` varchar(256) DEFAULT NULL COMMENT '文件路径',
  `file_org_id` varchar(256) DEFAULT NULL COMMENT '业务 id',
  `file_org_type` varchar(255) DEFAULT NULL COMMENT '业务类型',
  `file_size` bigint DEFAULT NULL COMMENT '文件大小',
  `file_size_str` varchar(255) DEFAULT NULL COMMENT '文件大小',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `create_dept` varchar(255) DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `tenant_id` varchar(12) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件上传记录表';

SET FOREIGN_KEY_CHECKS = 1;
