-- --------------------------------------------------------
-- 主机:                           127.0.0.1
-- 服务器版本:                        5.7.27-log - MySQL Community Server (GPL)
-- 服务器操作系统:                      Win64
-- HeidiSQL 版本:                  8.2.0.4675
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- 导出 linker 的数据库结构
CREATE DATABASE IF NOT EXISTS `linker` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `linker`;


-- 导出  表 linker.approval_history 结构
CREATE TABLE IF NOT EXISTS `approval_history` (
  `APPROVAL_HISTORY_ID` bigint(20) NOT NULL,
  `RELATE_RECORD` varchar(50) NOT NULL,
  `APPROVAL_PROCESS` bigint(20) NOT NULL,
  `APPROVAL_PROCESS_STEP` bigint(20) DEFAULT NULL,
  `APPROVER` bigint(20) NOT NULL,
  `APPROVAL_STATE` char(10) NOT NULL,
  `ATTACHMENTS` varchar(2500) DEFAULT NULL,
  `IMAGES` varchar(2500) DEFAULT NULL,
  `REMARK` varchar(2500) DEFAULT NULL,
  `NEXT_APPROVAL_PROCESS_STEP` bigint(20) DEFAULT NULL,
  `NEXT_APPROVER` varchar(2500) DEFAULT NULL,
  `CREATED_TIME` datetime NOT NULL,
  PRIMARY KEY (`APPROVAL_HISTORY_ID`),
  KEY `RELATE_RECORD` (`RELATE_RECORD`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批历史';

-- 正在导出表  linker.approval_history 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `approval_history` DISABLE KEYS */;
/*!40000 ALTER TABLE `approval_history` ENABLE KEYS */;


-- 导出  表 linker.approval_process 结构
CREATE TABLE IF NOT EXISTS `approval_process` (
  `APPROVAL_PROCESS_ID` bigint(20) NOT NULL,
  `APPROVAL_PROCESS_NAME` varchar(255) NOT NULL,
  `ENTITY_NAME` varchar(255) NOT NULL,
  `CONDITION` varchar(2500) DEFAULT NULL,
  `ACTIVATE` tinyint(4) NOT NULL DEFAULT '1',
  `REMARK` varchar(2500) DEFAULT NULL,
  PRIMARY KEY (`APPROVAL_PROCESS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.approval_process 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `approval_process` DISABLE KEYS */;
/*!40000 ALTER TABLE `approval_process` ENABLE KEYS */;


-- 导出  表 linker.approval_process_step 结构
CREATE TABLE IF NOT EXISTS `approval_process_step` (
  `APPROVAL_PROCESS_STEP_ID` bigint(20) NOT NULL,
  `APPROVAL_PROCESS_ID` bigint(20) NOT NULL,
  `APPROVAL_PROCESS_STEP_NAME` varchar(50) NOT NULL,
  `APPROVER` varchar(2500) DEFAULT NULL,
  `COUNTERSIGN` tinyint(4) DEFAULT NULL COMMENT '收否会签',
  `ALLOW_REVOKE` tinyint(4) DEFAULT NULL,
  `ALLOW_SELECTION_APPROVER` tinyint(4) DEFAULT NULL,
  `CONDITION` text,
  `REMARK` text,
  `NEXT_STEPS` varchar(2500) DEFAULT NULL,
  `POSITION` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`APPROVAL_PROCESS_STEP_ID`),
  KEY `APPROVAL_PROCESS_ID` (`APPROVAL_PROCESS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.approval_process_step 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `approval_process_step` DISABLE KEYS */;
/*!40000 ALTER TABLE `approval_process_step` ENABLE KEYS */;


-- 导出  表 linker.dept 结构
CREATE TABLE IF NOT EXISTS `dept` (
  `DEPT_ID` bigint(20) NOT NULL,
  `DEPT_NAME` varchar(50) NOT NULL,
  `PARENT_DEPT` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`DEPT_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='部门';

-- 正在导出表  linker.dept 的数据：~1 rows (大约)
/*!40000 ALTER TABLE `dept` DISABLE KEYS */;
INSERT INTO `dept` (`DEPT_ID`, `DEPT_NAME`, `PARENT_DEPT`) VALUES
	(10040000000000000, '公司总部', NULL);
/*!40000 ALTER TABLE `dept` ENABLE KEYS */;


-- 导出  表 linker.dict 结构
CREATE TABLE IF NOT EXISTS `dict` (
  `DICT_ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `ENTITY_CODE` smallint(6) NOT NULL,
  `FIELD_NAME` varchar(500) NOT NULL,
  `LABEL` varchar(500) NOT NULL,
  `DICT_ORDER` smallint(6) NOT NULL,
  `DICT_COLOR` char(10) DEFAULT NULL,
  PRIMARY KEY (`DICT_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=10101751598907985 DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.dict 的数据：~2 rows (大约)
/*!40000 ALTER TABLE `dict` DISABLE KEYS */;
INSERT INTO `dict` (`DICT_ID`, `ENTITY_CODE`, `FIELD_NAME`, `LABEL`, `DICT_ORDER`, `DICT_COLOR`) VALUES
	(10100000000111400, 1114, 'state', '草稿', 0, NULL),
	(10100000000111401, 1114, 'state', '提交', 1, NULL);
/*!40000 ALTER TABLE `dict` ENABLE KEYS */;


-- 导出  表 linker.event_executor 结构
CREATE TABLE IF NOT EXISTS `event_executor` (
  `EVENT_EXECUTOR_ID` bigint(20) NOT NULL,
  `SOURCE_ENTITY` varchar(255) NOT NULL COMMENT '触发事件实体',
  `EVENT_TYPE` varchar(50) NOT NULL COMMENT '事件类型',
  `PRIORITY` tinyint(4) DEFAULT '0' COMMENT '事件优先级',
  `EVENT_TIMING` smallint(6) NOT NULL COMMENT '事件执行时机1. 创建，2修改，4. 删除（注意每次加一种类型，需要设置为2的最新+1次方）',
  `EVENT_EXECUTOR_FIELDS` text COMMENT '触发事件执行的更新字段',
  `CONDITION` text COMMENT '触发事件条件',
  `NAME` varchar(50) NOT NULL COMMENT '事件名称',
  `CONTENT` text NOT NULL COMMENT '事件执行内容',
  `ENABLED` tinyint(4) NOT NULL COMMENT '是否启用',
  PRIMARY KEY (`EVENT_EXECUTOR_ID`),
  KEY `SOURCE_ENTITY` (`SOURCE_ENTITY`),
  KEY `EVENT_TIMING` (`EVENT_TIMING`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件执行规则';

-- 正在导出表  linker.event_executor 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `event_executor` DISABLE KEYS */;
/*!40000 ALTER TABLE `event_executor` ENABLE KEYS */;


-- 导出  表 linker.flyway_schema_history 结构
CREATE TABLE IF NOT EXISTS `flyway_schema_history` (
  `installed_rank` int(11) NOT NULL,
  `version` varchar(50) DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `type` varchar(20) NOT NULL,
  `script` varchar(1000) NOT NULL,
  `checksum` int(11) DEFAULT NULL,
  `installed_by` varchar(100) NOT NULL,
  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `execution_time` int(11) NOT NULL,
  `success` tinyint(1) NOT NULL,
  PRIMARY KEY (`installed_rank`),
  KEY `flyway_schema_history_s_idx` (`success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.flyway_schema_history 的数据：~4 rows (大约)
/*!40000 ALTER TABLE `flyway_schema_history` DISABLE KEYS */;
INSERT INTO `flyway_schema_history` (`installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES
	(1, '1', '<< Flyway Baseline >>', 'BASELINE', '<< Flyway Baseline >>', NULL, 'linker', '2025-11-28 15:14:03', 0, 1),
	(2, '1.0.1', 'test', 'SQL', 'V1.0.1__test.sql', 0, 'linker', '2025-11-28 15:14:03', 2, 1),
	(3, '1.0.2', 'subject', 'SQL', 'V1.0.2__subject.sql', -2020543983, 'root', '2026-04-02 21:55:38', 62, 1),
	(4, '1.0.3', 'cite extra', 'SQL', 'V1.0.3__cite_extra.sql', -97673275, 'root', '2026-04-02 21:55:39', 146, 1),
	(5, '1.0.4', 'create open api key', 'SQL', 'V1.0.4__create_open_api_key.sql', 1139889375, 'root', '2026-04-02 21:55:39', 46, 1);
/*!40000 ALTER TABLE `flyway_schema_history` ENABLE KEYS */;


-- 导出  表 linker.grid_columns 结构
CREATE TABLE IF NOT EXISTS `grid_columns` (
  `GRID_COLUMNS_ID` bigint(20) NOT NULL,
  `ENTITY_NAME` varchar(255) NOT NULL,
  `GRID_COLUMNS` text NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  PRIMARY KEY (`GRID_COLUMNS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='列显示字段';

-- 正在导出表  linker.grid_columns 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `grid_columns` DISABLE KEYS */;
/*!40000 ALTER TABLE `grid_columns` ENABLE KEYS */;


-- 导出  表 linker.grid_conditions 结构
CREATE TABLE IF NOT EXISTS `grid_conditions` (
  `GRID_CONDITION_ID` bigint(20) NOT NULL,
  `ENTITY_NAME` varchar(1000) NOT NULL,
  `CONDITION_NAME` varchar(1000) NOT NULL,
  `CONTENT` text NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  PRIMARY KEY (`GRID_CONDITION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='列表过滤条件';

-- 正在导出表  linker.grid_conditions 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `grid_conditions` DISABLE KEYS */;
/*!40000 ALTER TABLE `grid_conditions` ENABLE KEYS */;


-- 导出  表 linker.grid_quick_search 结构
CREATE TABLE IF NOT EXISTS `grid_quick_search` (
  `GRID_QUICK_SEARCH_ID` bigint(20) NOT NULL,
  `ENTITY_NAME` varchar(255) NOT NULL,
  `SEARCH_FIELDS` varchar(500) NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  PRIMARY KEY (`GRID_QUICK_SEARCH_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='快速查询的字段';

-- 正在导出表  linker.grid_quick_search 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `grid_quick_search` DISABLE KEYS */;
/*!40000 ALTER TABLE `grid_quick_search` ENABLE KEYS */;


-- 导出  表 linker.grid_statistics_fields 结构
CREATE TABLE IF NOT EXISTS `grid_statistics_fields` (
  `GRID_STATISTICS_FIELDS_ID` bigint(20) NOT NULL,
  `ENTITY_NAME` varchar(255) NOT NULL,
  `STATISTICS_FIELDS` text NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  PRIMARY KEY (`GRID_STATISTICS_FIELDS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='列表统计字段';

-- 正在导出表  linker.grid_statistics_fields 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `grid_statistics_fields` DISABLE KEYS */;
/*!40000 ALTER TABLE `grid_statistics_fields` ENABLE KEYS */;


-- 导出  表 linker.layout 结构
CREATE TABLE IF NOT EXISTS `layout` (
  `LAYOUT_ID` bigint(20) NOT NULL,
  `ENTITY` varchar(255) NOT NULL,
  `CONTENT` mediumtext NOT NULL,
  `TYPE` tinyint(4) NOT NULL,
  `ALIGN` varchar(15) DEFAULT 'horizontal',
  `SCRIPTS` text,
  PRIMARY KEY (`LAYOUT_ID`),
  UNIQUE KEY `Index 3` (`ENTITY`,`TYPE`),
  KEY `ENTITY` (`ENTITY`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='布局';

-- 正在导出表  linker.layout 的数据：~2 rows (大约)
/*!40000 ALTER TABLE `layout` DISABLE KEYS */;
INSERT INTO `layout` (`LAYOUT_ID`, `ENTITY`, `CONTENT`, `TYPE`, `ALIGN`, `SCRIPTS`) VALUES
	(11001712973278656, 'User', '[{"divider":{"id":1712973202827,"title":"基本信息"},"length":0},{"field":{"column":"LOGIN_NAME","creatable":true,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":true,"name":"loginName","rules":[{"required":true}],"system":true},"length":12},{"field":{"column":"user_name","creatable":true,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":true,"name":"userName","rules":[{"required":true}],"system":true},"length":12},{"field":{"citedLabel":"角色","cites":["Role"],"citesLabel":["角色"],"column":"ROLE_LIST","creatable":true,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":true,"name":"roleList","rules":[{"required":true}],"system":true},"length":12},{"field":{"citedLabel":"部门","column":"DEPT","creatable":false,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":false,"name":"dept","rules":[{"required":true}],"system":true},"length":12},{"field":{"column":"mobile_phone","creatable":true,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":true,"name":"mobilePhone","rules":[],"system":true},"length":24},{"field":{"column":"email","creatable":true,"disabled":false,"entityCode":1003,"entityName":"User","ghost":false,"modifiable":true,"name":"email","system":true},"length":12}]', 0, 'horizontal', '\n    // 当表单数据加载完成时\n    // __formDataReady(data => { console.log(data) })\n\n    // 当字段值改变时\n    // __formValueChange((field, value) => { console.log(field, value) })\n\n    // 表单记录保存之前\n    // __formBeforeSave(data => { console.log(data) })\n\n    // 获取字段值\n    // const value = __getFormFieldValue(\'field\')\n\n    // 设置字段值\n    // __setFormFieldValue(\'field\', value)\n\n    // 设置字段必填/非必填\n    // __setFormFieldRequired(\'field\', true/false)\n    '),
	(11001715924331128, 'Dept', '[{"divider":{"id":1715924325678,"title":"基本信息"},"length":0},{"field":{"citedLabel":"部门","column":"PARENT_DEPT","creatable":false,"disabled":false,"entityCode":1004,"entityName":"Dept","modifiable":false,"name":"parentDept","system":true},"length":12},{"field":{"column":"DEPT_NAME","creatable":false,"disabled":false,"entityCode":1004,"entityName":"Dept","modifiable":false,"name":"deptName","rules":[{"required":true}],"system":true},"length":12},{"field":{"column":"BU_MEN_DAI_MA","creatable":true,"disabled":false,"entityCode":1004,"entityName":"Dept","modifiable":true,"name":"bumendaima","system":false},"length":12}]', 0, 'horizontal', NULL);
/*!40000 ALTER TABLE `layout` ENABLE KEYS */;


-- 导出  表 linker.meta_entity 结构
CREATE TABLE IF NOT EXISTS `meta_entity` (
  `META_ENTITY_ID` bigint(20) NOT NULL,
  `NAME` varchar(200) NOT NULL COMMENT '实体内部名',
  `PHYSICAL_NAME` varchar(500) NOT NULL COMMENT '实体物理表名',
  `LABEL` varchar(500) NOT NULL COMMENT '实体显示名',
  `DESCRIPTION` varchar(500) DEFAULT NULL,
  `ENTITY_CODE` smallint(6) NOT NULL COMMENT '实体码',
  `ID_FIELD` varchar(500) NOT NULL COMMENT '实体id字段',
  `NAME_FIELD` varchar(500) NOT NULL COMMENT '实体名称字段',
  `ICON` varchar(50) DEFAULT 'ExcelOne' COMMENT '实体图标',
  `CUSTOMIZABLE` tinyint(4) NOT NULL DEFAULT '1',
  `SYSTEM` tinyint(4) NOT NULL DEFAULT '0',
  `ENABLE_PERMISSIONS` tinyint(4) NOT NULL DEFAULT '1',
  `ENABLE_RECYCLE_BIN` tinyint(4) NOT NULL DEFAULT '0',
  `ENABLE_APPROVAL` tinyint(4) NOT NULL DEFAULT '0',
  `MAIN_ENTITY` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`META_ENTITY_ID`),
  UNIQUE KEY `NAME` (`NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.meta_entity 的数据：~2 rows (大约)
/*!40000 ALTER TABLE `meta_entity` DISABLE KEYS */;
INSERT INTO `meta_entity` (`META_ENTITY_ID`, `NAME`, `PHYSICAL_NAME`, `LABEL`, `DESCRIPTION`, `ENTITY_CODE`, `ID_FIELD`, `NAME_FIELD`, `ICON`, `CUSTOMIZABLE`, `SYSTEM`, `ENABLE_PERMISSIONS`, `ENABLE_RECYCLE_BIN`, `ENABLE_APPROVAL`, `MAIN_ENTITY`) VALUES
	(10011707098257701, 'Dept', 'dept', '部门', '全局管理公司的整个部门，适用权限', 1004, 'deptId', 'deptName', 'Components', 1, 1, 1, 0, 0, NULL),
	(10011707098257767, 'User', 'user', '用户', '', 1003, 'userId', 'userName', 'User', 1, 1, 1, 0, 0, NULL);
/*!40000 ALTER TABLE `meta_entity` ENABLE KEYS */;


-- 导出  表 linker.meta_field 结构
CREATE TABLE IF NOT EXISTS `meta_field` (
  `META_FIELD_ID` bigint(20) NOT NULL,
  `ENTITY_CODE` smallint(6) NOT NULL COMMENT '字段所属实体码',
  `NAME` varchar(500) NOT NULL COMMENT '字段内部名称',
  `PHYSICAL_NAME` varchar(500) NOT NULL COMMENT '字段物理列名',
  `LABEL` varchar(500) NOT NULL COMMENT '字段显示名称',
  `FIELD_TYPE` varchar(50) NOT NULL COMMENT '字段类型',
  `CITED` varchar(500) DEFAULT NULL COMMENT '引用实体',
  `CITES` varchar(2500) DEFAULT NULL COMMENT '引用的实体（多）',
  `SYSTEM` tinyint(4) NOT NULL DEFAULT '0' COMMENT '系统字段',
  `DEFAULT_VALUE` varchar(1000) DEFAULT NULL COMMENT '默认值',
  `CREATABLE` tinyint(4) NOT NULL COMMENT '允许创建',
  `MODIFIABLE` tinyint(4) NOT NULL COMMENT '允许修改',
  `DECIMAL_EXTRA` varchar(1000) DEFAULT NULL COMMENT '小数额外配置',
  `INT_EXTRA` varchar(1000) DEFAULT NULL COMMENT '整数额外配置',
  `SERIAL_NUMBER_EXTRA` varchar(1000) DEFAULT NULL COMMENT '序列号额外配置',
  `GHOST` tinyint(4) DEFAULT NULL COMMENT '幽灵字段，不显示，只能通过手动设置',
  `CITE_EXTRA` text,
  PRIMARY KEY (`META_FIELD_ID`),
  UNIQUE KEY `NAME` (`NAME`,`ENTITY_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.meta_field 的数据：~15 rows (大约)
/*!40000 ALTER TABLE `meta_field` DISABLE KEYS */;
INSERT INTO `meta_field` (`META_FIELD_ID`, `ENTITY_CODE`, `NAME`, `PHYSICAL_NAME`, `LABEL`, `FIELD_TYPE`, `CITED`, `CITES`, `SYSTEM`, `DEFAULT_VALUE`, `CREATABLE`, `MODIFIABLE`, `DECIMAL_EXTRA`, `INT_EXTRA`, `SERIAL_NUMBER_EXTRA`, `GHOST`, `CITE_EXTRA`) VALUES
	(10021707098257148, 1003, 'loginName', 'LOGIN_NAME', '登录名', 'text', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257716, 1003, 'roleList', 'ROLE_LIST', '角色', 'cite_list', 'Role', 'Role', 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257726, 1003, 'dept', 'DEPT', '部门', 'cite', 'Dept', NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257741, 1003, 'userId', 'user_id', '用户ID', 'id', NULL, NULL, 1, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL),
	(10021707098257742, 1003, 'userName', 'user_name', '用户姓名', 'text', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257743, 1003, 'email', 'email', '邮箱', 'email', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257744, 1003, 'mobilePhone', 'mobile_phone', '手机', 'phone', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257745, 1003, 'passwd', 'PASSWD', '密码', 'password', NULL, NULL, 1, NULL, 0, 0, NULL, NULL, NULL, 1, NULL),
	(10021707098257746, 1004, 'deptId', 'DEPT_ID', '部门ID', 'id', NULL, NULL, 1, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL),
	(10021707098257747, 1004, 'deptName', 'DEPT_NAME', '部门名称', 'text', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021707098257748, 1004, 'parentDept', 'PARENT_DEPT', '上级部门', 'cite', 'Dept', NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021713496065001, 1003, 'description', 'DESCRIPTION', '简介描述', 'textarea', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL),
	(10021713496065002, 1003, 'avatar', 'AVATAR', '头像', 'text', NULL, NULL, 1, NULL, 1, 1, NULL, NULL, NULL, 1, NULL);
/*!40000 ALTER TABLE `meta_field` ENABLE KEYS */;


-- 导出  表 linker.navigation 结构
CREATE TABLE IF NOT EXISTS `navigation` (
  `NAVIGATION_ID` bigint(20) NOT NULL,
  `CONTENT` text NOT NULL COMMENT '内容',
  `OWN_USER` bigint(20) NOT NULL,
  `PUBLIC` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`NAVIGATION_ID`),
  UNIQUE KEY `OWN_USER` (`OWN_USER`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='导航';

-- 正在导出表  linker.navigation 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `navigation` DISABLE KEYS */;
/*!40000 ALTER TABLE `navigation` ENABLE KEYS */;


-- 导出  表 linker.notification 结构
CREATE TABLE IF NOT EXISTS `notification` (
  `NOTIFICATION_ID` bigint(20) NOT NULL,
  `SENDER` bigint(20) NOT NULL,
  `RECEIVER` bigint(20) NOT NULL,
  `RELATE_ID` char(50) DEFAULT NULL,
  `TYPE` char(50) NOT NULL,
  `CONTENT` text NOT NULL,
  `READ` tinyint(4) NOT NULL DEFAULT '0',
  `PUSHED` tinyint(4) NOT NULL DEFAULT '0',
  `NOTIFICATION_TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`NOTIFICATION_ID`),
  KEY `Index 2` (`RECEIVER`,`PUSHED`),
  KEY `Index 3` (`RECEIVER`,`READ`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息通知';

-- 正在导出表  linker.notification 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `notification` DISABLE KEYS */;
/*!40000 ALTER TABLE `notification` ENABLE KEYS */;


-- 导出  表 linker.open_api_key 结构
CREATE TABLE IF NOT EXISTS `open_api_key` (
  `OPEN_API_KEY_ID` bigint(20) NOT NULL,
  `KEY_VALUE` varchar(64) NOT NULL COMMENT 'API Key值',
  `DESCRIPTION` varchar(200) DEFAULT NULL COMMENT '描述',
  `BIND_USER` bigint(20) NOT NULL COMMENT '绑定用户ID，继承其权限',
  `ENABLED` tinyint(1) NOT NULL DEFAULT '1',
  `EXPIRE_TIME` datetime DEFAULT NULL COMMENT 'NULL表示永不过期',
  `CREATED_BY` bigint(20) DEFAULT NULL,
  `CREATED_TIME` datetime DEFAULT NULL,
  PRIMARY KEY (`OPEN_API_KEY_ID`),
  UNIQUE KEY `KEY_VALUE` (`KEY_VALUE`),
  KEY `idx_key_value` (`KEY_VALUE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='对外开放API Key';

-- 正在导出表  linker.open_api_key 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `open_api_key` DISABLE KEYS */;
/*!40000 ALTER TABLE `open_api_key` ENABLE KEYS */;


-- 导出  表 linker.options 结构
CREATE TABLE IF NOT EXISTS `options` (
  `option_id` bigint(20) NOT NULL,
  `entity_code` int(11) NOT NULL,
  `field_name` varchar(255) NOT NULL,
  `options` text NOT NULL,
  PRIMARY KEY (`option_id`),
  UNIQUE KEY `entity_code` (`entity_code`,`field_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='多选字典表';

-- 正在导出表  linker.options 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `options` DISABLE KEYS */;
/*!40000 ALTER TABLE `options` ENABLE KEYS */;


-- 导出  表 linker.panel 结构
CREATE TABLE IF NOT EXISTS `panel` (
  `PANEL_ID` bigint(20) NOT NULL,
  `PANEL_NAME` varchar(50) NOT NULL,
  `GROUP_NAME` varchar(50) NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  `APPLY_ALL` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`PANEL_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='首页面板';

-- 正在导出表  linker.panel 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `panel` DISABLE KEYS */;
/*!40000 ALTER TABLE `panel` ENABLE KEYS */;


-- 导出  表 linker.panel_component 结构
CREATE TABLE IF NOT EXISTS `panel_component` (
  `COMPONENT_ID` bigint(20) NOT NULL,
  `PANEL_ID` bigint(20) NOT NULL COMMENT '首页面板',
  `COMPONENT_TYPE` varchar(50) NOT NULL COMMENT '组件类型',
  `COMPONENT_NAME` varchar(255) NOT NULL COMMENT '组件名称',
  `COMPONENT_LAYOUT` varchar(255) DEFAULT NULL COMMENT '定位配置',
  `COMPONENT_CONFIG` text NOT NULL COMMENT '组件配置',
  `SOURCE_ENTITY` varchar(255) NOT NULL,
  `CONDITION` text,
  `OWN_USER` bigint(20) NOT NULL,
  `CREATED_BY` bigint(20) NOT NULL,
  `UPDATED_BY` bigint(20) NOT NULL,
  `OWN_DEPT` bigint(20) NOT NULL,
  `UPDATED_TIME` datetime NOT NULL,
  `CREATED_TIME` datetime NOT NULL,
  PRIMARY KEY (`COMPONENT_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='首页面板组件';

-- 正在导出表  linker.panel_component 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `panel_component` DISABLE KEYS */;
/*!40000 ALTER TABLE `panel_component` ENABLE KEYS */;


-- 导出  表 linker.progress_task 结构
CREATE TABLE IF NOT EXISTS `progress_task` (
  `TASK_ID` bigint(20) NOT NULL,
  `TASK_KEY` varchar(50) NOT NULL,
  `TASK_NAME` varchar(50) NOT NULL,
  `OWN_USER` bigint(20) NOT NULL,
  `SUBMIT_TIME` datetime NOT NULL,
  `END_TIME` datetime DEFAULT NULL,
  `RESULT` text NOT NULL,
  `COMPLETED` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TASK_ID`),
  KEY `TASK_KEY` (`TASK_KEY`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务进度';

-- 正在导出表  linker.progress_task 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `progress_task` DISABLE KEYS */;
/*!40000 ALTER TABLE `progress_task` ENABLE KEYS */;


-- 导出  表 linker.record_locking 结构
CREATE TABLE IF NOT EXISTS `record_locking` (
  `RECORD_LOCKING_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `LOCK_PROMPT` varchar(255) NOT NULL,
  `ENTITY_NAME` varchar(500) NOT NULL,
  `CONDITION` text,
  `SCOPE` text,
  PRIMARY KEY (`RECORD_LOCKING_ID`),
  KEY `ENTITY_NAME` (`ENTITY_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据锁定';

-- 正在导出表  linker.record_locking 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `record_locking` DISABLE KEYS */;
/*!40000 ALTER TABLE `record_locking` ENABLE KEYS */;


-- 导出  表 linker.record_update_log 结构
CREATE TABLE IF NOT EXISTS `record_update_log` (
  `RECORD_UPDATE_LOG_ID` bigint(20) NOT NULL,
  `ENTITY_NAME` varchar(255) NOT NULL,
  `RECORD_ID` varchar(50) NOT NULL,
  `RECORD_LABEL` varchar(255) NOT NULL,
  `CONTENT` text NOT NULL,
  `UPDATED_BY` bigint(20) NOT NULL,
  `UPDATED_TIME` datetime NOT NULL,
  `EVENT_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`RECORD_UPDATE_LOG_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.record_update_log 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `record_update_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `record_update_log` ENABLE KEYS */;


-- 导出  表 linker.relate_menus 结构
CREATE TABLE IF NOT EXISTS `relate_menus` (
  `RELATE_MENU_ID` bigint(20) NOT NULL,
  `ENTITY` varchar(500) NOT NULL,
  `CONTENT` text NOT NULL,
  PRIMARY KEY (`RELATE_MENU_ID`),
  UNIQUE KEY `ENTITY` (`ENTITY`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='视图相关项';

-- 正在导出表  linker.relate_menus 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `relate_menus` DISABLE KEYS */;
/*!40000 ALTER TABLE `relate_menus` ENABLE KEYS */;


-- 导出  表 linker.role 结构
CREATE TABLE IF NOT EXISTS `role` (
  `ROLE_ID` bigint(20) NOT NULL,
  `ROLE_NAME` varchar(50) NOT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色';

-- 正在导出表  linker.role 的数据：~2 rows (大约)
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` (`ROLE_ID`, `ROLE_NAME`, `DESCRIPTION`) VALUES
	(10050000000000000, '超级管理员', '系统后台设置、数据操作'),
	(10050000000000001, '系统管理员', '数据操作');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;


-- 导出  表 linker.role_permission 结构
CREATE TABLE IF NOT EXISTS `role_permission` (
  `ROLE_PERMISSION_Id` bigint(20) NOT NULL,
  `ROLE_ID` bigint(20) NOT NULL COMMENT '角色ID',
  `PERMISSION_CODE` char(5) NOT NULL COMMENT '权限CODE',
  `DEPTH` tinyint(4) NOT NULL COMMENT '权限深度',
  `EXTRAS` text COMMENT '附加内容',
  PRIMARY KEY (`ROLE_PERMISSION_Id`),
  UNIQUE KEY `ROLE_ID_PERMISSION_CODE` (`ROLE_ID`,`PERMISSION_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色权限信息';

-- 正在导出表  linker.role_permission 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `role_permission` DISABLE KEYS */;
/*!40000 ALTER TABLE `role_permission` ENABLE KEYS */;


-- 导出  表 linker.subject 结构
CREATE TABLE IF NOT EXISTS `subject` (
  `SUBJECT_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `FULL_NAME` varchar(2000) NOT NULL,
  `PARENT_SUBJECT_ID` bigint(20) DEFAULT NULL,
  `TYPE` bigint(20) NOT NULL,
  PRIMARY KEY (`SUBJECT_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分类数据';

-- 正在导出表  linker.subject 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject` ENABLE KEYS */;


-- 导出  表 linker.system_parameters 结构
CREATE TABLE IF NOT EXISTS `system_parameters` (
  `SYSTEM_PARAMETERS_ID` bigint(20) NOT NULL,
  `PARAMETER_NAME` varchar(255) NOT NULL,
  `PARAMETER_VALUE` text NOT NULL,
  PRIMARY KEY (`SYSTEM_PARAMETERS_ID`),
  KEY `PARAMETER_NAME` (`PARAMETER_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统参数';

-- 正在导出表  linker.system_parameters 的数据：~1 rows (大约)
/*!40000 ALTER TABLE `system_parameters` DISABLE KEYS */;
INSERT INTO `system_parameters` (
    `SYSTEM_PARAMETERS_ID`,
    `PARAMETER_NAME`,
    `PARAMETER_VALUE`
) VALUES (
     11161762148120919,
     'enterprise',
     JSON_OBJECT(
             'id', REPLACE(UUID(), '-', ''),
             'appKey', CONCAT('ek-', MD5(UUID()))
     )
 );
/*!40000 ALTER TABLE `system_parameters` ENABLE KEYS */;


-- 导出  表 linker.user 结构
CREATE TABLE IF NOT EXISTS `user` (
  `USER_ID` bigint(20) NOT NULL,
  `USER_NAME` varchar(50) NOT NULL,
  `LOGIN_NAME` varchar(50) NOT NULL,
  `DEPT` bigint(20) NOT NULL,
  `MOBILE_PHONE` varchar(50) DEFAULT NULL,
  `EMAIL` varchar(50) DEFAULT NULL,
  `PASSWD` varchar(50) NOT NULL,
  `ROLE_LIST` text NOT NULL,
  `AVATAR` varchar(255) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`USER_ID`),
  UNIQUE KEY `LOGIN_NAME` (`LOGIN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 正在导出表  linker.user 的数据：~0 rows (大约)
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
