-- MySQL dump 10.13  Distrib 8.0.36, for Linux (x86_64)
--
-- Host: 192.168.35.206    Database: admin_data
-- ------------------------------------------------------
-- Server version	8.0.36

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Position to start replication or point-in-time recovery from
--

-- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000900', MASTER_LOG_POS=870325121;

--
-- Current Database: `admin_data`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `admin_data` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `admin_data`;

--
-- Table structure for table `point_info`
--

DROP TABLE IF EXISTS `point_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `point_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort_number` int DEFAULT NULL COMMENT '打点顺序',
  `lat02` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng02` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `lat84` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `lng84` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `airspace_id` int DEFAULT NULL COMMENT '关联的空域id',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='空域点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_area_config`
--

DROP TABLE IF EXISTS `sys_area_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_area_config` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `code` varchar(128) NOT NULL COMMENT '标识唯一区域，街道以上区域采用addcode代替。（东莞精确到街道，此时采用上级addcode+街道名称拼音首字母）',
  `parent_code` varchar(64) DEFAULT NULL COMMENT '父节点code',
  `city_code` varchar(20) DEFAULT NULL COMMENT '城市编码（每个城市不同）',
  `ad_code` varchar(20) DEFAULT NULL COMMENT '街道没有独有的adcode，均继承父类（区县）的adcode',
  `level` varchar(20) DEFAULT NULL COMMENT '区域类型。country:国家，province:省份；city:地市；district：区县 street:街道',
  `name` varchar(64) DEFAULT NULL COMMENT '名称',
  `longitude` varchar(32) DEFAULT NULL COMMENT '中心坐标点经度',
  `latitude` varchar(32) DEFAULT NULL COMMENT '中心坐标点维度',
  `source` varchar(32) DEFAULT NULL COMMENT 'gaodemap:高德地图；man:人工',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `code` (`code`) USING BTREE,
  KEY `parent_code` (`parent_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=164899 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_area_pinyin`
--

DROP TABLE IF EXISTS `sys_area_pinyin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_area_pinyin` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL COMMENT '名称',
  `pinyin` varchar(128) DEFAULT NULL COMMENT '拼音',
  `pinyin2` varchar(128) DEFAULT NULL COMMENT '修正后拼音',
  `create_at` timestamp NULL DEFAULT NULL,
  `update_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8146 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_cipher`
--

DROP TABLE IF EXISTS `sys_cipher`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_cipher` (
  `id` bigint NOT NULL COMMENT '主键id',
  `company_id` bigint DEFAULT NULL COMMENT '公司id，为null表示中移凌云平台',
  `cipher_obj` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密对象',
  `version` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '版本号',
  `is_his` bit(1) DEFAULT b'0' COMMENT '是否是历史数据',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_cipher_company` (`company_id`,`version`,`is_his`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='统一密钥表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_cipher_params`
--

DROP TABLE IF EXISTS `sys_cipher_params`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_cipher_params` (
  `id` bigint NOT NULL COMMENT '主键id',
  `cipher_id` bigint DEFAULT NULL COMMENT '加解密id',
  `cipher_impl_mode` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加解密实现方式',
  `cipher_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加解密类型',
  `cipher_params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '加解密参数',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`),
  KEY `idx_cipher_id` (`cipher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='统一密钥参数表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dictionary`
--

DROP TABLE IF EXISTS `sys_dictionary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dictionary` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '字典id',
  `pid` bigint DEFAULT NULL COMMENT '上级id，如果是字典类型，pid为空',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码，全局唯一',
  `type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '类型编码',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字典描述',
  `order_by` int NOT NULL COMMENT '同级的顺序',
  `level` int NOT NULL COMMENT '层次级别，从0开始，字典类型为0',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否被禁用，0：正常，1被禁用',
  `is_del` bit(1) NOT NULL COMMENT '是否删除，0:正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_dic_is_frozen` (`is_frozen`) USING BTREE COMMENT '是否禁用的索引',
  KEY `index_dic_is_del` (`is_del`) USING BTREE COMMENT '是否删除索引',
  KEY `index_dic_pid` (`pid`) USING BTREE COMMENT '父级id的索引',
  KEY `type_code` (`type_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1275017029476155393 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='数据字典详细属性表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dictionary_attr`
--

DROP TABLE IF EXISTS `sys_dictionary_attr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dictionary_attr` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `type_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典类型编码',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码',
  `lang` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '语言标识',
  `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '显示名称',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_dic_item` (`type_code`,`code`,`lang`) USING BTREE COMMENT '语言项唯一标识',
  KEY `type_code` (`type_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3277 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='字典各语言的属性';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dictionary_type`
--

DROP TABLE IF EXISTS `sys_dictionary_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dictionary_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '字典类型id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典类型名称',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典类型编码，全局唯一',
  `is_del` bit(1) NOT NULL COMMENT '是否删除，0:正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_dic_code` (`code`) USING BTREE COMMENT 'code的唯一编码',
  KEY `index_dic_is_del` (`is_del`) USING BTREE COMMENT '是否删除索引'
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='数据字典详细属性表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_language`
--

DROP TABLE IF EXISTS `sys_language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_language` (
  `id` int NOT NULL AUTO_INCREMENT,
  `label` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '标签名称',
  `lang` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '语言标识',
  `order_by` int DEFAULT NULL COMMENT '排序',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_default` bit(1) DEFAULT b'0' COMMENT '是否是默认语言，所有语言中只能有一种',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='已经拥有的语言';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_dev_action_match`
--

DROP TABLE IF EXISTS `uav_dev_action_match`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_dev_action_match` (
  `id` int NOT NULL AUTO_INCREMENT,
  `dev_type` varchar(100) NOT NULL COMMENT '设备类别',
  `dev_model` varchar(100) NOT NULL COMMENT '设备型号',
  `dev_action` varchar(2200) NOT NULL COMMENT '设备动作列表',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建人',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改人',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `uav_dev_action_match_dev_type` (`dev_type`,`dev_model`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='设备动作匹配表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_dev_type_match`
--

DROP TABLE IF EXISTS `uav_dev_type_match`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_dev_type_match` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uav_model` varchar(100) NOT NULL COMMENT '无人机型号',
  `hangar_model` varchar(1100) NOT NULL COMMENT '机库型号列表',
  `load_model` varchar(2200) NOT NULL COMMENT '载荷型号列表',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建人',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改人',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `INDEX_uav_dev_type_match_uav_model` (`uav_model`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='设备型号匹配表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar_model`
--

DROP TABLE IF EXISTS `uav_hangar_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar_model` (
  `model_id` varchar(20) NOT NULL COMMENT '机库型号ID',
  `mnf_name` varchar(100) DEFAULT NULL,
  `model_name` varchar(100) DEFAULT NULL,
  `hangar_type` varchar(100) DEFAULT NULL,
  `elec_min` int DEFAULT NULL COMMENT '无人机换电时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `free_hours` int DEFAULT NULL COMMENT '无故障时长',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `man_var` int DEFAULT NULL COMMENT '机械手自由度',
  `mech_pot` varchar(4) DEFAULT NULL COMMENT '机械重复定位精度',
  `prot_level` varchar(100) DEFAULT NULL,
  `length` int DEFAULT NULL COMMENT '长',
  `width` int DEFAULT NULL COMMENT '宽',
  `height` int DEFAULT NULL COMMENT '高',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `material` varchar(1100) DEFAULT NULL,
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `picture` text COMMENT '图片',
  PRIMARY KEY (`model_id`) USING BTREE,
  KEY `INDEX_uav_hangar_model_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_hangar_model_mnf_name` (`mnf_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='机库型号信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_cam_model`
--

DROP TABLE IF EXISTS `uav_load_cam_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_cam_model` (
  `model_id` varchar(20) NOT NULL COMMENT '载荷型号ID',
  `model_name` varchar(100) DEFAULT NULL,
  `mnf_name` varchar(100) DEFAULT NULL,
  `exp_mode` varchar(1100) DEFAULT NULL,
  `work_mode` varchar(1100) DEFAULT NULL,
  `balance` varchar(1100) DEFAULT NULL COMMENT '白平衡',
  `img_format` varchar(1100) DEFAULT NULL,
  `img_size` varchar(1100) DEFAULT NULL,
  `cam_mode` varchar(1100) DEFAULT NULL,
  `shut_speed` varchar(1100) DEFAULT NULL,
  `img_iso` varchar(1100) DEFAULT NULL,
  `video_format` varchar(1100) DEFAULT NULL,
  `video_display` varchar(1100) DEFAULT NULL,
  `video_iso` varchar(1100) DEFAULT NULL,
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `pos_eva` int DEFAULT NULL COMMENT '正俯仰可控范围',
  `neg_eva` int DEFAULT NULL COMMENT '负俯仰可控范围',
  `pos_trans` int DEFAULT NULL COMMENT '正平移可控范围',
  `neg_trans` int DEFAULT NULL COMMENT '负平移可控范围',
  `pos_roll` int DEFAULT NULL COMMENT '正横滚可控范围',
  `neg_roll` int DEFAULT NULL COMMENT '负横滚可控范围',
  `eva_ctr_speed` int DEFAULT NULL COMMENT '俯仰最大控制速度',
  `trans_ctr_speed` int DEFAULT NULL COMMENT '水平最大控制速度',
  `roll_ctr_speed` int DEFAULT NULL COMMENT '横滚最大控制速度',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建人',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改人',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `exp` json DEFAULT NULL COMMENT '属性字段',
  `picture` text COMMENT '图片',
  PRIMARY KEY (`model_id`) USING BTREE,
  KEY `INDEX_uav_load_cam_model_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_load_cam_model_mnf_name` (`mnf_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='摄像头载荷型号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_model`
--

DROP TABLE IF EXISTS `uav_load_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_model` (
  `model_id` varchar(20) NOT NULL COMMENT '载荷型号ID',
  `model_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '载荷型号名称',
  `mnf_name` varchar(100) NOT NULL COMMENT '载荷型号所属厂家',
  `param` json DEFAULT NULL COMMENT '属性字段',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建人',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改人',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `picture` text COMMENT '图片',
  PRIMARY KEY (`model_id`),
  KEY `idx_uav_load_model_model_type` (`model_type`),
  KEY `idx_uav_load_model_model_name` (`model_name`),
  KEY `idx_uav_load_model_mnf_name` (`mnf_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通用载荷型号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_normal`
--

DROP TABLE IF EXISTS `uav_load_normal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_normal` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `picture` varchar(500) DEFAULT NULL COMMENT '图片路径列表',
  `load_spec` varchar(2100) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `exp` json DEFAULT NULL COMMENT '属性字段',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`load_code`),
  KEY `idx_uav_load_normal_load_type` (`load_type`),
  KEY `idx_uav_load_normal_model_name` (`model_name`),
  KEY `idx_uav_load_normal_mnf_name` (`mnf_name`),
  KEY `idx_uav_load_normal_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通用载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_spk_model`
--

DROP TABLE IF EXISTS `uav_load_spk_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_spk_model` (
  `model_id` varchar(20) NOT NULL COMMENT '载荷型号ID',
  `model_name` varchar(100) DEFAULT NULL,
  `mnf_name` varchar(100) DEFAULT NULL,
  `spk_dist` int DEFAULT NULL COMMENT '扩音距离',
  `max_volume` int DEFAULT NULL COMMENT '最大音量',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建人',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改人',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `picture` text COMMENT '图片',
  PRIMARY KEY (`model_id`) USING BTREE,
  KEY `INDEX_uav_load_spk_model_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_load_spk_model_mnf_name` (`mnf_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='喊话器载荷型号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_plane_model`
--

DROP TABLE IF EXISTS `uav_plane_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_plane_model` (
  `model_id` varchar(20) NOT NULL COMMENT '无人机型号ID',
  `model_name` varchar(100) DEFAULT NULL,
  `mnf_name` varchar(100) DEFAULT NULL,
  `shape` varchar(100) DEFAULT NULL,
  `size` varchar(100) DEFAULT NULL,
  `max_speed` int DEFAULT NULL COMMENT '最大航速',
  `hight` int DEFAULT NULL COMMENT '飞行高度',
  `max_hours` int DEFAULT NULL COMMENT '最大续航时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `mix_tmp` varchar(3) DEFAULT NULL COMMENT '最低温度',
  `max_tmp` varchar(3) DEFAULT NULL COMMENT '最高温度',
  `max_load` varchar(8) DEFAULT NULL,
  `hight_range` varchar(6) DEFAULT NULL COMMENT '最大飞行海拔高度',
  `stay_time` int DEFAULT NULL COMMENT '满载悬停时间',
  `material` varchar(1100) DEFAULT NULL,
  `paddle` int DEFAULT NULL COMMENT '桨数',
  `wheelbase` int DEFAULT NULL COMMENT '轴距',
  `weight` varchar(8) DEFAULT NULL,
  `extra_if` varchar(1100) DEFAULT NULL,
  `volume` varchar(6) DEFAULT NULL COMMENT '体积（长*宽*高 mm）',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `picture` text COMMENT '图片',
  PRIMARY KEY (`model_id`) USING BTREE,
  KEY `INDEX_uav_plane_model_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_plane_model_mnf_name` (`mnf_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='无人机型号信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_area_limit`
--

DROP TABLE IF EXISTS `zyd_area_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_area_limit` (
  `airs_no` int NOT NULL AUTO_INCREMENT COMMENT '空域序号',
  `area_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域名称',
  `area_type` varchar(11) NOT NULL COMMENT '空域类型，1为临时飞行区，2为限制区，3为禁区，4为净空区，5为危险区',
  `area_range` text NOT NULL COMMENT '空域范围',
  `shape_type` int NOT NULL COMMENT '空域范围类型：1代表圆形，2代表多边形',
  `top_hgt` int DEFAULT NULL COMMENT '顶高',
  `bottom_hgt` int DEFAULT NULL COMMENT '底高',
  `alert_start` datetime DEFAULT NULL COMMENT '告警起始时间',
  `alert_end` datetime DEFAULT NULL COMMENT '告警结束时间',
  `def_usr_id` varchar(20) DEFAULT NULL COMMENT '创建用户',
  `def_date` datetime DEFAULT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) DEFAULT NULL COMMENT '修改用户',
  `upd_date` datetime DEFAULT NULL COMMENT '修改日期',
  `is_delete` tinyint(1) DEFAULT '0' COMMENT '删除标志，-1为删除，0为未删除',
  `radius` int DEFAULT NULL COMMENT '空域半径',
  PRIMARY KEY (`airs_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=769 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='空域限制表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'admin_data'
--

--
-- Dumping routines for database 'admin_data'
--

--
-- Current Database: `admin_user`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `admin_user` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `admin_user`;

--
-- Table structure for table `sys_action_api`
--

DROP TABLE IF EXISTS `sys_action_api`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_action_api` (
  `action_id` bigint NOT NULL COMMENT '按钮id',
  `api_id` bigint NOT NULL COMMENT '接口id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`action_id`,`api_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_gateway_request_log`
--

DROP TABLE IF EXISTS `sys_gateway_request_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_gateway_request_log` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求ip地址',
  `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法',
  `service_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微服务名称',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求路径',
  `client_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户端id',
  `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户客户端agent',
  `request_time` timestamp NULL DEFAULT NULL COMMENT '请求时间',
  `response_time` timestamp NULL DEFAULT NULL COMMENT '响应时间',
  `cost_time` int DEFAULT NULL COMMENT '执行消耗时间',
  `http_status` int DEFAULT NULL COMMENT '请求状态',
  `is_success` bit(1) DEFAULT NULL COMMENT '业务是否请求成功',
  `platform_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台类型',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
  `code` int DEFAULT NULL COMMENT '业务响应码',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_create_at` (`create_at`),
  KEY `idx_request_time` (`request_time`) USING BTREE,
  KEY `idx_request_log_path` (`path`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=128338862 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='请求日志';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_group_resource_mapping`
--

DROP TABLE IF EXISTS `sys_group_resource_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_group_resource_mapping` (
  `id` bigint NOT NULL COMMENT '资源组与资源的映射id',
  `resource_group_id` bigint NOT NULL COMMENT '资源组id',
  `resource_id` bigint NOT NULL COMMENT '资源id',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_group_resource_group` (`resource_group_id`,`resource_id`) USING BTREE,
  KEY `idx_group_resource_resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='资源组与资源的映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org`
--

DROP TABLE IF EXISTS `sys_org`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org` (
  `id` bigint NOT NULL COMMENT 'id',
  `pid` bigint DEFAULT NULL COMMENT '父级id',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '名称',
  `type` smallint DEFAULT NULL COMMENT '机构类型，0:公司，1:机构',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '机构描述',
  `company_id` bigint DEFAULT NULL COMMENT '所属公司id，如果是公司，则为空',
  `unified_credit_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '统一信用代码',
  `unified_credit_img` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '统一信用图片',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否禁用，0:未禁用，1禁用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '0:为正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_platform`
--

DROP TABLE IF EXISTS `sys_platform`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_platform` (
  `id` bigint NOT NULL COMMENT 'id',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台名称',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '平台唯一编码',
  `client_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用的服务id，不能修改',
  `client_secret` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户端密钥',
  `group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '平台组',
  `back_img` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '后台图标地址',
  `front_img` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图片地址，供前端使用',
  `provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台提供商',
  `check_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务检查地址',
  `back_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '后台地址',
  `outer_link` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '外网地址',
  `inner_link` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '内网地址',
  `redirect_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调地址，携带code的回调地址',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '说明',
  `order` int NOT NULL COMMENT '越大排越前',
  `is_top` bit(1) DEFAULT b'0' COMMENT '是否置顶',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否被禁用',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否被删除',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  `is_display` bit(1) NOT NULL DEFAULT b'1' COMMENT '是否显示：0-不显示 1-显示',
  `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `ext` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展字段',
  `is_login_jump` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否登录跳转：0-否',
  `solution_link` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '解决方案地址',
  `user_info_interface` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户信息接口',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_platform_attr`
--

DROP TABLE IF EXISTS `sys_platform_attr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_platform_attr` (
  `id` bigint NOT NULL COMMENT '语言id',
  `type` smallint DEFAULT NULL COMMENT '多语言，类型，0:名称，1：描述',
  `platform_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台类型',
  `lang` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '语言',
  `value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '语言值',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建用户',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_platform_code` (`platform_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='平台多语言版本';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource`
--

DROP TABLE IF EXISTS `sys_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource` (
  `id` bigint NOT NULL COMMENT 'id',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源标识，菜单类型以 MENU_ 开头，按钮类型以 ACTION_ 开头，接口类型以 API_ 开头',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源名称',
  `icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源图标，针对菜单',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源描述',
  `type` smallint DEFAULT NULL COMMENT '资源类型，0:菜单，1:按钮',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源路径',
  `pid` bigint DEFAULT NULL COMMENT '菜单拥有上级菜单id，按钮的上级id表示菜单的按钮',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `service_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务的id',
  `order` int DEFAULT NULL COMMENT '展示顺序，值越小，越在前',
  `level` int DEFAULT '1' COMMENT '菜单层级',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统资源表，包括菜单（MENU），按钮（ACTION），接口（API）';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_api`
--

DROP TABLE IF EXISTS `sys_resource_api`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_api` (
  `id` bigint NOT NULL,
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'api编码，以API_开头',
  `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口名称',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口描述',
  `service_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务id',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口路径',
  `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法。POST,GET,DELETE 等',
  `is_open` bit(1) DEFAULT b'0' COMMENT '是否公开，0:内部接口，1:公开接口，可不做权限校验',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_attr`
--

DROP TABLE IF EXISTS `sys_resource_attr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_attr` (
  `id` bigint NOT NULL,
  `pid` bigint DEFAULT NULL COMMENT '父级资源id',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码',
  `lang` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '语言标识',
  `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '显示名称',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_dic_item` (`code`,`lang`) USING BTREE COMMENT '语言项唯一标识'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='字典各语言的属性';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_group`
--

DROP TABLE IF EXISTS `sys_resource_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_group` (
  `id` bigint NOT NULL COMMENT '权限组id',
  `code` varchar(255) NOT NULL COMMENT '权限组编码',
  `name` text COMMENT '资源组名称，多语言',
  `pid` bigint DEFAULT NULL COMMENT '上级id',
  `depends_on` text COMMENT '依赖的组集合',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT '1' COMMENT '创建用户id',
  `update_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`),
  KEY `idx_resource_group_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_group_template`
--

DROP TABLE IF EXISTS `sys_resource_group_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_group_template` (
  `id` bigint NOT NULL COMMENT '模板id',
  `name` text NOT NULL COMMENT '模板名称格式为{"zh_CN":"","zh_TW":"","en_US":""}',
  `code` varchar(255) DEFAULT NULL COMMENT '权限模板编码，可为空',
  `group_ids` text COMMENT '资源组id集合，格式2,3,5,6',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT '1' COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT '1' COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组模板';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role`
--

DROP TABLE IF EXISTS `sys_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role` (
  `id` bigint NOT NULL,
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色名称',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色标志符',
  `desc` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色描述',
  `company_id` bigint DEFAULT NULL COMMENT '公司id',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否锁定,0:正常，1:锁定',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志：0:正常，1删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_sys_role_company_id_code` (`code`,`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role_group_mapping`
--

DROP TABLE IF EXISTS `sys_role_group_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role_group_mapping` (
  `id` bigint NOT NULL COMMENT '角色资源组映射id',
  `role_id` bigint NOT NULL COMMENT '角色id',
  `resource_group_id` bigint NOT NULL COMMENT '资源组id',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建的用户id，oms管理用户id',
  PRIMARY KEY (`id`),
  KEY `idx_role_group` (`role_id`,`resource_group_id`),
  KEY `idx_role_group_group_id` (`resource_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色与资源组映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role_resource`
--

DROP TABLE IF EXISTS `sys_role_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role_resource` (
  `role_id` bigint NOT NULL COMMENT '角色id',
  `resource_id` bigint NOT NULL COMMENT '资源id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`role_id`,`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='仅保存角色和菜单还有角色和按钮的关联关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_tenant_config`
--

DROP TABLE IF EXISTS `sys_tenant_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_tenant_config` (
  `id` bigint NOT NULL COMMENT '主键id',
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '租户配额的标识',
  `is_encrypt` bit(1) DEFAULT b'0' COMMENT '是否加密',
  `secret_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '加密密钥',
  `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '加密统一密钥版本号',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '租户配额内容',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_tenlant_key` (`key`) USING BTREE COMMENT '租户配置key'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='租户配额表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user`
--

DROP TABLE IF EXISTS `sys_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user` (
  `id` bigint NOT NULL COMMENT '用户id',
  `is_system_admin` bit(1) DEFAULT b'0' COMMENT '是否是系统管理员，拥有所有权限1:是，0:否',
  `is_company_admin` bit(1) DEFAULT b'0' COMMENT '公司管理员，创建公司，初始化管理员0:否，1:是',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户昵称',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `job_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '工号',
  `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户手机号',
  `email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户邮箱',
  `salt` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密随机盐',
  `password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '密码',
  `avatar` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户头像地址',
  `org_id` bigint DEFAULT NULL COMMENT '用户所属机构id,如果是系统管理员，则机构为空',
  `company_id` bigint DEFAULT NULL COMMENT '公司id，如果 是系统管理员，公司id为空',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_login`
--

DROP TABLE IF EXISTS `sys_user_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_login` (
  `user_id` bigint NOT NULL COMMENT '用户id',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆id',
  `last_login_time` timestamp NULL DEFAULT NULL COMMENT '最后登陆时间',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_resource`
--

DROP TABLE IF EXISTS `sys_user_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_resource` (
  `user_id` bigint NOT NULL COMMENT '用户id',
  `resource_id` bigint NOT NULL COMMENT '资源id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`,`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='保存了用户与菜单，以及用户与按钮的关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_role`
--

DROP TABLE IF EXISTS `sys_user_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户id',
  `role_id` bigint NOT NULL COMMENT '角色id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_weak_password`
--

DROP TABLE IF EXISTS `sys_weak_password`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_weak_password` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '弱密码',
  `encode_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密后的密码',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `UK_weak_password_password` (`password`) USING BTREE,
  UNIQUE KEY `UK_weak_password_encoder_passwprd` (`encode_password`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10618 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_group`
--

DROP TABLE IF EXISTS `xxl_job_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_group` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `app_name` varchar(128) NOT NULL COMMENT '执行器AppName',
  `title` varchar(64) NOT NULL COMMENT '执行器名称',
  `address_type` tinyint NOT NULL DEFAULT '0' COMMENT '执行器地址类型：0=自动注册、1=手动录入',
  `address_list` text COMMENT '执行器地址列表，多地址逗号分隔',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务执行器表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_info`
--

DROP TABLE IF EXISTS `xxl_job_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `job_group` int NOT NULL COMMENT '执行器主键ID',
  `job_desc` varchar(255) NOT NULL COMMENT '任务描述',
  `add_time` datetime DEFAULT NULL COMMENT '添加时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `author` varchar(64) DEFAULT NULL COMMENT '作者',
  `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
  `schedule_type` varchar(50) NOT NULL DEFAULT 'NONE' COMMENT '调度类型',
  `schedule_conf` varchar(128) DEFAULT NULL COMMENT '调度配置，值含义取决于调度类型',
  `misfire_strategy` varchar(50) NOT NULL DEFAULT 'DO_NOTHING' COMMENT '调度过期策略',
  `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
  `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
  `executor_timeout` int NOT NULL DEFAULT '0' COMMENT '任务执行超时时间，单位秒',
  `executor_fail_retry_count` int NOT NULL DEFAULT '0' COMMENT '失败重试次数',
  `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
  `glue_source` mediumtext COMMENT 'GLUE源代码',
  `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
  `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
  `child_job_id` varchar(255) DEFAULT NULL COMMENT '子任务ID，多个逗号分隔',
  `trigger_status` tinyint NOT NULL DEFAULT '0' COMMENT '调度状态：0-停止，1-运行',
  `trigger_last_time` bigint NOT NULL DEFAULT '0' COMMENT '上次调度时间',
  `trigger_next_time` bigint NOT NULL DEFAULT '0' COMMENT '下次调度时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务主表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_lock`
--

DROP TABLE IF EXISTS `xxl_job_lock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_lock` (
  `lock_name` varchar(50) NOT NULL COMMENT '锁名称',
  PRIMARY KEY (`lock_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='锁表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_log`
--

DROP TABLE IF EXISTS `xxl_job_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `job_group` int NOT NULL COMMENT '执行器主键ID',
  `job_id` int NOT NULL COMMENT '任务，主键ID',
  `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址，本次执行的地址',
  `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
  `executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
  `executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数，格式如 1/2',
  `executor_fail_retry_count` int NOT NULL DEFAULT '0' COMMENT '失败重试次数',
  `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
  `trigger_code` int NOT NULL COMMENT '调度-结果',
  `trigger_msg` text COMMENT '调度-日志',
  `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
  `handle_code` int NOT NULL COMMENT '执行-状态',
  `handle_msg` text COMMENT '执行-日志',
  `alarm_status` tinyint NOT NULL DEFAULT '0' COMMENT '告警状态：0-默认、1-无需告警、2-告警成功、3-告警失败',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_trigger_time` (`trigger_time`) USING BTREE,
  KEY `idx_handle_code` (`handle_code`) USING BTREE,
  KEY `idx_job_log_job_id` (`job_id`),
  KEY `idx_job_log_job_group` (`job_group`)
) ENGINE=InnoDB AUTO_INCREMENT=133150221 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_log_report`
--

DROP TABLE IF EXISTS `xxl_job_log_report`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_log_report` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `trigger_day` datetime DEFAULT NULL COMMENT '调度-时间',
  `running_count` int NOT NULL DEFAULT '0' COMMENT '运行中-日志数量',
  `suc_count` int NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
  `fail_count` int NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_trigger_day` (`trigger_day`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1339 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务日志报告表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_logglue`
--

DROP TABLE IF EXISTS `xxl_job_logglue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_logglue` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `job_id` int NOT NULL COMMENT '任务，主键ID',
  `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
  `glue_source` mediumtext COMMENT 'GLUE源代码',
  `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
  `add_time` datetime DEFAULT NULL COMMENT '添加时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务程序代码表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xxl_job_registry`
--

DROP TABLE IF EXISTS `xxl_job_registry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `xxl_job_registry` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `registry_group` varchar(50) NOT NULL COMMENT '注册执行器',
  `registry_key` varchar(255) NOT NULL COMMENT '执行器key',
  `registry_value` varchar(255) NOT NULL COMMENT '执行器value',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_g_k_v` (`registry_group`,`registry_key`,`registry_value`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5833 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务注册表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'admin_user'
--

--
-- Dumping routines for database 'admin_user'
--

--
-- Current Database: `cmii_app_release`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmii_app_release` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmii_app_release`;

--
-- Table structure for table `env_code_info`
--

DROP TABLE IF EXISTS `env_code_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `env_code_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `env_code` varchar(255) DEFAULT NULL COMMENT '环境识别码',
  `env_addr` varchar(1024) DEFAULT NULL COMMENT '环境地址',
  `mqtt_addr` varchar(1024) DEFAULT NULL COMMENT 'mqtt链接地址',
  `mqtt_account` varchar(255) DEFAULT NULL COMMENT 'mqtt账号',
  `mqtt_pwd` varchar(255) DEFAULT NULL COMMENT 'mqtt密码',
  `remark` text COMMENT '备注',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人id',
  `modify_time` bigint DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='1';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `release_info`
--

DROP TABLE IF EXISTS `release_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `release_info` (
  `id` bigint NOT NULL COMMENT '1',
  `pkg_name` varchar(500) DEFAULT NULL COMMENT '1',
  `version_code` bigint DEFAULT NULL COMMENT '1',
  `version_name` varchar(255) DEFAULT NULL COMMENT '1',
  `comments` varchar(1000) DEFAULT NULL COMMENT '1',
  `is_force` smallint DEFAULT NULL COMMENT '1',
  `download_url` varchar(1000) DEFAULT NULL COMMENT '1',
  `md5` varchar(255) DEFAULT NULL COMMENT '1',
  `size` double DEFAULT NULL COMMENT '1',
  `type` int DEFAULT NULL COMMENT '1 飞行辅助',
  `status` int DEFAULT NULL COMMENT '1 最新发布 0 已发布',
  `def_usr_id` varchar(20) DEFAULT NULL COMMENT '创建用户',
  `def_time` datetime DEFAULT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) DEFAULT NULL COMMENT '更新用户',
  `upd_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='1';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `version_info`
--

DROP TABLE IF EXISTS `version_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `version_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `pkg_name` varchar(500) DEFAULT NULL COMMENT '升级包名称',
  `version_code` bigint DEFAULT NULL COMMENT '版本编码',
  `version_number` varchar(255) DEFAULT NULL COMMENT '版本号',
  `version_category` int DEFAULT NULL COMMENT '版本分类',
  `update_type` tinyint DEFAULT NULL COMMENT '更新类型',
  `update_desc` text COMMENT '更新描述',
  `pub_flag` tinyint DEFAULT NULL COMMENT '发布标识',
  `last_pub_time` bigint DEFAULT NULL COMMENT '最近发布时间',
  `object_path` varchar(1024) DEFAULT NULL COMMENT '文件对象路径',
  `object_id` varchar(255) DEFAULT NULL COMMENT '文件对象ID',
  `object_name` varchar(1024) DEFAULT NULL COMMENT '文件对象名称',
  `md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
  `size` double DEFAULT NULL COMMENT '文件大小',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人id',
  `modify_time` bigint DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='1';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmii_app_release'
--

--
-- Dumping routines for database 'cmii_app_release'
--

--
-- Current Database: `cmii_iron_tower`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmii_iron_tower` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmii_iron_tower`;

--
-- Table structure for table `tower_battery`
--

DROP TABLE IF EXISTS `tower_battery`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_battery` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '立项审批单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `battery_type` tinyint unsigned NOT NULL COMMENT '电池类型 0 铅酸 1 新锂电 2 梯次(大PACK)',
  `factory` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '电池厂家',
  `battery_num` tinyint unsigned NOT NULL COMMENT '电池组数',
  `battery_time` datetime DEFAULT NULL COMMENT '电池生产日期',
  `cb_manuf` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '合路器厂家',
  `cable_model` tinyint unsigned NOT NULL COMMENT '电缆型号 0: 1*16  1: 1*35  2: 1*70  3: 1*95 4: 不涉及',
  `cable_length` tinyint unsigned NOT NULL COMMENT '电缆长度',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `dev_consis` tinyint DEFAULT NULL COMMENT '改造内容与现场是否一致 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-电池';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_corr`
--

DROP TABLE IF EXISTS `tower_corr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_corr` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详细地址',
  `lon` decimal(12,6) DEFAULT NULL COMMENT '经度',
  `lat` decimal(12,6) DEFAULT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `status` int NOT NULL COMMENT '状态 0: 已拒绝  1: 已接受  2: 不合格 3: 合格',
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '原因',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  `content` text COLLATE utf8mb4_bin COMMENT '整改内容',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=429 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='整改表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_elec`
--

DROP TABLE IF EXISTS `tower_elec`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_elec` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '立项审批单',
  `confirm_forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '审批后工程量确认单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `cable_model` int NOT NULL COMMENT '电缆型号 0: 1*16 1: 1*35 2: 1*70  3: 1*95  4: 4*16  5: 3*15+1*16  6: 不涉及',
  `cable_material` int NOT NULL COMMENT '电缆材料 0: 铜  1: 铝  2：不涉及',
  `cable_length` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '电缆长度',
  `cable_place` int NOT NULL COMMENT '电缆布线方式 0: 架空  1: 地埋  2：顶管 3：不涉及',
  `trans_replace` int NOT NULL COMMENT '变压器是否更换 0: 是  1: 否  2：不涉及',
  `trans_capacity` int NOT NULL COMMENT '变压器容量 0: 10  1: 20  2：30 3：40 4：50 5：100 6：不涉及',
  `other_dev` int NOT NULL COMMENT '更换其他设备 0: 高低压跌落开关  1: 电表  2：电表箱 3：采集器 4：空气开关 5：电杆 6：不涉及',
  `routing` int NOT NULL COMMENT '走线是否符合工艺要求 0: 是  1: 否  2：不涉及',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `check_work` tinyint DEFAULT NULL COMMENT '现场工程量与工程量确认单是否一致 0 是 1 否',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=210 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-外市电';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_hvac`
--

DROP TABLE IF EXISTS `tower_hvac`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_hvac` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '立项审批单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `hvac_fac` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空调厂家',
  `hvac_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空调型号',
  `hvac_time` datetime DEFAULT NULL COMMENT '空调生产日期',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-空调';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_new`
--

DROP TABLE IF EXISTS `tower_new`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_new` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `tower_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '塔型',
  `tower_height` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '塔高',
  `tower_old_new` int NOT NULL COMMENT '是否为利旧塔 0: 是 1: 否',
  `tower_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '铁塔现场设备照片',
  `room_change_num` int NOT NULL COMMENT '机房改造数量或面积是否准确 0: 是 1: 否',
  `room_height` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '机房实际数量或面积',
  `room_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '机房现场设备照片',
  `power_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '开关电源型号',
  `power_num` int NOT NULL COMMENT '开关电源模块数量',
  `power_date` datetime DEFAULT NULL COMMENT '开关电源生产日期',
  `routing` int NOT NULL COMMENT '走线是否符合工艺要求 0: 是  1: 否  2：不涉及',
  `power_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '开关电源现场设备照片',
  `hvac_factory` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空调厂家',
  `hvac_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空调型号',
  `hvac_date` datetime DEFAULT NULL COMMENT '空调生产日期',
  `hvac_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空调现场设备照片',
  `battery_type` int NOT NULL COMMENT '电池类型 0: 铅酸  1: 梯次(大PACK)  2：新锂电',
  `battery_factory` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '电池厂家',
  `battery_num` int NOT NULL COMMENT '电池组数',
  `battery_date` datetime DEFAULT NULL COMMENT '电池生产日期',
  `cb_manuf` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '合路器厂家',
  `battery_cable_model` tinyint unsigned NOT NULL COMMENT '电缆型号 0: 1*16  1: 1*35  2: 1*70  3: 1*95 4: 不涉及',
  `battery_cable_length` int NOT NULL COMMENT '电缆长度',
  `battery_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '电池现场设备照片',
  `elec_cable_model` int NOT NULL COMMENT '外市电电缆型号 0: 1*16 1: 1*35 2: 1*70  3: 1*95  4: 4*16  5: 3*15+1*16  6: 不涉及',
  `elec_cable_material` int NOT NULL COMMENT '外市电电缆材料 0: 铜  1: 铝  2：不涉及',
  `elec_cable_length` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外市电电缆长度',
  `elec_cable_place` int NOT NULL COMMENT '外市电电缆布线方式 0: 架空  1: 地埋  2：顶管 3：不涉及',
  `trans_replace` int NOT NULL COMMENT '变压器是否更换 0: 是  1: 否  2：不涉及',
  `trans_capacity` int NOT NULL COMMENT '变压器容量 0: 10  1: 20  2：30 3：40 4：50 5：100 6：不涉及',
  `other_dev` int NOT NULL COMMENT '更换其他设备 0: 高低压跌落开关  1: 电表  2：电表箱 3：采集器 4：空气开关 5：电杆 6：不涉及',
  `elec_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外市电现场设备照片',
  `check_work` tinyint DEFAULT NULL COMMENT '现场工程量与工程量确认单是否一致 0 是 1 否',
  `ac_factory` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '交流配电箱厂家',
  `ac_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '交流配电箱型号',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-新建站';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_order`
--

DROP TABLE IF EXISTS `tower_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_order` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '工单编号',
  `type` tinyint NOT NULL COMMENT '质检类型 0: 更新改造  1: 维修检查',
  `project` int NOT NULL COMMENT '质检项目  0: 开关电源  1: 空调  2: 电池  3: 塔房  4: 外市电  5: 新建站  6: 两翼项目',
  `station_id` bigint DEFAULT NULL COMMENT '基站编号',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `order_req` varchar(255) DEFAULT NULL COMMENT '质检要求',
  `order_man_id` int DEFAULT NULL COMMENT '质检人员编号',
  `corr_man_id` int DEFAULT NULL COMMENT '整改人员编号',
  `corr_status` int DEFAULT '0' COMMENT '整改状态 0: 待接受  1: 已接受 ',
  `status` tinyint NOT NULL COMMENT '工单状态 0: 未完成  1: 已完成 2: 已质检 3 已整改',
  `files` varchar(1000) DEFAULT NULL COMMENT '上传附件',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '创建用户',
  `create_at` timestamp NOT NULL COMMENT '创建日期',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '修改用户',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改日期',
  `company_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `is_import` int DEFAULT '0' COMMENT '是否是导入的  0 否  1 是',
  `import_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上站日期',
  `danger` varchar(255) DEFAULT NULL COMMENT '隐患内容描述',
  `repair_plan` varchar(255) DEFAULT NULL COMMENT '整治方案',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2300000000005396 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_power`
--

DROP TABLE IF EXISTS `tower_power`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_power` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '立项审批单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `battery_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '开关电源型号',
  `battery_num` tinyint unsigned NOT NULL COMMENT '开关电源模块数量',
  `battery_time` datetime NOT NULL COMMENT '开关电源生产日期',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `whether_req` int NOT NULL COMMENT '走线是否符合工艺要求 0 是 1 否 2 不涉及',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=133 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-开关电源';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_region`
--

DROP TABLE IF EXISTS `tower_region`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_region` (
  `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '区划编号',
  `parent_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '父区划编号',
  `ancestors` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '祖区划编号',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区划名称',
  `province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '省级区划编号',
  `province_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '省级名称',
  `city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市级区划编号',
  `city_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市级名称',
  `district_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区级区划编号',
  `district_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区级名称',
  `town_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '镇级区划编号',
  `town_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '镇级名称',
  `village_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '村级区划编号',
  `village_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '111表示：主城区;112表示：城乡结合区;121表示：镇中心区;122表示：镇乡结合区;123表示：特殊区域;210表示：乡中心区;220表示：村庄',
  `village_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '村级名称',
  `level` int DEFAULT NULL COMMENT '区域等级：1 省，2市，3区，4 街道/镇, 5 居委',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `status` int DEFAULT '1' COMMENT '状态（1启用 0不启用）',
  KEY `parent_code` (`parent_code`) USING BTREE,
  KEY `code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='行政区划表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_repair`
--

DROP TABLE IF EXISTS `tower_repair`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_repair` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `repair_form` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '维修验收单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `dev_replace` tinyint NOT NULL COMMENT '设备是否更换 0 是 1 否 2 不涉及',
  `dev_accu` tinyint DEFAULT NULL COMMENT '维修数量、长度或面积是否准确 0 是 1 否 2 不涉及',
  `real_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '实际维修数量或面积',
  `hide_eng` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐蔽工程',
  `other_record` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '其他检查情况记录',
  `repair_photo` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '维修照片',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=447 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-维修检查';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_room`
--

DROP TABLE IF EXISTS `tower_room`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_room` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `dangers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '隐患证明',
  `forms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '立项审批单',
  `appr_conf` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '审批后工程量确认单',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `mod_acc` tinyint NOT NULL COMMENT '改造数量或面积是否准确 0 是 1 否',
  `actual_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '实际数量或面积',
  `other_rec` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '其他检查情况记录',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `dev_photos` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '现场设备照片',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `open_door` int NOT NULL COMMENT '门禁是否可以远程开门 0 是 1 否 2 不涉及',
  `air_remote` int NOT NULL COMMENT '空调远程开机是否可用 0 是 1 否 2 不涉及',
  `meter_acc` int NOT NULL COMMENT '分路计量器是否准确 0 是 1 否 2 不涉及',
  `float_charge` double NOT NULL COMMENT '开关电源浮充电压',
  `aver_charge` double NOT NULL COMMENT '开关电源均充电压',
  `one_power` double NOT NULL COMMENT '一次下电电压',
  `two_power` double NOT NULL COMMENT '二次下电电压',
  `total_dc` double NOT NULL COMMENT '直流负载总电流',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=167 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-塔房';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_station_info`
--

DROP TABLE IF EXISTS `tower_station_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_station_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '基站编号',
  `station_num` varchar(255) NOT NULL COMMENT '站址编码',
  `station_name` varchar(255) NOT NULL COMMENT '站址名称',
  `city` varchar(255) NOT NULL COMMENT '地市',
  `area` varchar(255) NOT NULL COMMENT '区域',
  `detail` varchar(255) NOT NULL COMMENT '详细地址',
  `lon` decimal(20,6) DEFAULT NULL COMMENT '经度',
  `lat` decimal(20,6) DEFAULT NULL COMMENT '纬度',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '创建用户',
  `create_at` timestamp NOT NULL COMMENT '创建日期',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '修改用户',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改日期',
  `company_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2300000000302554 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_user`
--

DROP TABLE IF EXISTS `tower_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_user` (
  `id` bigint NOT NULL COMMENT '用户id',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户手机号',
  `province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '负责省',
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '负责市',
  `area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '负责区',
  `group` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '人员分组',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_frozen` tinyint DEFAULT NULL COMMENT '是否冻结 0 正常 1 冻结',
  `start_time` datetime DEFAULT NULL COMMENT '权限开始时间',
  `stop_time` datetime DEFAULT NULL COMMENT '权限结束时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='游客用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_wings`
--

DROP TABLE IF EXISTS `tower_wings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_wings` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `om_code` bigint NOT NULL COMMENT '运维id',
  `location` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '详细地址',
  `lon` decimal(12,6) NOT NULL COMMENT '经度',
  `lat` decimal(12,6) NOT NULL COMMENT '纬度',
  `files` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站址合影',
  `other` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `proj_num` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目编码',
  `file_complete` tinyint NOT NULL COMMENT '材料是否齐全 0 是 1 否',
  `fsu_normal` tinyint NOT NULL COMMENT 'FSU设备是否正常 0 是 1 否',
  `main_dev_normal` tinyint NOT NULL COMMENT '主设备是否正常 0 是 1 否',
  `re_systems` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源系统截图',
  `sys_consis` tinyint DEFAULT NULL COMMENT '与资源系统信息是否一致 0 是 1 否',
  `check_qualif` tinyint DEFAULT NULL COMMENT '检查结果是否合格 0 是 1 否',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `last_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后活动时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='质检表-两翼项目';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmii_iron_tower'
--

--
-- Dumping routines for database 'cmii_iron_tower'
--

--
-- Current Database: `cmii_live_srs_op`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmii_live_srs_op` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmii_live_srs_op`;

--
-- Table structure for table `live_dvr_commit`
--

DROP TABLE IF EXISTS `live_dvr_commit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_dvr_commit` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'none',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'none',
  `dvr` int NOT NULL COMMENT 'none',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=60014 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_hls_record`
--

DROP TABLE IF EXISTS `live_hls_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_hls_record` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `time_begin` datetime(3) DEFAULT NULL COMMENT 'none',
  `time_end` datetime(3) DEFAULT NULL COMMENT 'none',
  `size` bigint NOT NULL COMMENT 'none',
  `status` tinyint NOT NULL COMMENT '0-ok; 1-trash; 2-deleted',
  `tail_ts` varchar(96) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_record` (`hub`,`stream`,`time_begin`) USING BTREE,
  KEY `idx_stream` (`hub`,`stream`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10077 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_hls_sync_hq`
--

DROP TABLE IF EXISTS `live_hls_sync_hq`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_hls_sync_hq` (
  `id` int NOT NULL COMMENT 'none',
  `hq_ticket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `time_upd` datetime(3) DEFAULT NULL COMMENT 'none',
  `status` tinyint NOT NULL COMMENT '0-ready; 1-need sync',
  `version` int NOT NULL COMMENT 'none',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_hls_sync_task`
--

DROP TABLE IF EXISTS `live_hls_sync_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_hls_sync_task` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `status` tinyint NOT NULL COMMENT '0-ready; 1-sync.',
  `time_upd` datetime(3) DEFAULT NULL COMMENT 'none',
  `version` int NOT NULL DEFAULT '1' COMMENT 'none',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_steam` (`hub`,`stream`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=798 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_hub`
--

DROP TABLE IF EXISTS `live_hub`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_hub` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `dvr` int NOT NULL DEFAULT '0' COMMENT 'days for reserve, 0  for disable',
  `pub` tinyint NOT NULL DEFAULT '0' COMMENT '0: private; 1: pub push; 2 pub play; 3: pub all; 4: inherit',
  `active` tinyint NOT NULL COMMENT '1 yes, 0 no, 2 for inherit',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_hub` (`hub`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_hub_token`
--

DROP TABLE IF EXISTS `live_hub_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_hub_token` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `token` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `token_type` tinyint NOT NULL COMMENT '1 for push, 2 for pull',
  `expire` datetime NOT NULL DEFAULT '2099-12-31 23:59:59' COMMENT 'none',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_hub_token` (`hub`,`token_type`,`token`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_record`
--

DROP TABLE IF EXISTS `live_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_record` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'hub',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'stream',
  `time_begin` datetime(3) DEFAULT NULL COMMENT 'time_begin',
  `time_end` datetime(3) DEFAULT NULL COMMENT 'time_end',
  `size` bigint NOT NULL COMMENT 'size',
  `status` tinyint NOT NULL COMMENT '0-ok; 1-trash; 2-deleted',
  `last_begin` datetime(3) DEFAULT NULL COMMENT 'the begin time of last segment',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_record` (`hub`,`stream`,`time_begin`) USING BTREE,
  KEY `idx_stream` (`hub`,`stream`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=110238 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='live_record';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_segment`
--

DROP TABLE IF EXISTS `live_segment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_segment` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'hub',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'stream',
  `type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'type',
  `fileid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'fileid',
  `filename` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'filename',
  `size` bigint NOT NULL COMMENT 'size',
  `time_begin` datetime(3) NOT NULL COMMENT 'time_begin',
  `time_end` datetime(3) NOT NULL COMMENT 'time_end',
  `status` tinyint NOT NULL COMMENT '0-ok; 1-trash; 2-deleted',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_record` (`hub`,`stream`,`time_begin`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12011293 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='live_segment';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_stream`
--

DROP TABLE IF EXISTS `live_stream`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_stream` (
  `id` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `dvr` int DEFAULT NULL COMMENT 'days for reserve, 0 for disable, null for inherit',
  `pub` tinyint NOT NULL DEFAULT '2' COMMENT '0: private; 1: pub push; 2 pub play; 3: pub all; 4: inherit',
  `active` tinyint DEFAULT NULL COMMENT '2 for inherit',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_stream` (`hub`,`stream`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_stream_token`
--

DROP TABLE IF EXISTS `live_stream_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_stream_token` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `token` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'none',
  `token_type` tinyint NOT NULL COMMENT '1 for push, 2 for pull',
  `expire` datetime NOT NULL DEFAULT '2099-12-31 23:59:59' COMMENT 'none',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_stream` (`hub`,`stream`,`token_type`,`token`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=61702 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_sync_hq`
--

DROP TABLE IF EXISTS `live_sync_hq`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_sync_hq` (
  `id` int NOT NULL COMMENT 'id',
  `hq_ticket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'hq_ticket',
  `time_upd` datetime(3) DEFAULT NULL COMMENT 'time update',
  `status` tinyint NOT NULL COMMENT '0-ready; 1-need sync',
  `version` int NOT NULL COMMENT 'version',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='live_sync_hq';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_sync_task`
--

DROP TABLE IF EXISTS `live_sync_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_sync_task` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'hub',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'stream',
  `status` tinyint NOT NULL COMMENT '0-ready; 1-sync.',
  `time_upd` datetime(3) DEFAULT NULL COMMENT 'time update',
  `version` int NOT NULL DEFAULT '1' COMMENT 'version',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_steam` (`hub`,`stream`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1537 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='sync task';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_video_part`
--

DROP TABLE IF EXISTS `live_video_part`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_video_part` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'none',
  `hub` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'none',
  `stream` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'none',
  `type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'none',
  `fileid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'none',
  `filename` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'none',
  `size` bigint NOT NULL COMMENT 'none',
  `time_begin` datetime(3) NOT NULL COMMENT 'none',
  `time_end` datetime(3) NOT NULL COMMENT 'none',
  `status` tinyint NOT NULL COMMENT '0-ok; 1-trash; 2-deleted',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_record` (`hub`,`stream`,`time_begin`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1937083 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='none';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmii_live_srs_op'
--

--
-- Dumping routines for database 'cmii_live_srs_op'
--

--
-- Current Database: `cmii_material_warehouse`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmii_material_warehouse` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmii_material_warehouse`;

--
-- Table structure for table `base_upload_type`
--

DROP TABLE IF EXISTS `base_upload_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_upload_type` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `type` varchar(32) NOT NULL COMMENT '业务类型',
  `max_size` int NOT NULL COMMENT '最大文件大小',
  `type_limit` varchar(255) NOT NULL COMMENT '文件类型限制',
  `platform` varchar(32) DEFAULT NULL COMMENT '文件所属平台',
  `is_confirm` tinyint(1) DEFAULT NULL COMMENT '上传是否需要业务确认',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='基础上传类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `item_recycle_bin`
--

DROP TABLE IF EXISTS `item_recycle_bin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `item_recycle_bin` (
  `proj_obj_id` varchar(32) NOT NULL COMMENT '文件ID',
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `object_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '对象名称',
  `mat_type` varchar(20) DEFAULT NULL COMMENT '素材类型，来源于数据字典',
  `object_size` double DEFAULT NULL COMMENT '大小，默认 单位为KB，前端展示为M，需转换',
  `object_format` varchar(10) DEFAULT NULL COMMENT '格式',
  `play_duration` double DEFAULT NULL COMMENT '时长，单位为s',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称',
  `object_path` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '对象路径 日期/项目/类型/对象ID.对象类型 例如（20201104/234234/234/2234.jpg',
  `type` tinyint NOT NULL COMMENT '删除类型：0 业务删除 1 未确认删除 ',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公司ID',
  `thumbnail_image_path` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '缩略图路径',
  `object_md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属平台',
  PRIMARY KEY (`proj_obj_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='文件回收站表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_item_agg`
--

DROP TABLE IF EXISTS `mw_item_agg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_item_agg` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司ID',
  `type` tinyint DEFAULT NULL COMMENT '统计类型。0：图片；1：视频；2：模型；3：其他',
  `create_time` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生成日期',
  `object_size` bigint DEFAULT NULL COMMENT '文件统计大小',
  PRIMARY KEY (`id`),
  KEY `idx_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1015 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件大小统计表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_label`
--

DROP TABLE IF EXISTS `mw_label`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_label` (
  `label_id` varchar(32) NOT NULL COMMENT '标签ID',
  `label_name` varchar(200) NOT NULL COMMENT '标签Name',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `proj_id` varchar(32) NOT NULL COMMENT '项目ID',
  `is_fixed` tinyint NOT NULL COMMENT '是否固定，0：固定，不可删除 1：不固定',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司ID',
  PRIMARY KEY (`label_id`) USING BTREE,
  KEY `idx_label_name` (`label_name`) USING BTREE,
  KEY `idx_proj_id` (`proj_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='标签表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_permission`
--

DROP TABLE IF EXISTS `mw_permission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_permission` (
  `mw_permission_id` bigint NOT NULL COMMENT '权限ID',
  `permission_key` varchar(255) NOT NULL COMMENT '权限',
  `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  `status` tinyint(1) NOT NULL COMMENT '状态：0有效1作废',
  `type` varchar(255) NOT NULL COMMENT '权限针对对象',
  PRIMARY KEY (`mw_permission_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj`
--

DROP TABLE IF EXISTS `mw_proj`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj` (
  `proj_id` varchar(32) NOT NULL COMMENT '项目ID',
  `title` varchar(200) NOT NULL COMMENT '标题',
  `own_usr_id` varchar(20) NOT NULL COMMENT '所有者',
  `scr_id` bigint NOT NULL COMMENT '来源ID',
  `scr_biz_id` varchar(30) DEFAULT NULL COMMENT '来源业务ID',
  `thumbnail_image_path` varchar(1000) NOT NULL COMMENT '缩略图存储地址',
  `status` tinyint NOT NULL COMMENT '状态：0：创建，1：删除',
  `desc` varchar(400) DEFAULT NULL COMMENT '描述',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司ID',
  PRIMARY KEY (`proj_id`) USING BTREE,
  KEY `scr_no` (`scr_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='项目表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_item`
--

DROP TABLE IF EXISTS `mw_proj_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_item` (
  `proj_obj_id` varchar(32) NOT NULL COMMENT '文件ID',
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `object_name` varchar(255) NOT NULL COMMENT '文件名',
  `mat_type` varchar(20) NOT NULL COMMENT '素材类型，来源于数据字典',
  `object_size` double DEFAULT NULL COMMENT '大小，默认 单位为KB，前端展示为M，需转换',
  `object_format` varchar(10) DEFAULT NULL COMMENT '格式',
  `play_duration` double DEFAULT NULL COMMENT '时长，单位为s',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称',
  `object_path` varchar(350) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '对象路径 日期/项目/类型/对象ID.对象类型 例如（20201104/234234/234/2234.jpg',
  `status` tinyint NOT NULL COMMENT '状态：0 创建 1 删除 ',
  `thumbnail_image_path` varchar(1000) DEFAULT NULL COMMENT '缩略图路径',
  `object_md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司ID',
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属平台',
  PRIMARY KEY (`proj_obj_id`) USING BTREE,
  KEY `idx_projd_objectName` (`proj_id`,`object_name`),
  KEY `idx_object_path` (`object_path`) USING BTREE,
  KEY `idx_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='项目明细表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_item_chunk`
--

DROP TABLE IF EXISTS `mw_proj_item_chunk`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_item_chunk` (
  `chunk_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '分片ID',
  `object_md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件md5',
  `chunk_index` int NOT NULL COMMENT '分片索引',
  `chunk_size` double DEFAULT NULL COMMENT '分片大小',
  `chunk_status` tinyint DEFAULT NULL COMMENT '分片状态(0:正在上传 1:结束上传 2:异常)',
  `def_time` datetime NOT NULL COMMENT '创建时间',
  `def_user` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `upd_time` datetime NOT NULL COMMENT '修改时间',
  `upd_user` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `proj_obj_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '文件ID',
  PRIMARY KEY (`chunk_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_item_progress`
--

DROP TABLE IF EXISTS `mw_proj_item_progress`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_item_progress` (
  `proj_obj_id` varchar(32) NOT NULL COMMENT '文件ID',
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `object_name` varchar(255) NOT NULL COMMENT '文件名',
  `object_size` double DEFAULT NULL COMMENT '大小，默认 单位为KB，前端展示为M，需转换',
  `upload_status` tinyint DEFAULT NULL COMMENT '状态：0 等待上传 1正在上传  2 上传失败 3上传成功',
  `uploaded_time` datetime DEFAULT NULL COMMENT '上传文件完成时间',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) DEFAULT NULL COMMENT '更新用户',
  `upd_time` datetime DEFAULT NULL COMMENT '更新日期',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司ID',
  `scr_id` bigint NOT NULL COMMENT '业务ID',
  PRIMARY KEY (`proj_obj_id`) USING BTREE,
  KEY `proj_id` (`proj_id`) USING BTREE,
  KEY `idx_def_time` (`def_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='项目明细表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_item_unconfirmed`
--

DROP TABLE IF EXISTS `mw_proj_item_unconfirmed`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_item_unconfirmed` (
  `proj_obj_id` varchar(32) NOT NULL COMMENT '文件ID',
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `object_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '对象名称',
  `object_size` double DEFAULT NULL COMMENT '大小，默认 单位为KB，前端展示为M，需转换',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称',
  `object_path` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '对象路径 日期/项目/类型/对象ID.对象类型 例如（20201104/234234/234/2234.jpg',
  `object_md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  PRIMARY KEY (`proj_obj_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='未确认文件表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_label`
--

DROP TABLE IF EXISTS `mw_proj_label`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_label` (
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `label_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '标签ID',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='项目标签表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_proj_shared_relation`
--

DROP TABLE IF EXISTS `mw_proj_shared_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_proj_shared_relation` (
  `id` varchar(32) NOT NULL COMMENT '主键ID',
  `proj_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `grant_user_id` varchar(20) NOT NULL COMMENT '授与用户ID',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `group_type` varchar(255) DEFAULT NULL COMMENT '类型分组,如：video,pic',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_scr`
--

DROP TABLE IF EXISTS `mw_scr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_scr` (
  `scr_id` bigint NOT NULL COMMENT '来源ID',
  `scr_name` varchar(20) NOT NULL COMMENT '来源name',
  `descr` varchar(30) NOT NULL COMMENT '描述',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  `bucket_name` varchar(32) NOT NULL COMMENT '资源桶名',
  `is_show` tinyint NOT NULL DEFAULT '1' COMMENT '页面是否展示，0：是，1：否',
  PRIMARY KEY (`scr_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='来源表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_tus_upload`
--

DROP TABLE IF EXISTS `mw_tus_upload`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_tus_upload` (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件ID',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名',
  `file_size` bigint NOT NULL COMMENT '文件总大小',
  `upload_offsets` bigint NOT NULL COMMENT '已上传文件大小',
  `temp_path_prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名',
  `project_id` varchar(32) DEFAULT NULL COMMENT '项目ID',
  `scr_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名',
  `final_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名',
  `upload_status` tinyint DEFAULT NULL COMMENT '上传状态，0：上传中，1：上传完成，待确认，2：确认完成',
  `is_deleted` tinyint DEFAULT NULL COMMENT '是否删除',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司ID',
  `user_id` varchar(20) NOT NULL COMMENT '用户ID',
  `play_duration` int DEFAULT NULL COMMENT '音视频时长',
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'PLATFORM_CLOUD' COMMENT '所属平台',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='tus上传表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_user_label`
--

DROP TABLE IF EXISTS `mw_user_label`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_user_label` (
  `user_id` varchar(20) DEFAULT NULL,
  `label_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '标签名',
  `times` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mw_user_object_permission`
--

DROP TABLE IF EXISTS `mw_user_object_permission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mw_user_object_permission` (
  `id` varchar(32) NOT NULL COMMENT '主键ID',
  `user_id` bigint NOT NULL,
  `object_id` varchar(32) DEFAULT NULL COMMENT '对象ID',
  `permission` varchar(500) NOT NULL COMMENT '权限',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_time` datetime NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '更新用户',
  `upd_time` datetime NOT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_object_id` (`object_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmii_material_warehouse'
--

--
-- Dumping routines for database 'cmii_material_warehouse'
--

--
-- Current Database: `cmii_nacos_config`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmii_nacos_config` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmii_nacos_config`;

--
-- Table structure for table `config_info`
--

DROP TABLE IF EXISTS `config_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_use` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `effect` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_schema` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  `encrypted_data_key` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '加密数据',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3522 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_aggr`
--

DROP TABLE IF EXISTS `config_info_aggr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_aggr` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'datum_id',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='增加租户字段';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_beta`
--

DROP TABLE IF EXISTS `config_info_beta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_beta` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '加密数据',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_beta';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_tag`
--

DROP TABLE IF EXISTS `config_info_tag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_tag` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_tag';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_tags_relation`
--

DROP TABLE IF EXISTS `config_tags_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_tags_relation` (
  `id` bigint NOT NULL COMMENT 'id',
  `tag_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`) USING BTREE,
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_tag_relation';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `group_capacity`
--

DROP TABLE IF EXISTS `group_capacity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `group_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Group ID，空字符表示整个集群',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数，，0表示使用默认值',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='集群、各Group容量信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `his_config_info`
--

DROP TABLE IF EXISTS `his_config_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `his_config_info` (
  `id` bigint unsigned NOT NULL,
  `nid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `op_type` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '加密数据',
  PRIMARY KEY (`nid`) USING BTREE,
  KEY `idx_gmt_create` (`gmt_create`) USING BTREE,
  KEY `idx_gmt_modified` (`gmt_modified`) USING BTREE,
  KEY `idx_did` (`data_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3878 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='多租户改造';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `permissions`
--

DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
  `role` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `resource` varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `action` varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `roles`
--

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `username` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `role` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  UNIQUE KEY `uk_username_role` (`username`,`role`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tenant_capacity`
--

DROP TABLE IF EXISTS `tenant_capacity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tenant_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='租户容量信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tenant_info`
--

DROP TABLE IF EXISTS `tenant_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tenant_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='tenant_info';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `username` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `password` varchar(500) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmii_nacos_config'
--

--
-- Dumping routines for database 'cmii_nacos_config'
--

--
-- Current Database: `cmlc_live`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cmlc_live` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `cmlc_live`;

--
-- Table structure for table `kpi_video_ds`
--

DROP TABLE IF EXISTS `kpi_video_ds`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `kpi_video_ds` (
  `timestamp` timestamp NOT NULL,
  `value` bigint unsigned NOT NULL,
  PRIMARY KEY (`timestamp`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'cmlc_live'
--

--
-- Dumping routines for database 'cmlc_live'
--

--
-- Current Database: `emqx`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `emqx` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `emqx`;

--
-- Table structure for table `mqtt_acl`
--

DROP TABLE IF EXISTS `mqtt_acl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mqtt_acl` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `permission` varchar(5) NOT NULL,
  `action` varchar(9) NOT NULL,
  `topic` varchar(100) NOT NULL,
  `qos` tinyint(1) DEFAULT NULL,
  `retain` tinyint(1) DEFAULT NULL,
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `is_data` bit(1) DEFAULT b'0' COMMENT '是否是数据(探测目标)',
  PRIMARY KEY (`id`),
  KEY `username_idx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mqtt_user`
--

DROP TABLE IF EXISTS `mqtt_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mqtt_user` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) DEFAULT NULL,
  `password_hash` varchar(100) DEFAULT NULL,
  `salt` varchar(35) DEFAULT NULL,
  `is_superuser` tinyint(1) DEFAULT '0',
  `created` datetime DEFAULT NULL,
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mqtt_username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'emqx'
--

--
-- Dumping routines for database 'emqx'
--

--
-- Current Database: `migration_tmp`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `migration_tmp` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `migration_tmp`;

--
-- Table structure for table `uav_hangar`
--

DROP TABLE IF EXISTS `uav_hangar`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar` (
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家名称',
  `model_name` varchar(100) NOT NULL COMMENT '机库型号名称',
  `hangar_type` varchar(100) NOT NULL COMMENT '机库类型',
  `use_stat` varchar(100) NOT NULL DEFAULT '1' COMMENT '可用状态，1为可用，2为禁用，3为保养，4为报废',
  `online_stat` varchar(100) NOT NULL DEFAULT '0' COMMENT '在线状态，1为在线，0为离线',
  `device_no` varchar(20) DEFAULT NULL COMMENT '设备号',
  `elec_min` int DEFAULT NULL COMMENT '无人机换电时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `free_hours` int DEFAULT NULL COMMENT '无故障时长',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `man_var` int DEFAULT NULL COMMENT '机械手自由度',
  `mech_pot` varchar(4) DEFAULT NULL COMMENT '机械重复定位精度',
  `prot_level` varchar(100) DEFAULT NULL COMMENT '壳体防护等级',
  `length` int DEFAULT NULL COMMENT '长',
  `width` int DEFAULT NULL COMMENT '宽',
  `height` int DEFAULT NULL COMMENT '高',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `material` varchar(1100) DEFAULT NULL COMMENT '材料',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` varchar(500) NOT NULL COMMENT '图片路径列表',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `note` varchar(200) DEFAULT NULL COMMENT '机库备注',
  `bind_uav` varchar(20) DEFAULT NULL COMMENT '绑定的无人机编码',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`hangar_code`) USING BTREE,
  KEY `INDEX_uav_hangar_use_stat` (`use_stat`) USING BTREE,
  KEY `INDEX_uav_hangar_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='机库信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar_bound`
--

DROP TABLE IF EXISTS `uav_hangar_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar_bound` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `bound` int NOT NULL COMMENT '绑定状态，1为已绑定，2为解除绑定',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`uav_code`,`hangar_code`) USING BTREE,
  KEY `INDEX_uav_load_bound_uav_code` (`uav_code`) USING BTREE,
  KEY `INDEX_uav_load_bound_hangar_code` (`hangar_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='无人机机库关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar_video`
--

DROP TABLE IF EXISTS `uav_hangar_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar_video` (
  `video_id` varchar(20) NOT NULL COMMENT '视频ID',
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `video_name` varchar(20) NOT NULL COMMENT '视频名称',
  `video_line` varchar(200) NOT NULL COMMENT '视频线路',
  `push_stream` varchar(200) DEFAULT NULL COMMENT '推流地址',
  `pull_stream` varchar(200) NOT NULL COMMENT '拉流地址',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`video_id`) USING BTREE,
  KEY `hangar_code` (`hangar_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='机库视频信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_bound`
--

DROP TABLE IF EXISTS `uav_load_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_bound` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `bound` int NOT NULL COMMENT '绑定状态，1为已绑定，2为解除绑定',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`uav_code`,`load_code`) USING BTREE,
  KEY `INDEX_uav_load_bound_uav_code` (`uav_code`) USING BTREE,
  KEY `INDEX_uav_load_bound_load_code` (`load_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='无人机载荷关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_cam`
--

DROP TABLE IF EXISTS `uav_load_cam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_cam` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `exp_mode` varchar(1100) DEFAULT NULL COMMENT '曝光模式',
  `work_mode` varchar(1100) DEFAULT NULL COMMENT '工作模式',
  `balance` varchar(1100) DEFAULT NULL COMMENT '白平衡',
  `img_format` varchar(1100) DEFAULT NULL COMMENT '图像存储格式',
  `img_size` varchar(1100) DEFAULT NULL COMMENT '图像尺寸',
  `cam_mode` varchar(1100) DEFAULT NULL COMMENT '拍照模式',
  `shut_speed` varchar(1100) DEFAULT NULL COMMENT '快门速度',
  `img_iso` varchar(1100) DEFAULT NULL COMMENT '照片ISO',
  `video_format` varchar(1100) DEFAULT NULL COMMENT '视频存储格式',
  `video_display` varchar(1100) DEFAULT NULL COMMENT '视频分辨率',
  `video_iso` varchar(1100) DEFAULT NULL COMMENT '视频ISO',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `pos_eva` int DEFAULT NULL COMMENT '正俯仰可控范围',
  `neg_eva` int DEFAULT NULL COMMENT '负俯仰可控范围',
  `pos_trans` int DEFAULT NULL COMMENT '正平移可控范围',
  `neg_trans` int DEFAULT NULL COMMENT '负平移可控范围',
  `pos_roll` int DEFAULT NULL COMMENT '正横滚可控范围',
  `neg_roll` int DEFAULT NULL COMMENT '负横滚可控范围',
  `eva_ctr_speed` int DEFAULT NULL COMMENT '俯仰最大控制速度',
  `trans_ctr_speed` int DEFAULT NULL COMMENT '水平最大控制速度',
  `roll_ctr_speed` int DEFAULT NULL COMMENT '横滚最大控制速度',
  `line` varchar(100) NOT NULL COMMENT '线路，0：自定义、1：备用线路1、2：备用线路2、3：备用线路3',
  `push_addr` varchar(200) NOT NULL COMMENT '推流地址',
  `pull_addr` varchar(200) NOT NULL COMMENT '拉流地址',
  `picture` varchar(500) DEFAULT NULL COMMENT '图片路径列表',
  `load_spec` varchar(200) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`load_code`) USING BTREE,
  KEY `INDEX_uav_load_cam_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_load_cam_use_stat` (`use_stat`) USING BTREE,
  KEY `INDEX_uav_load_cam_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='摄像头载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_spk`
--

DROP TABLE IF EXISTS `uav_load_spk`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_spk` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `spk_dist` int DEFAULT NULL COMMENT '扩音距离',
  `max_volume` int DEFAULT NULL COMMENT '最大音量',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `picture` varchar(500) DEFAULT NULL COMMENT '图片路径列表',
  `load_spec` varchar(200) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`load_code`) USING BTREE,
  KEY `INDEX_uav_load_spk_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_load_spk_use_stat` (`use_stat`) USING BTREE,
  KEY `INDEX_uav_load_spk_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='喊话器载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_plane`
--

DROP TABLE IF EXISTS `uav_plane`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_plane` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态，1为可用，2为禁用，3为保养，4为报废',
  `online_stat` varchar(100) NOT NULL COMMENT '在线状态，1为在线，0为离线',
  `shape` varchar(100) NOT NULL COMMENT '无人机形态，1为固定翼、2为旋翼、3为混合',
  `size` varchar(100) NOT NULL COMMENT '无人机尺度，1微型无人机、2轻型无人机、3小型无人机、4大型无人机',
  `max_speed` int DEFAULT NULL COMMENT '最大航速',
  `hight` int DEFAULT NULL COMMENT '飞行高度',
  `max_hours` int DEFAULT NULL COMMENT '最大续航时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `mix_tmp` varchar(3) DEFAULT NULL COMMENT '最低温度',
  `max_tmp` varchar(3) DEFAULT NULL COMMENT '最高温度',
  `max_load` varchar(8) DEFAULT NULL COMMENT '最大安全载重',
  `hight_range` varchar(6) DEFAULT NULL COMMENT '最大飞行海拔高度',
  `stay_time` int DEFAULT NULL COMMENT '满载悬停时间',
  `material` varchar(1100) DEFAULT NULL COMMENT '材料',
  `paddle` int DEFAULT NULL COMMENT '桨数',
  `wheelbase` int DEFAULT NULL COMMENT '轴距',
  `weight` varchar(8) DEFAULT NULL COMMENT '重量（含电池）',
  `extra_if` varchar(1100) DEFAULT NULL COMMENT '外置接口(BUS/USB/HDMI/串口/电源接口/光纤接口等)',
  `volume` varchar(6) DEFAULT NULL COMMENT '体积（长*宽*高 mm）',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` varchar(500) NOT NULL COMMENT '图片路径列表',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `hangar` varchar(20) DEFAULT NULL COMMENT '所属机库',
  `note` varchar(200) DEFAULT NULL COMMENT '无人机备注',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`uav_code`) USING BTREE,
  KEY `INDEX_uav_plane_use_stat` (`use_stat`) USING BTREE,
  KEY `INDEX_uav_plane_model_name` (`model_name`) USING BTREE,
  KEY `INDEX_uav_plane_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'migration_tmp'
--

--
-- Dumping routines for database 'migration_tmp'
--

--
-- Current Database: `nacos_config`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `nacos_config` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `nacos_config`;

--
-- Table structure for table `config_info`
--

DROP TABLE IF EXISTS `config_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_use` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `effect` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_schema` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=683 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_aggr`
--

DROP TABLE IF EXISTS `config_info_aggr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_aggr` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'datum_id',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='增加租户字段';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_beta`
--

DROP TABLE IF EXISTS `config_info_beta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_beta` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_beta';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_info_tag`
--

DROP TABLE IF EXISTS `config_info_tag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_info_tag` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_tag';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `config_tags_relation`
--

DROP TABLE IF EXISTS `config_tags_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `config_tags_relation` (
  `id` bigint NOT NULL COMMENT 'id',
  `tag_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`) USING BTREE,
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_tag_relation';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `group_capacity`
--

DROP TABLE IF EXISTS `group_capacity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `group_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Group ID，空字符表示整个集群',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数，，0表示使用默认值',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='集群、各Group容量信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `his_config_info`
--

DROP TABLE IF EXISTS `his_config_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `his_config_info` (
  `id` bigint unsigned NOT NULL,
  `nid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  `src_ip` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `op_type` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`nid`) USING BTREE,
  KEY `idx_gmt_create` (`gmt_create`) USING BTREE,
  KEY `idx_gmt_modified` (`gmt_modified`) USING BTREE,
  KEY `idx_did` (`data_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=824 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='多租户改造';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `permissions`
--

DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
  `role` varchar(50) NOT NULL,
  `resource` varchar(512) NOT NULL,
  `action` varchar(8) NOT NULL,
  UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `roles`
--

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `username` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL,
  UNIQUE KEY `uk_username_role` (`username`,`role`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tenant_capacity`
--

DROP TABLE IF EXISTS `tenant_capacity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tenant_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='租户容量信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tenant_info`
--

DROP TABLE IF EXISTS `tenant_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tenant_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='tenant_info';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `username` varchar(50) NOT NULL,
  `password` varchar(500) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'nacos_config'
--

--
-- Dumping routines for database 'nacos_config'
--

--
-- Current Database: `suav_supervision`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `suav_supervision` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `suav_supervision`;

--
-- Table structure for table `air_line_info`
--

DROP TABLE IF EXISTS `air_line_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_line_info` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `line_name` varchar(255) NOT NULL COMMENT '航线名称',
  `source_type` int unsigned DEFAULT NULL COMMENT '航线来源',
  `import_time` datetime DEFAULT NULL COMMENT '为KML导入时记录导入的时间',
  `import_user_id` bigint DEFAULT NULL COMMENT '为KML导入时记录导入userId',
  `import_user_name` varchar(255) DEFAULT NULL COMMENT '为KML导入时记录导入者姓名',
  `shape_type` int DEFAULT NULL COMMENT '航线类型',
  `remarks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `org_id` int DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `length` decimal(10,2) DEFAULT NULL COMMENT '路径长度',
  `height` decimal(6,2) DEFAULT NULL COMMENT '飞行高度',
  `planned_fly_duration` decimal(10,2) DEFAULT NULL COMMENT '预计飞行时间',
  `point_num` int DEFAULT NULL COMMENT '航点数',
  `origin_coordinate_type` int DEFAULT NULL COMMENT '原始坐标类型',
  `step` int NOT NULL COMMENT '航线创建步数',
  `deleted` int unsigned DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`),
  KEY `idx_create_id` (`create_id`),
  KEY `idx_line_name` (`line_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航线规划基本信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_point_info`
--

DROP TABLE IF EXISTS `air_point_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_point_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `sort_number` int DEFAULT NULL COMMENT '航点飞行顺序',
  `air_point_type` int DEFAULT NULL COMMENT '航点类型:1起飞点,2飞行点,3.降落点(终点)',
  `height` decimal(6,2) DEFAULT NULL COMMENT '高度',
  `altitude` decimal(6,2) DEFAULT NULL COMMENT '海拔高度',
  `speed` decimal(4,2) DEFAULT NULL COMMENT '速度',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `air_line_id` bigint DEFAULT NULL COMMENT '关联的航线id',
  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人名称',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(20) DEFAULT NULL COMMENT '修改人名称',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`),
  KEY `idx_air_line_id` (`air_line_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `airport`
--

DROP TABLE IF EXISTS `airport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `airport` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `code4` varchar(20) DEFAULT NULL COMMENT '编码',
  `code3` text COMMENT '编码',
  `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
  `city` text COMMENT '城市',
  `province` text COMMENT '省份',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `type` int DEFAULT NULL COMMENT '1：民用；2通航；3：农化4：军用；',
  `grade` int DEFAULT NULL COMMENT '空',
  `weathercode1` varchar(16) DEFAULT NULL COMMENT '气候编码',
  `latitude_baidu` double DEFAULT NULL COMMENT '百度纬度',
  `longitude_baidu` double DEFAULT NULL COMMENT '百度经度',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_name` (`name`) USING BTREE,
  UNIQUE KEY `uniq_code4` (`code4`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1825 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='机场表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `airspace_config`
--

DROP TABLE IF EXISTS `airspace_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `airspace_config` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域编号',
  `area_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '空域范围（geojson）',
  `area_type` int NOT NULL COMMENT '空域类型：10 .适飞区  20 管制区',
  `area_sub_category` int NOT NULL COMMENT '管制区分类，针对管制区，21：管制区1， 22：管制区2,... 11:适飞区',
  `lower_height` decimal(9,3) DEFAULT NULL COMMENT '空域底部距离地面高度',
  `upper_height` decimal(9,3) DEFAULT NULL COMMENT '空域顶部距离地面高度',
  `temporary` tinyint NOT NULL COMMENT '是否为临时空域: 0.非临时空域 1.临时空域',
  `create_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人ID',
  `shape_type` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域形状。“Point”、“MultiPoint”、“LineString”、“MultiLineString”、“Polygon”、“MultiPolygon”、“GeometryCollection”',
  `start_time` datetime DEFAULT NULL COMMENT '生效开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '生效截至时间',
  `min_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最小值',
  `max_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最大值',
  `min_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最小值',
  `max_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最大值',
  `status` int DEFAULT NULL COMMENT '发布状态。 0. 待审批 1.待发布  2.已发布',
  `publish_time` datetime DEFAULT NULL COMMENT '发布时间',
  `out_area_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '导入时空域唯一标识',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联空域配置记录（修改前的记录）',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`),
  UNIQUE KEY `uniq_area_name` (`area_name`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_end_time` (`end_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='空域配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `airspace_config_his`
--

DROP TABLE IF EXISTS `airspace_config_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `airspace_config_his` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域编号',
  `area_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '空域范围（geojson）',
  `area_type` int DEFAULT NULL COMMENT '空域类型：10 .适飞区  20 管制区',
  `area_sub_category` int DEFAULT NULL COMMENT '管制区分类，针对管制区，21：管制区1， 22：管制区2,... 11:适飞区',
  `lower_height` decimal(9,3) DEFAULT NULL COMMENT '空域底部距离地面高度',
  `upper_height` decimal(9,3) DEFAULT NULL COMMENT '空域顶部距离地面高度',
  `temporary` tinyint DEFAULT NULL COMMENT '是否为临时空域: 0.非临时空域 1.临时空域',
  `create_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人ID',
  `shape_type` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域形状。“Point”、“MultiPoint”、“LineString”、“MultiLineString”、“Polygon”、“MultiPolygon”、“GeometryCollection”',
  `start_time` datetime DEFAULT NULL COMMENT '生效开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '生效截至时间',
  `min_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最小值',
  `max_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最大值',
  `min_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最小值',
  `max_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最大值',
  `real_start_time` datetime DEFAULT NULL COMMENT '实际生效开始时间',
  `real_end_time` datetime DEFAULT NULL COMMENT '实际生效结束时间',
  `status` int DEFAULT NULL COMMENT '发布状态。 0. 待审批 1.待发布  2.已发布',
  `publish_time` datetime DEFAULT NULL COMMENT '发布时间',
  `out_area_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '导入时空域唯一标识',
  `sync_status` int DEFAULT NULL COMMENT '同步状态。 0.未同步  1.已同步',
  `sync_time` datetime DEFAULT NULL COMMENT '同步时间',
  `validate` tinyint NOT NULL COMMENT '当前记录是否有效。 0, 无效 1.有效',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联空域配置记录（修改前的记录）',
  `ref_id` bigint DEFAULT NULL COMMENT '关联的空域记录id',
  `operate_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '操作类型. add:新建； update：修改',
  `delete_status` tinyint(1) DEFAULT '0' COMMENT '删除状态标识,0 ,未删除 1.已删除',
  `delete_time` datetime DEFAULT NULL COMMENT '删除时间',
  `delete_type` tinyint DEFAULT NULL COMMENT '删除该空域的原因: 0.删除 1.取消发布',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_area_name` (`area_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='空域配置历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `airspace_export_log`
--

DROP TABLE IF EXISTS `airspace_export_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `airspace_export_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
  `file_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '类型',
  `geo_status` int DEFAULT NULL COMMENT '包含网格码 0 包含 1 不包含',
  `file_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '素材仓库中文件id',
  `status` int DEFAULT NULL COMMENT '发布状态  0. 发布中  1.成功  2.失败',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发布者',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `export_time` datetime DEFAULT NULL COMMENT '导出时间',
  `deleted` int(1) unsigned zerofill DEFAULT NULL COMMENT '删除标志 0 未删除 1 删除',
  `export_size` int DEFAULT NULL COMMENT '数据大小',
  `area_codes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '导出的空域code集',
  `draw_range` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '绘制空域范围',
  `draw_area_info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '绘制空域信息',
  PRIMARY KEY (`id`),
  KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='空域数据导出';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_plan_history`
--

DROP TABLE IF EXISTS `flight_plan_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_plan_history` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `plan_id` int NOT NULL COMMENT '飞行计划id',
  `time` timestamp NOT NULL COMMENT '审批时间',
  `message` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '审批信息',
  `stat` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '审核状态',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `user_id` varchar(64) NOT NULL COMMENT '用户id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_plan_id` (`plan_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=182 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='审批历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_account`
--

DROP TABLE IF EXISTS `suav_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_account` (
  `id` bigint NOT NULL COMMENT '账号id，一个用户可有多种登陆方式',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `user_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户密码',
  `salt` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '随机加密盐',
  `type` smallint DEFAULT NULL COMMENT '用户账号类型0:账号密码型，1:手机验证码，2:邮箱登陆型',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除：0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  PRIMARY KEY (`id`),
  KEY `idx_account_user_account` (`user_account`),
  KEY `idx_account_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='游客用户账号以及绑定表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_gateway_request_log`
--

DROP TABLE IF EXISTS `suav_gateway_request_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_gateway_request_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求ip地址',
  `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法',
  `service_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微服务名称',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求路径',
  `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户客户端agent',
  `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  `response_time` datetime DEFAULT NULL COMMENT '响应时间',
  `cost_time` int DEFAULT NULL COMMENT '执行消耗时间',
  `http_status` int DEFAULT NULL COMMENT '请求状态',
  `is_success` bit(1) DEFAULT NULL COMMENT '业务是否请求成功',
  `platform_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台类型',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
  `code` int DEFAULT NULL COMMENT '业务响应码',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_request_time` (`request_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='请求日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_supervisor`
--

DROP TABLE IF EXISTS `suav_supervisor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_supervisor` (
  `id` bigint NOT NULL COMMENT '用户id',
  `is_system_admin` bit(1) DEFAULT b'0' COMMENT '是否是系统管理员，拥有所有权限1:是，0:否',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户账号',
  `job_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工号',
  `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户手机号',
  `email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户邮箱',
  `salt` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密随机盐',
  `password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '密码',
  `avatar` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户头像地址',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='监管用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_supervisor_login_log`
--

DROP TABLE IF EXISTS `suav_supervisor_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_supervisor_login_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `supervisor_id` bigint NOT NULL COMMENT '用户id',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆ip地址',
  `login_time` datetime DEFAULT NULL COMMENT '登陆时间',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_login_log_supervisor_id` (`supervisor_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_user`
--

DROP TABLE IF EXISTS `suav_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_user` (
  `id` bigint NOT NULL COMMENT '用户id',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户手机号',
  `email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户邮箱',
  `avatar` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '用户头像地址',
  `auth_status` int DEFAULT '0' COMMENT '认证状态，0：未认证，1、待认证，2，认证成功',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='游客用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_user_login_log`
--

DROP TABLE IF EXISTS `suav_user_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_user_login_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆ip地址',
  `login_time` datetime DEFAULT NULL COMMENT '登陆时间',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_login_log_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `suav_weak_password`
--

DROP TABLE IF EXISTS `suav_weak_password`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `suav_weak_password` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '弱密码',
  `encode_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密后的密码',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_weak_password_password` (`password`),
  UNIQUE KEY `uniq_weak_password_encoder_passwprd` (`encode_password`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='弱密码表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_area_config`
--

DROP TABLE IF EXISTS `sys_area_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_area_config` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '索引id',
  `code` varchar(128) NOT NULL COMMENT '标识唯一区域，街道以上区域采用addcode代替。（东莞精确到街道，此时采用上级addcode+街道名称拼音首字母）',
  `parent_code` varchar(64) DEFAULT NULL COMMENT '父节点code',
  `city_code` varchar(20) DEFAULT NULL COMMENT '城市编码（每个城市不同）',
  `ad_code` varchar(20) DEFAULT NULL COMMENT '街道没有独有的adcode，均继承父类（区县）的adcode',
  `level` varchar(20) DEFAULT NULL COMMENT '区域类型。country:国家，province:省份；city:地市；district：区县 street:街道',
  `name` varchar(64) DEFAULT NULL COMMENT '名称',
  `longitude` varchar(32) DEFAULT NULL COMMENT '中心坐标点经度',
  `latitude` varchar(32) DEFAULT NULL COMMENT '中心坐标点维度',
  `source` varchar(32) DEFAULT NULL COMMENT 'gaodemap:高德地图；man:人工',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_code` (`code`) USING BTREE,
  KEY `idx_parent_code` (`parent_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4038 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='系统区域表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_area_pinyin`
--

DROP TABLE IF EXISTS `sys_area_pinyin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_area_pinyin` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '索引id',
  `name` varchar(64) DEFAULT NULL COMMENT '名称',
  `pinyin` varchar(128) DEFAULT NULL COMMENT '拼音',
  `pinyin2` varchar(128) DEFAULT NULL COMMENT '修正后拼音',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3963 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='区域拼音表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace`
--

DROP TABLE IF EXISTS `zyd_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace` (
  `airs_no` int NOT NULL AUTO_INCREMENT COMMENT '空域申请唯一标识',
  `user_type` tinyint(1) NOT NULL COMMENT '用户类型',
  `appli_time` timestamp NOT NULL COMMENT '申請日期',
  `area_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域名称',
  `appli_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '申请人姓名/企业名称',
  `appli_gender` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '申请人性别',
  `appli_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '证件类型',
  `appli_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '证件号/社会信用代码',
  `appli_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '相关证件电子档/营业执照电子档',
  `appli_con_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '联系人',
  `appli_phone` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '联系电话',
  `area_unit` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '报批单位',
  `task_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行任务类型',
  `task_area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务地点',
  `max_height` int NOT NULL COMMENT '最大飞行高度',
  `start_time` timestamp NOT NULL COMMENT '起始时间',
  `end_time` timestamp NOT NULL COMMENT '结束时间',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '空域范围',
  `shape_type` tinyint(1) NOT NULL COMMENT '空域范围类型：1代表圆形，2代表多边形',
  `flyman_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手姓名',
  `flyman_gender` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手性别',
  `flyman_phone` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手联系方式',
  `flyman_num` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手身份证号',
  `flyman_numurl` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手身份证电子档',
  `flyman_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行执照类型',
  `flyman_typenum` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行执照号',
  `flyman_typeurl` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行执照电子档',
  `lic_start_time` timestamp NOT NULL COMMENT '执照有效起始时间',
  `lic_stop_time` timestamp NOT NULL COMMENT '执照有效结束时间',
  `stat` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'wait' COMMENT '审核状态',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '空域截图地址',
  `appr_file` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '审批结果文件',
  `audit_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '审批id',
  `inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '审批实例id',
  `procedure_type` int NOT NULL COMMENT '终审类型',
  `z_audit_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '终审空域id(中航空管)',
  `area_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务地点编码',
  PRIMARY KEY (`airs_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='空域申请表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_area_plan`
--

DROP TABLE IF EXISTS `zyd_area_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_area_plan` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '区域id',
  `area_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '区域名称',
  `area_type` tinyint(1) NOT NULL COMMENT '区域类型 0: 告警区域  1: 反制区域',
  `max_height` int NOT NULL COMMENT '顶高',
  `min_height` int NOT NULL COMMENT '底高',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '区域范围',
  `shape_type` tinyint(1) NOT NULL COMMENT '区域范围类型：1代表圆形，2代表多边形',
  `start_time` timestamp NOT NULL COMMENT '起始时间',
  `end_time` timestamp NOT NULL COMMENT '结束时间',
  `def_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='区域规划表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_civil_military_area_plan`
--

DROP TABLE IF EXISTS `zyd_civil_military_area_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_civil_military_area_plan` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '区域id',
  `area_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '区域名称',
  `area_type` tinyint(1) NOT NULL COMMENT '区域类型 0: 测试区域  1:禁飞区域',
  `max_height` int NOT NULL COMMENT '顶高',
  `min_height` int NOT NULL COMMENT '底高',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '区域范围',
  `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '缩略图路径',
  `shape_type` tinyint(1) NOT NULL COMMENT '区域范围类型：1代表圆形，2代表多边形',
  `start_time` timestamp NOT NULL COMMENT '起始时间',
  `end_time` timestamp NOT NULL COMMENT '结束时间',
  `def_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  `company_id` bigint DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_planarea_starttime` (`start_time`),
  KEY `idx_planarea_endtime` (`end_time`)
) ENGINE=InnoDB AUTO_INCREMENT=275 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='军民融合区域规划表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_flight_plan`
--

DROP TABLE IF EXISTS `zyd_flight_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_flight_plan` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '飞行计划id',
  `plan_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '计划名称',
  `max_height` int NOT NULL COMMENT '顶高',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行计划范围',
  `shape_type` tinyint(1) NOT NULL COMMENT '飞行计划范围类型：1代表圆形，2代表多边形',
  `start_time` timestamp NOT NULL COMMENT '起始时间',
  `end_time` timestamp NOT NULL COMMENT '结束时间',
  `flyman_num` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '飞手证件号',
  `orther` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注信息',
  `appli_time` timestamp NOT NULL COMMENT '申请时间',
  `stat` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'wait' COMMENT '审核状态',
  `def_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `height_type` tinyint NOT NULL COMMENT '高度类型 1: 相对高度, 2: 海拔高度',
  `is_corridor` tinyint NOT NULL COMMENT '是否为安全走廊： 0 否  1 是',
  `min_height` int NOT NULL COMMENT '底高',
  `pic_url` varchar(255) NOT NULL COMMENT '区域截图',
  `certification_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '认证编码',
  `min_height_alt` int DEFAULT NULL COMMENT '最低高度(海拔)',
  `min_height_rel` int DEFAULT NULL COMMENT '最低高度(相对)',
  `max_height_rel` int DEFAULT NULL COMMENT '最大高度(相对)',
  `max_height_alt` int DEFAULT NULL COMMENT '最大高度(海拔)',
  `altitude` int DEFAULT NULL COMMENT '海拔',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1507 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='飞行计划表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_uav`
--

DROP TABLE IF EXISTS `zyd_uav`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_uav` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `airspace_id` int NOT NULL COMMENT '绑定空域编号',
  `uav_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机实名登记号',
  `uav_level` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机级别',
  `mnf_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '生产厂家',
  `model_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机型号',
  `shape` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机形态',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_air_no` (`airspace_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='绑定无人机表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'suav_supervision'
--

--
-- Dumping routines for database 'suav_supervision'
--

--
-- Current Database: `uav_airspace`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_airspace` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_airspace`;

--
-- Table structure for table `airport`
--

DROP TABLE IF EXISTS `airport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `airport` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `code4` varchar(20) DEFAULT NULL,
  `code3` text,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `city` text,
  `province` text,
  `latitude` double DEFAULT NULL,
  `longitude` double DEFAULT NULL,
  `type` int DEFAULT NULL COMMENT '1：民用；2通航；3：农化4：军用；',
  `grade` int DEFAULT NULL,
  `weathercode1` varchar(16) DEFAULT NULL,
  `latitude_baidu` double DEFAULT NULL,
  `longitude_baidu` double DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE,
  UNIQUE KEY `code4` (`code4`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1827 DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `clean_airspace`
--

DROP TABLE IF EXISTS `clean_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clean_airspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `shapetype` int DEFAULT NULL,
  `baidu_shapedescription` text,
  `shapedescription` text,
  `lowerheight` int DEFAULT NULL,
  `upperheight` int DEFAULT NULL,
  `alerttime` int DEFAULT NULL,
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb3 COMMENT='净空区';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `daiw_airspace`
--

DROP TABLE IF EXISTS `daiw_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `daiw_airspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `shapetype` int DEFAULT NULL,
  `baidu_shapedescription` text COMMENT '百度地图坐标',
  `shapedescription` text,
  `lowerheight` int DEFAULT NULL,
  `upperheight` int DEFAULT NULL,
  `groupid` int DEFAULT NULL,
  `alerttime` int DEFAULT NULL,
  `activetime` text,
  `inactivetime` text,
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3 COMMENT='危险区';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `efence_airspace`
--

DROP TABLE IF EXISTS `efence_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `efence_airspace` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '电子围栏ID',
  `area_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '电子围栏名称',
  `area_type` int DEFAULT NULL COMMENT '电子围栏类型',
  `shape_type` int DEFAULT NULL COMMENT '电子围栏形状类型',
  `bottom_hgt` int DEFAULT NULL COMMENT '电子围栏底高',
  `top_hgt` int DEFAULT NULL COMMENT '电子围栏顶高',
  `area_range` text COMMENT '电子围栏范围',
  `enabled` int DEFAULT NULL COMMENT '是否启用电子围栏',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人名称',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人名称',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人ID',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int DEFAULT NULL COMMENT '0保留,1假删除',
  `clockwise` tinyint DEFAULT NULL COMMENT '多变形范围顺序  0顺时针  1逆时针',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=790 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='电子围栏表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `erail_airspace`
--

DROP TABLE IF EXISTS `erail_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `erail_airspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `shapetype` int DEFAULT NULL COMMENT '1:多边形；2:圆',
  `shapedescription` text,
  `lowerheight` int DEFAULT NULL,
  `upperheight` int DEFAULT NULL,
  `alerttime` int DEFAULT NULL,
  `baidu_shapedescription` text,
  `activetime` text,
  `inactivetime` text,
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=171 DEFAULT CHARSET=utf8mb3 COMMENT='电子围栏';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fixpoint`
--

DROP TABLE IF EXISTS `fixpoint`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fixpoint` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` text,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `longitude` double DEFAULT NULL,
  `latitude` double DEFAULT NULL,
  `altitude` int DEFAULT NULL,
  `type` int DEFAULT NULL,
  `longitude_baidu` double DEFAULT NULL,
  `latitude_baidu` double DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=9864 DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `forbid_airspace`
--

DROP TABLE IF EXISTS `forbid_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `forbid_airspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `shapetype` int DEFAULT NULL,
  `baidu_shapedescription` text,
  `shapedescription` text,
  `lowerheight` int DEFAULT NULL,
  `upperheight` int DEFAULT NULL,
  `alerttime` int DEFAULT NULL,
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb3 COMMENT='禁区';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `point_info`
--

DROP TABLE IF EXISTS `point_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `point_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sort_number` int DEFAULT NULL COMMENT '打点顺序',
  `lat02` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng02` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `lat84` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `lng84` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `airspace_id` int DEFAULT NULL COMMENT '关联的空域id',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=896 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='空域点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `restrict_airspace`
--

DROP TABLE IF EXISTS `restrict_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `restrict_airspace` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  `shapetype` int DEFAULT NULL,
  `baidu_shapedescription` text,
  `shapedescription` text,
  `lowerheight` int DEFAULT NULL,
  `upperheight` int DEFAULT NULL,
  `alerttime` int DEFAULT NULL,
  `activetime` text,
  `inactivetime` text,
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb3 COMMENT='限制区';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `route`
--

DROP TABLE IF EXISTS `route`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `route` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `waypoints` text,
  `width` int DEFAULT NULL,
  `type` int DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2537 DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace`
--

DROP TABLE IF EXISTS `zyd_airspace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace` (
  `airs_no` int NOT NULL AUTO_INCREMENT COMMENT '空域申请唯一标识',
  `user_type` tinyint(1) NOT NULL COMMENT '用户类型',
  `appli_time` datetime NOT NULL COMMENT '申請日期',
  `area_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域名称',
  `appli_name` varchar(50) NOT NULL COMMENT '申请人姓名/企业名称',
  `appli_gender` varchar(10) DEFAULT NULL COMMENT '申请人性别',
  `appli_type` varchar(20) DEFAULT NULL COMMENT '证件类型',
  `appli_num` varchar(20) NOT NULL COMMENT '证件号/社会信用代码',
  `appli_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '相关证件电子档/营业执照电子档',
  `appli_con_name` varchar(50) DEFAULT NULL COMMENT '联系人',
  `appli_phone` varchar(12) NOT NULL COMMENT '联系电话',
  `area_unit` varchar(20) NOT NULL COMMENT '报批单位',
  `task_type` varchar(20) NOT NULL COMMENT '飞行任务类型',
  `task_area` varchar(255) NOT NULL COMMENT '任务地点',
  `max_height` int NOT NULL COMMENT '最大飞行高度',
  `start_time` datetime NOT NULL COMMENT '起始时间',
  `end_time` datetime NOT NULL COMMENT '结束时间',
  `area_range` text NOT NULL COMMENT '空域范围',
  `shape_type` tinyint(1) NOT NULL COMMENT '空域范围类型：1代表圆形，2代表多边形',
  `flyman_name` text NOT NULL COMMENT '飞手姓名',
  `flyman_gender` varchar(10) NOT NULL COMMENT '飞手性别',
  `flyman_phone` varchar(12) NOT NULL COMMENT '飞手联系方式',
  `flyman_num` varchar(18) NOT NULL COMMENT '飞手身份证号',
  `flyman_numurl` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞手身份证电子档',
  `flyman_type` varchar(20) NOT NULL COMMENT '飞行执照类型',
  `flyman_typenum` varchar(20) NOT NULL COMMENT '飞行执照号',
  `flyman_typeurl` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '飞行执照电子档',
  `lic_start_time` timestamp NOT NULL COMMENT '执照有效起始时间',
  `lic_stop_time` timestamp NOT NULL COMMENT '执照有效结束时间',
  `stat` varchar(10) NOT NULL DEFAULT 'wait' COMMENT '审核状态',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  `company_id` varchar(100) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` varchar(100) NOT NULL COMMENT '空域截图地址',
  `appr_file` varchar(500) DEFAULT NULL COMMENT '审批结果文件',
  `audit_id` varchar(100) DEFAULT NULL COMMENT '审批id',
  `inst_id` varchar(64) DEFAULT NULL COMMENT '审批实例id',
  `procedure_type` int NOT NULL COMMENT '终审类型',
  `z_audit_id` varchar(20) DEFAULT NULL COMMENT '终审空域id(中航空管)',
  `area_code` varchar(255) NOT NULL COMMENT '任务地点编码',
  `radius` int DEFAULT NULL COMMENT '空域半径',
  PRIMARY KEY (`airs_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=877 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='空域申请表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace_capacity`
--

DROP TABLE IF EXISTS `zyd_airspace_capacity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace_capacity` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '容量表id',
  `airs_no` int NOT NULL COMMENT '临时空域编号  存zyd_airspace的airs_no',
  `seq_no` int NOT NULL COMMENT '临时空域时间段编号  存zyd_airspace_time的seq_no',
  `capacity` int NOT NULL COMMENT '空域容量值',
  `status` int NOT NULL DEFAULT '0' COMMENT '状态 0:正常，1:禁用',
  `def_date` datetime DEFAULT NULL COMMENT '创建时间',
  `def_usr_id` varchar(20) DEFAULT NULL COMMENT '创建用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='空域容量表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace_historical_data`
--

DROP TABLE IF EXISTS `zyd_airspace_historical_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace_historical_data` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `airs_no` int NOT NULL COMMENT '所属空域编码',
  `area_type` int DEFAULT NULL COMMENT '空域类型，1为临时飞行区，2为限制区，3为禁区，4为净空区，5为危险区',
  `uav_sorties` int NOT NULL COMMENT '无人机架次 一天内同一架飞机多次进出或停留在同一空域按一次算',
  `statistical_date` date NOT NULL COMMENT '统计日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='空域历史统计表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace_option`
--

DROP TABLE IF EXISTS `zyd_airspace_option`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace_option` (
  `id` int DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT '名字',
  `label` varchar(255) DEFAULT NULL COMMENT '标签',
  `color` varchar(255) DEFAULT NULL COMMENT '颜色'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='空域配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_airspace_real_data`
--

DROP TABLE IF EXISTS `zyd_airspace_real_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_airspace_real_data` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编号',
  `airs_no` int NOT NULL COMMENT '所属空域编号',
  `area_type` int NOT NULL COMMENT '空域类型，1为临时飞行区，2为限制区，3为禁区，4为净空区，5为危险区',
  `sampl_time` datetime NOT NULL COMMENT '采样时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='空域实时数据表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_area_limit`
--

DROP TABLE IF EXISTS `zyd_area_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_area_limit` (
  `airs_no` int NOT NULL AUTO_INCREMENT COMMENT '空域序号',
  `area_name` varchar(50) NOT NULL COMMENT '空域名称',
  `area_type` int NOT NULL COMMENT '空域类型，1为临时飞行区，2为限制区，3为禁区，4为净空区，5为危险区',
  `area_range` text NOT NULL COMMENT '空域范围',
  `shape_type` int NOT NULL COMMENT '空域范围类型：1代表圆形，2代表多边形',
  `top_hgt` decimal(10,2) DEFAULT NULL COMMENT '顶高',
  `bottom_hgt` decimal(10,2) DEFAULT NULL COMMENT '底高',
  `alert_start` datetime DEFAULT NULL COMMENT '告警起始时间',
  `alert_end` datetime DEFAULT NULL COMMENT '告警结束时间',
  `def_usr_id` varchar(20) DEFAULT NULL COMMENT '创建用户',
  `def_date` datetime DEFAULT NULL COMMENT '创建日期',
  `upd_usr_id` varchar(20) DEFAULT NULL COMMENT '修改用户',
  `upd_date` datetime DEFAULT NULL COMMENT '修改日期',
  `is_delete` tinyint(1) DEFAULT '0' COMMENT '删除标志，-1为删除，0为未删除',
  PRIMARY KEY (`airs_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='空域限制表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_dic_flytask`
--

DROP TABLE IF EXISTS `zyd_dic_flytask`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_dic_flytask` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `flytask_type` varchar(50) NOT NULL COMMENT '飞行任务类型名称',
  `xh` int DEFAULT NULL COMMENT '序号，可以用于排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 COMMENT='飞行任务类型字典表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zyd_uav`
--

DROP TABLE IF EXISTS `zyd_uav`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zyd_uav` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `airspace_id` int NOT NULL COMMENT '绑定空域编号',
  `uav_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机实名登记号',
  `uav_level` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机级别',
  `mnf_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '生产厂家',
  `model_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机型号',
  `shape` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机形态',
  PRIMARY KEY (`id`),
  KEY `idx_air_no` (`airspace_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1589 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='绑定无人机表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_airspace'
--

--
-- Dumping routines for database 'uav_airspace'
--
/*!50003 DROP PROCEDURE IF EXISTS `auto_inc_seq_no` */;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection  = utf8mb3_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`fss`@`%` PROCEDURE `auto_inc_seq_no`(in airsno INTEGER,in starttime TIMESTAMP,in endtime TIMESTAMP,in defusr VARCHAR(20),
		in defdate TIMESTAMP,in updusr VARCHAR(20),in upddate TIMESTAMP)
BEGIN
		SELECT MAX(seq_no) FROM zyd_airspace_time WHERE airs_no=airsno INTO @seqno;
		insert into zyd_airspace_time (airs_no, seq_no, start_time,
					end_time, def_usr_id, def_date,
					upd_usr_id, upd_date) VALUES(airsno,IFNULL(@seqno,0)+1,starttime,endtime,defusr,defdate,updusr,upddate);
END ;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Current Database: `uav_alarm`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_alarm` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_alarm`;

--
-- Table structure for table `uav_alarm`
--

DROP TABLE IF EXISTS `uav_alarm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_alarm` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警名称',
  `alarm_object` varchar(50) NOT NULL COMMENT '监控对象',
  `alarm_index` varchar(50) NOT NULL COMMENT '监控指标（速度、高度、电量、GPS搜星、信号、空域）',
  `alarm_trigger` varchar(50) NOT NULL COMMENT '触发条件（大于、小于、大于或等于、小于或等于、闯入、闯出）',
  `trigger_value` varchar(50) NOT NULL COMMENT '触发值（整数、空域ID【空域类型-空域名称】）',
  `alarm_level` varchar(50) NOT NULL COMMENT '告警级别',
  `notice_way` varchar(50) NOT NULL COMMENT '通知方式',
  `notice_object` varchar(1000) NOT NULL COMMENT '通知对象列表',
  `is_available` int NOT NULL DEFAULT '0' COMMENT '启用标志，1为禁用，0为启用',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `url` varchar(100) DEFAULT NULL COMMENT '通知链接',
  PRIMARY KEY (`id`),
  KEY `idx_uav_alarm_alarm_object` (`alarm_object`),
  KEY `idx_uav_alarm_alarm_index` (`alarm_index`),
  KEY `idx_uav_alarm_alarm_level` (`alarm_level`),
  KEY `idx_uav_plane_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自定义告警信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_alarm_event`
--

DROP TABLE IF EXISTS `uav_alarm_event`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_alarm_event` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_id` bigint NOT NULL COMMENT '告警Id',
  `event_object` varchar(50) NOT NULL COMMENT '异常对象',
  `event_index` varchar(50) NOT NULL COMMENT '异常指标',
  `event_content` text NOT NULL COMMENT '告警内容',
  `alarm_level` varchar(50) NOT NULL COMMENT '告警级别',
  `event_start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '告警时间',
  `event_stat` int NOT NULL DEFAULT '0' COMMENT '处理结果: 0未处理，1已处理',
  `event_end_time` timestamp NULL DEFAULT NULL COMMENT '告警处理时间',
  `related_opt` varchar(50) DEFAULT NULL COMMENT '关联作业',
  `operator` varchar(50) DEFAULT NULL COMMENT '执行人',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `event_en_content` text NOT NULL COMMENT '英文告警内容',
  `event_ch_content` text NOT NULL COMMENT '简体告警内容',
  `event_tw_content` text NOT NULL COMMENT '繁体告警内容',
  PRIMARY KEY (`id`),
  KEY `idx_uav_alarm_event_alarm_id` (`alarm_id`),
  KEY `idx_uav_alarm_event_event_object` (`event_object`),
  KEY `idx_uav_alarm_event_event_index` (`event_index`),
  KEY `idx_uav_alarm_event_event_level` (`alarm_level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警事件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_alarm'
--

--
-- Dumping routines for database 'uav_alarm'
--

--
-- Current Database: `uav_brain`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_brain` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_brain`;

--
-- Table structure for table `scene_category_config`
--

DROP TABLE IF EXISTS `scene_category_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `scene_category_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `scene_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '场景分类,bodyAnalysis人体分析；vehicleAnalysis 车辆分析；imageDistinguish 图像识别；imageEnhancement 图像增强',
  `title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '列表页场景标题',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '列表页场景内容',
  `title_lang` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'title对应多语言',
  `content_lang` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'content对应多语言值',
  `cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '列表页场景封面',
  `is_show` tinyint(1) DEFAULT '1' COMMENT '是否展示(1.展示  0.不展示)',
  `sort` int DEFAULT NULL COMMENT '排序字段从小到大(1,2,3,4)',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `scene_category` (`scene_category`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scene_type_config`
--

DROP TABLE IF EXISTS `scene_type_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `scene_type_config` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '自动生成编号',
  `data_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI识别数据类型,image:图像;video:视频',
  `scene_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '场景分类,bodyAnalysis人体分析，vehicleAnalysis 车辆分析;imageDistinguish 图像识别；\nimageEnhancement:图像增强',
  `type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'humanDetection:人体检测; crowdCount:人群计数;\ntrafficStatistics:人流量系统;\npedestrianCognition;行人认知；\nvehicleIdentification:车辆识别；\nlpr:车牌识别；\nsafetyHelmetIdentification:安全帽识别；\nroadSegmention:道路分割；\nimageDefogging:图像去雾',
  `title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '列表页场景标题',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '列表页场景内容',
  `title_lang` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'title对应多语言翻译值',
  `content_lang` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'content对应的多语言翻译值',
  `cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '列表页场景封面',
  `detail_cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详情页面头部封面',
  `images` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图像路径列表，JSON数组字符串',
  `result_images` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图像路径列表，JSON数组字符串',
  `scene_content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '详情页应用场景内容',
  `scene_content_lang` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '场景描述对应多语言值',
  `scene_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详情页应用场景图像',
  `can_use` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否可用AI(1.可用  0.不可用）',
  `is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否展示(1.展示  0.不展示)',
  `sort` int NOT NULL DEFAULT '10' COMMENT '排序字段从小到大(1,2,3,4)',
  `detail_path` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '跳转路径，详情页路径',
  `page_tpl` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详情页面模板类型：\n1.展示图像对比效果；\n2.只展示结果图片',
  `ai_platform` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用Ai平台类型:triton,tensorFlow ',
  `inner_ai_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '内部应用场景类型',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `code` (`code`) USING BTREE,
  UNIQUE KEY `type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_brain'
--

--
-- Dumping routines for database 'uav_brain'
--

--
-- Current Database: `uav_cloud_live`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_cloud_live` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_cloud_live`;

--
-- Table structure for table `device_relate_address`
--

DROP TABLE IF EXISTS `device_relate_address`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_relate_address` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户ID',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接入设备标识',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `longitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '经度',
  `latitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '纬度',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备地址（地址变更时新建记录）',
  `uav_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器类型(uav：无人机）',
  `uav_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器设备ID,设备变更新建记录',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_device_code` (`device_code`),
  KEY `idx_start_time` (`start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=20194 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='设备关联位置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_relate_info`
--

DROP TABLE IF EXISTS `device_relate_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_relate_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户ID',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接入设备标识',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `uav_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器类型(uav：无人机）',
  `uav_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '飞行器设备ID,设备变更时新建记录',
  `longitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '经度',
  `latitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '纬度',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备地址',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_device_code` (`device_code`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_uav_code` (`uav_code`)
) ENGINE=InnoDB AUTO_INCREMENT=7818 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='设备号关联无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flow_def`
--

DROP TABLE IF EXISTS `flow_def`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flow_def` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `chain_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程ID',
  `chain_name` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程标识',
  `chain` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义',
  `chain_plugin` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程插件描述',
  `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程描述',
  `is_lock` tinyint NOT NULL DEFAULT '0' COMMENT '是否锁定',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_chain_name` (`chain_name`),
  UNIQUE KEY `uniq_chain_id` (`chain_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='流程定义表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flow_status`
--

DROP TABLE IF EXISTS `flow_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flow_status` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `flow_instance_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程ID',
  `status` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '状态：submit:提交；stop:停止',
  `auto_monitor` tinyint NOT NULL COMMENT '是否启动自动监视资源。0.未启用 1.启用',
  `heat_time` timestamp NOT NULL COMMENT '心跳时间,最近一次客户端心跳时间',
  `heartbeat_timeout` int DEFAULT NULL COMMENT '心跳超时时长',
  `is_recovered` tinyint NOT NULL COMMENT '资源是否完成回收:0 未知；1.完成；',
  `update_at` datetime NOT NULL COMMENT '更新时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `flow_instance_id` (`flow_instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flow_stream_config`
--

DROP TABLE IF EXISTS `flow_stream_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flow_stream_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `mission_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务编号',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '对应设备编号',
  `plugin_args` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '插件参数',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '视频流ID',
  `plugin_task_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '对应视频流设备编号',
  `update_at` datetime NOT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_mission_code` (`mission_code`,`plugin_args`)
) ENGINE=InnoDB AUTO_INCREMENT=4885 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='流程视频流关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flow_task_tpl`
--

DROP TABLE IF EXISTS `flow_task_tpl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flow_task_tpl` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_name` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名',
  `app_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '微服务名',
  `config_tpl` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务模板',
  `update_at` datetime NOT NULL COMMENT '更新时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `task_name` (`task_name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_broadcast`
--

DROP TABLE IF EXISTS `live_broadcast`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_broadcast` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '租户id',
  `activity_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '活动名称',
  `start_time` datetime DEFAULT NULL COMMENT '直播活动开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '直播活动结束时间',
  `device_source` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '直播设备来源。\r\nsystem:系统;\r\ncustom:自定义',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '直播设备编号',
  `device_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '直播设备名称',
  `play_url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '直播地址',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者用户id',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_name` (`tenant_id`,`activity_name`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_end_time` (`end_time`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='直播活动表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_plugin_config`
--

DROP TABLE IF EXISTS `live_plugin_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_plugin_config` (
  `id` bigint NOT NULL COMMENT 'id',
  `plugin_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件名',
  `plugin_description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件描述',
  `query_param` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件请求参数',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_plugin_name` (`plugin_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='插件模块配置信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_plugin_metadata`
--

DROP TABLE IF EXISTS `live_plugin_metadata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_plugin_metadata` (
  `id` bigint NOT NULL COMMENT 'id',
  `plugin_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'plugin名字',
  `plugin_description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'plugin描述',
  `endpoint` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'plugin对应的endpoint信息',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_plugin_metadata_constraint` (`plugin_name`),
  KEY `live_plugin_metadata_index_1` (`plugin_name`,`endpoint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='插件模块的元数据定义';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_plugin_task`
--

DROP TABLE IF EXISTS `live_plugin_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_plugin_task` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `plugin_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '需要调用的插件模块',
  `plugin_task_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件任务实例标识',
  `plugin_args` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件任务类型名字',
  `flow_instance_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '对应流程ID',
  `out_stream_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '输出流ID',
  `request_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '插件任务请求参数负载',
  `status` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '算子运行状态, RUNNING,COMPLETED',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_plugin_task_constraint` (`plugin_name`,`plugin_task_id`),
  KEY `live_plugin_task_index_1` (`plugin_task_id`),
  KEY `idx_flow_instance_id` (`flow_instance_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5820 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='对插件模块调用的任务';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_workflow_chain_metadata`
--

DROP TABLE IF EXISTS `live_workflow_chain_metadata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_workflow_chain_metadata` (
  `id` bigint NOT NULL COMMENT 'id',
  `chain_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'chain名字',
  `chain_description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'chain描述',
  `chain_structure` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'chain結構',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_workflow_chain_metadata_constraint` (`chain_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='插件模块的元数据定义';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_workflow_plugin_mapping`
--

DROP TABLE IF EXISTS `live_workflow_plugin_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_workflow_plugin_mapping` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `flow_instance_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流任务实例id',
  `plugin_task_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI任务标识',
  `plugin_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI任务类型名字',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_workflow_plugin_mapping_constraint_1` (`flow_instance_id`,`plugin_name`,`plugin_task_id`),
  KEY `live_workflow_plugin_mapping_index_1` (`flow_instance_id`,`plugin_name`,`plugin_task_id`),
  KEY `idx_plugin_task_idx` (`plugin_task_id`)
) ENGINE=InnoDB AUTO_INCREMENT=23293 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工作流任务与AI模块的绑定关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `live_workflow_task`
--

DROP TABLE IF EXISTS `live_workflow_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `live_workflow_task` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `flow_instance_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流任务实例id',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户ID(公司ID)',
  `user_id` varchar(320) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `chain_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程模板',
  `mission_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '飞行任务code',
  `device_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '载荷信息code',
  `req_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '原始请求参数',
  `task_slot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流任务执行的数据',
  `task_message` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流任务执行的结果消息',
  `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流任务实例运行的状态,IN_PROGRESS,RUNNING,COMPLETED,FAILED',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_workflow_task_constraint_1` (`flow_instance_id`),
  UNIQUE KEY `live_workflow_task_constraint_2` (`chain_name`,`mission_code`,`device_code`),
  KEY `live_workflow_task_index_1` (`flow_instance_id`),
  KEY `live_workflow_task_index_2` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=8741 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工作流调度的任务';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stream_config`
--

DROP TABLE IF EXISTS `stream_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `stream_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `app_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用标识',
  `stream_hub` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流分类',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接入设备标识',
  `device_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备名称',
  `engine_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'uav' COMMENT '接入流服务引擎标识。uav:中移凌云 ，migu:咪咕',
  `record` tinyint NOT NULL DEFAULT '1' COMMENT '是否录制。 0.不录制 1.录制',
  `save` tinyint NOT NULL DEFAULT '1' COMMENT '是否保存. 0.不保存 。1.保存',
  `temp` tinyint NOT NULL DEFAULT '0' COMMENT '是否为临时流。 0. 否 1.临时流',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `pull_stream_config` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '拉流信息配置',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `uav_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器设备ID',
  `uav_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器类型(uav：无人机）',
  `longitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '经度',
  `latitude` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '纬度',
  `address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备地址信息',
  `remark` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_device_code` (`device_code`),
  UNIQUE KEY `uniq_device_name` (`tenant_id`,`device_name`),
  KEY `idx_stream_id` (`stream_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12358 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备流配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stream_file_config`
--

DROP TABLE IF EXISTS `stream_file_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `stream_file_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `stream_hub` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流分类',
  `stream_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `file_save_time` bigint DEFAULT NULL COMMENT '保存时长',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_project_manage`
--

DROP TABLE IF EXISTS `sys_project_manage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_project_manage` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `project_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'minio中projectId',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_stream_id` (`stream_id`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目管理配置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_merge_task`
--

DROP TABLE IF EXISTS `video_merge_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_merge_task` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户ID',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `task_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务编号（唯一编号）',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接入设备标识',
  `task_source` varchar(16) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '合成任务来源:ob:作业回传影像；flight:飞行记录; playback:数据回放&视频回放；other:其他',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `plus_video` tinyint DEFAULT NULL COMMENT '是否补全视频',
  `start_time` datetime NOT NULL COMMENT '视频开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '视频结束时间',
  `video_start_time` datetime DEFAULT NULL COMMENT '视频实际开始时间',
  `video_end_time` datetime DEFAULT NULL COMMENT '视频实际结束时间',
  `video_time` bigint DEFAULT NULL COMMENT '合成视频实际时长',
  `file_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储文件名',
  `project_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'minio中projectId（存储项目位置）',
  `file_info` varchar(10000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件存储id，名称',
  `task_status` int DEFAULT NULL COMMENT '任务执行状态:0 .待执行 1.执行中； 2.成功完成  3.合成错误  4.合成失败',
  `last_execute_tm` datetime DEFAULT NULL COMMENT '最近一次合成的时间',
  `expect_start_tm` datetime DEFAULT NULL COMMENT '期往下次存储时间',
  `retries` int DEFAULT NULL COMMENT '成成尝试次数',
  `spent` int DEFAULT NULL COMMENT '耗费时间',
  `result_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '合成失败原因',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  `source` int DEFAULT NULL COMMENT '任务来源，0：手动，1：自动',
  `part_file` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分片文件id列表',
  PRIMARY KEY (`id`),
  UNIQUE KEY `task_code` (`task_code`),
  KEY `idx_video_start_time` (`video_start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=48093 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_merge_task_result`
--

DROP TABLE IF EXISTS `video_merge_task_result`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_merge_task_result` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务编号',
  `file_index` int DEFAULT NULL COMMENT '文件顺序号1，2，3',
  `file_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储文件名',
  `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件id',
  `file_size` bigint DEFAULT NULL COMMENT '文件大小（B）',
  `file_start_time` datetime DEFAULT NULL COMMENT '文件实际开始时间',
  `file_end_time` datetime DEFAULT NULL COMMENT '文件实际结束时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_task_file` (`task_code`,`file_index`),
  KEY `idx_file_id` (`file_id`)
) ENGINE=InnoDB AUTO_INCREMENT=28508 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='视频文件明细表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_part`
--

DROP TABLE IF EXISTS `video_part`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_part` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `app_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用标识',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户ID',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接入设备唯一标识',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '视频流ID',
  `file_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件名',
  `start_time` timestamp NULL DEFAULT NULL COMMENT '开始时间戳',
  `video_time` int DEFAULT NULL COMMENT '视频时长',
  `end_time` timestamp NULL DEFAULT NULL COMMENT '结束时间戳',
  `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件存储id',
  `file_size` bigint DEFAULT NULL COMMENT '视频大小字节',
  `file_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'part:分片；temp:临时；all:全部；',
  `status` tinyint DEFAULT NULL COMMENT '状态( 0.待通知存储 1.存储成功 2. 通知失败 3.存储失败）',
  `sub_dir` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储文件夹',
  `engine_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'minio.mino网盘；warehouse:中移凌云素仓;aliyunOss;阿里云oss.',
  `retries` int DEFAULT NULL COMMENT '保存尝试次数',
  `expect_start_tm` timestamp NULL DEFAULT NULL COMMENT '期存下次储时望间',
  `last_expect_tm` timestamp NULL DEFAULT NULL COMMENT '最近一次转存的时间',
  `spent` int DEFAULT NULL COMMENT '耗费时间',
  `result_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储失败原因',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_file_name` (`stream_id`,`file_name`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_device_code` (`device_code`),
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=34027796 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='视频文件分片配置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_recycle`
--

DROP TABLE IF EXISTS `video_recycle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_recycle` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务编号',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户ID',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `mission_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联的任务编号',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备编号',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流ID',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint DEFAULT NULL COMMENT '状态。 0.待生成回收记录； 1.待删除素材仓库  2.完成',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_task_code` (`task_code`)
) ENGINE=InnoDB AUTO_INCREMENT=3316 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='视频分片回收任务表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_recycle_item`
--

DROP TABLE IF EXISTS `video_recycle_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_recycle_item` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '对应任务编号',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '对应素材仓库fileId',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '载荷编号',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流id编号',
  `file_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件名',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint DEFAULT NULL COMMENT '0.待回收 1.回收成功 2.回收失败',
  `retries` int DEFAULT NULL COMMENT '尝试次数',
  `expect_start_tm` datetime DEFAULT NULL COMMENT '期望开始执行回收时间',
  `last_execute_tm` datetime DEFAULT NULL COMMENT '最近一次执行时间',
  `result_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执行结果',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_task_code` (`task_code`)
) ENGINE=InnoDB AUTO_INCREMENT=198238 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='视频分片回收明细表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `video_segment`
--

DROP TABLE IF EXISTS `video_segment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `video_segment` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户ID',
  `uav_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器类型(uav：无人机）',
  `uav_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器设备ID',
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接入设备标识',
  `stream_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流ID',
  `start_time` datetime DEFAULT NULL COMMENT '视频开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '视频结束时间',
  `video_time` bigint DEFAULT NULL COMMENT '视频时长',
  `file_size` bigint DEFAULT NULL COMMENT '视频片段文件时长(B)',
  `location_tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '位置信息',
  `status` tinyint DEFAULT NULL COMMENT '状态（0，未结束 1，分段结束）',
  `pos_status` tinyint DEFAULT '0' COMMENT '0.未同步 1.已从轨迹修正  2. 同步未成功，继续尝试同步 3.获取失败,放弃同步 4. 来自无人机实时位置',
  `pos_update_time` datetime DEFAULT NULL COMMENT '最近一次调用航线轨迹时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_device_code` (`device_code`,`start_time`),
  KEY `idx_uav_code` (`uav_code`),
  KEY `idx_end_time` (`end_time`),
  KEY `idx_start_time` (`start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=43033 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='视频分段表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_cloud_live'
--

--
-- Dumping routines for database 'uav_cloud_live'
--

--
-- Current Database: `uav_data_post_process`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_data_post_process` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_data_post_process`;

--
-- Table structure for table `data_management`
--

DROP TABLE IF EXISTS `data_management`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `data_management` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '数据管理id',
  `name` varchar(20) DEFAULT NULL COMMENT '数据集名称',
  `area` varchar(128) DEFAULT NULL COMMENT '地区',
  `longitude` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `data_type` tinyint DEFAULT NULL COMMENT '影像类型(0:正射;1:倾斜)',
  `num` int DEFAULT NULL COMMENT '影像数量',
  `data_size` bigint DEFAULT NULL COMMENT '数据大小',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
  `create_name` varchar(255) DEFAULT NULL COMMENT '创建人名字',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注信息',
  `status` tinyint NOT NULL COMMENT '状态：0 上传中 1 上传成功 2上传失败',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `percentage` double unsigned DEFAULT '0' COMMENT '上传进度(0-1)',
  `mw_id` varchar(100) DEFAULT NULL COMMENT '本地上传素材仓库id',
  `is_delete` tinyint unsigned DEFAULT '0' COMMENT '0 保留 1删除',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `error_message` varchar(100) DEFAULT NULL COMMENT '错误信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=158 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据管理表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pic_management`
--

DROP TABLE IF EXISTS `pic_management`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pic_management` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '图片管理id',
  `data_id` int DEFAULT NULL COMMENT '数据管理id',
  `pic_name` varchar(50) DEFAULT NULL COMMENT '图片名称',
  `type` int DEFAULT NULL COMMENT '类型(0:素材仓库,1:本地)',
  `mw_id` varchar(100) DEFAULT NULL COMMENT '素材仓库项目id',
  `pic_id` varchar(100) DEFAULT NULL COMMENT '图片id',
  `pic_terra_id` varchar(45) DEFAULT NULL COMMENT 'terra中阿里云图片id',
  `size` bigint DEFAULT NULL COMMENT '图片大小',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8586 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='图片信息管理表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `product_management`
--

DROP TABLE IF EXISTS `product_management`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_management` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '生产管理id',
  `name` varchar(20) DEFAULT NULL COMMENT '任务名称',
  `task_type` tinyint DEFAULT NULL COMMENT '任务类型（0:二维建图、1:三维建模）',
  `area` varchar(128) DEFAULT NULL COMMENT '地区',
  `coordinate_system` int DEFAULT NULL COMMENT '坐标系（0：WGS84;1:CGCS2000）',
  `rebuild_accuracy` int DEFAULT NULL COMMENT '重建精度（1：高；2：中；3：低）',
  `scence_type` tinyint DEFAULT NULL COMMENT '场景类型(0代表农田模式 1代表城市模式 2代表果树模式 3普通环境 4环绕环境)',
  `source_id` int DEFAULT NULL COMMENT '影像数据集id',
  `source_name` varchar(20) DEFAULT NULL COMMENT '影像集名称',
  `source_num` int DEFAULT NULL COMMENT '影像数量',
  `source_size` bigint DEFAULT NULL COMMENT '影像图片文件大小',
  `mw_id` varchar(100) DEFAULT NULL COMMENT '结果素材仓库项目id',
  `result_report_id` varchar(100) DEFAULT NULL COMMENT '输出报告id',
  `point_cloud_type` varchar(50) DEFAULT NULL COMMENT '输出点云格式',
  `result_type` varchar(512) DEFAULT NULL COMMENT '输出结果类型',
  `is_coloured` int DEFAULT NULL COMMENT '是否是彩色点云（0：否；1：是）',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人id',
  `create_name` varchar(255) DEFAULT NULL COMMENT '创建人名称',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注信息',
  `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '状态：0 创建 1 删除 ',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `terra_task_id` varchar(50) DEFAULT NULL COMMENT 'terra任务id',
  `terra_out_resource_id` varchar(50) DEFAULT NULL COMMENT 'terra输出资源ID',
  `terra_out_file_id` varchar(200) DEFAULT '' COMMENT 'terra输出文件ID',
  `terra_ziptask_id` varchar(50) DEFAULT NULL COMMENT 'terra打包任务id',
  `out_data_size` bigint DEFAULT NULL COMMENT '结果文件大小',
  `complete_time` datetime DEFAULT NULL COMMENT '建模完成时间',
  `percentage` double unsigned DEFAULT '0' COMMENT '建模进度(0-1)',
  `status` tinyint unsigned DEFAULT '0' COMMENT '状态（0：未开始；1：建模中；2：建模完成；3: 已停止；4：执行失败）',
  `result_id` int DEFAULT NULL COMMENT '输出成果管理id',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `local` tinyint DEFAULT NULL COMMENT '是否是本地计算  0 :本地  1:terracloud',
  `mw_path` varchar(255) DEFAULT NULL COMMENT '素材路径',
  `local_path` varchar(255) DEFAULT NULL COMMENT '本地计算服务器',
  `terra_resource_id` varchar(50) DEFAULT NULL COMMENT 'terra资源ID',
  `error_message` varchar(100) DEFAULT NULL COMMENT '错误信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=149 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='生产管理表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `result_choose`
--

DROP TABLE IF EXISTS `result_choose`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `result_choose` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `data_id` int DEFAULT NULL COMMENT '数据管理id',
  `user_id` varchar(20) DEFAULT NULL COMMENT '用户id',
  `resource` int NOT NULL DEFAULT '0' COMMENT '来源（0：中移凌云；1：app端）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=231 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据工具化选择列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `result_file`
--

DROP TABLE IF EXISTS `result_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `result_file` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '成果文件id',
  `visual_id` int DEFAULT NULL COMMENT '成果管理关联id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `obj_md5` varchar(255) DEFAULT NULL COMMENT 'md5值',
  `obj_path` varchar(1000) DEFAULT NULL COMMENT '访问地址',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除（0：保留；1：删除）',
  `obj_size` bigint DEFAULT NULL COMMENT '文件大小',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=273 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='成果管理文件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `result_management`
--

DROP TABLE IF EXISTS `result_management`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `result_management` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '成果管理id',
  `name` varchar(20) NOT NULL COMMENT '产品名称',
  `area` varchar(128) DEFAULT NULL COMMENT '地区',
  `data_type` tinyint NOT NULL COMMENT '产品类型(0:建图结果、1:三维模型、2:单体模型、3:点云数据、4:地形数据、5:地图数据)',
  `data_source` int NOT NULL COMMENT '产品来源（0:任务生产、1:本地导入、2:在线）',
  `create_time` datetime NOT NULL COMMENT '生产时间',
  `create_name` varchar(255) DEFAULT NULL COMMENT '创建人名字',
  `percentage` double DEFAULT '0' COMMENT '发布进度(0-1)',
  `create_by` varchar(20) NOT NULL COMMENT '创建人',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注信息',
  `online_url` varchar(200) DEFAULT NULL COMMENT '在线数据地址',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态：0 上传中 1 上传完成  2上传失败',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `service_type` varchar(20) DEFAULT NULL COMMENT '服务类型',
  `upload_progress` double DEFAULT '0' COMMENT '上传进度(0-1)',
  `pro_id` varchar(100) DEFAULT NULL COMMENT '素材仓库项目id',
  `is_delete` tinyint DEFAULT '0' COMMENT '0 保留  1 删除',
  `zip_path` varchar(200) DEFAULT NULL COMMENT '结果zip包路径',
  `publish_status` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '发布状态：0:未发布  1:发布中  2:发布失败 3:发布成功',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `longitude` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `mw_path` varchar(255) DEFAULT NULL COMMENT '素材仓库路径',
  `error_message` varchar(100) DEFAULT NULL COMMENT '错误信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=279 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='成果管理列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `terra_task_info`
--

DROP TABLE IF EXISTS `terra_task_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `terra_task_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `task_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '任务名称',
  `area_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属区域',
  `rebuild_type` int DEFAULT NULL COMMENT '重建类型（0：二维模型；1：三维模型）',
  `scence_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '场景类型',
  `rebuild_accuracy` int DEFAULT NULL COMMENT '重建精度（1：高；2：中；3：低）',
  `pic_url` varchar(512) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '图片地址',
  `coordinate_system` int DEFAULT NULL COMMENT '坐标系（0：WGS84;1:CGCS2000）',
  `correction` int DEFAULT NULL COMMENT '辐射校正（0：大气校正；1：几何校正；2：正射校正）',
  `model_format` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '模型格式',
  `air_triangulation_format` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '空三格式',
  `point_cloud_format` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '点云格式',
  `terra_task_id` varchar(36) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'odm任务id',
  `terra_resource_id` varchar(36) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'odm工程id',
  `build_time` bigint DEFAULT NULL COMMENT '建模时长(单位：秒)',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `company_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '公司id',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '更新用户',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `status` int DEFAULT '0' COMMENT '状态（0：未开始；1：建模中；2：建模完成；3: 已停止；4：执行失败）',
  `is_delete` int DEFAULT '0' COMMENT '是否删除（0：保留；1：删除）',
  `is_upload` int DEFAULT '0' COMMENT '是否发布（0：未发布；1：已发布）',
  `proj_id` bigint DEFAULT NULL COMMENT '对应素材仓库工程id',
  `terra_out_resource_id` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'terra输出资源ID',
  `file_count` int DEFAULT '0' COMMENT '文件总数',
  `terra_out_file_id` varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'terra输出文件ID',
  `percentage` double DEFAULT '0' COMMENT '建模进度(0-1)',
  `terra_ziptask_id` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'terra打包任务id',
  `is_complete` int DEFAULT '0' COMMENT '建模是否完成（0：否；1：是）',
  `area_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '地区编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=172 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin COMMENT='任务信息列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `visualization_file`
--

DROP TABLE IF EXISTS `visualization_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `visualization_file` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '点云/模型名称',
  `visual_id` int DEFAULT NULL COMMENT '三维可视化关联id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `type` int DEFAULT NULL COMMENT '文件类型（0：点云文件；1：单体模型）',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '更新用户',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `obj_md5` varchar(255) DEFAULT NULL COMMENT 'md5值',
  `obj_path` varchar(1000) DEFAULT NULL COMMENT '访问地址',
  `upload_progress` int DEFAULT NULL COMMENT '上传进度',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除（0：保留；1：删除）',
  `upload_status` int DEFAULT NULL COMMENT '上传状态（0：上传中；1：上传成功；2：上传失败）',
  `obj_size` bigint DEFAULT NULL COMMENT '文件大小',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='三维可视化文件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `visualization_info`
--

DROP TABLE IF EXISTS `visualization_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `visualization_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '产品名称',
  `company_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '公司id',
  `area_code` varchar(255) DEFAULT NULL COMMENT '地区码',
  `area_name` varchar(255) DEFAULT NULL COMMENT '地区',
  `scence_type` varchar(20) DEFAULT NULL COMMENT '场景',
  `size` bigint DEFAULT NULL COMMENT '数据大小',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '更新用户',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `is_delete` int DEFAULT '0' COMMENT '是否删除（0：保留；1：删除）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='三维可视化';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `visualization_position`
--

DROP TABLE IF EXISTS `visualization_position`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `visualization_position` (
  `id` int NOT NULL AUTO_INCREMENT,
  `file_id` int NOT NULL COMMENT '三维可视化id',
  `longitude` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `altitude` decimal(11,6) DEFAULT NULL COMMENT '海拔',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '更新用户',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_visual_id` (`file_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=198 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='单体模型位置信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_data_post_process'
--

--
-- Dumping routines for database 'uav_data_post_process'
--

--
-- Current Database: `uav_dev`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_dev` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_dev`;

--
-- Table structure for table `device_bound`
--

DROP TABLE IF EXISTS `device_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_bound` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `dev_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备编码',
  `dev_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备类别',
  `bound_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '绑定设备编码',
  `bound_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '绑定设备类别',
  `bound` bit(1) NOT NULL COMMENT '绑定状态，1为已绑定，0为解除绑定',
  `is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`id`),
  KEY `idx_device_bound_dev_code` (`dev_code`),
  KEY `idx_device_bound_bound_code` (`bound_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机载荷关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_com`
--

DROP TABLE IF EXISTS `device_com`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_com` (
  `dev_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备编码',
  `dev_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备类型',
  `attribute` json DEFAULT NULL COMMENT '属性字段',
  `exp` json DEFAULT NULL COMMENT '扩展字段',
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '所属公司/机构',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`dev_code`),
  KEY `idx_device_com_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_attention`
--

DROP TABLE IF EXISTS `uav_attention`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_attention` (
  `user_id` bigint NOT NULL COMMENT '用户编码',
  `dev_type` varchar(100) NOT NULL COMMENT '设备类型',
  `dev_code` varchar(20) NOT NULL COMMENT '设备编码',
  `is_attention` int NOT NULL COMMENT '关注状态，1为已关注，2为解除关注',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `pull_addr` text NOT NULL COMMENT '拉流地址列表',
  PRIMARY KEY (`user_id`,`dev_type`,`dev_code`),
  KEY `idx_uav_attention_dev_attention` (`user_id`,`dev_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备关注表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar`
--

DROP TABLE IF EXISTS `uav_hangar`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar` (
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家名称',
  `model_name` varchar(100) NOT NULL COMMENT '机库型号名称',
  `hangar_type` varchar(100) NOT NULL COMMENT '机库类型',
  `use_stat` varchar(100) NOT NULL DEFAULT '1' COMMENT '可用状态，1为可用，2为禁用，3为保养，4为报废',
  `online_stat` varchar(100) NOT NULL DEFAULT '0' COMMENT '在线状态，1为在线，0为离线',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `elec_min` int DEFAULT NULL COMMENT '无人机换电时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `free_hours` int DEFAULT NULL COMMENT '无故障时长',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `man_var` int DEFAULT NULL COMMENT '机械手自由度',
  `mech_pot` varchar(4) DEFAULT NULL COMMENT '机械重复定位精度',
  `prot_level` varchar(100) DEFAULT NULL COMMENT '壳体防护等级',
  `length` int DEFAULT NULL COMMENT '长',
  `width` int DEFAULT NULL COMMENT '宽',
  `height` int DEFAULT NULL COMMENT '高',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `material` varchar(1100) DEFAULT NULL COMMENT '材料',
  `is_frozen` int NOT NULL DEFAULT '0' COMMENT '冻结标志，1为冻结，0为未冻结',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` text COMMENT '图片长度',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `note` varchar(2100) DEFAULT NULL COMMENT '机库备注',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `exp` json DEFAULT NULL COMMENT '扩展字段',
  `is_auto` int NOT NULL DEFAULT '0' COMMENT '自动上报标志，1为自动，0为手动',
  `is_save` int NOT NULL DEFAULT '1' COMMENT '是否保存, 1为保留，0为不保留',
  `visitor_id` varchar(200) DEFAULT NULL COMMENT '所属游客ID',
  `hangar_name` varchar(100) DEFAULT NULL COMMENT '机库名称',
  PRIMARY KEY (`hangar_code`),
  KEY `INDEX_uav_hangar_use_stat` (`use_stat`),
  KEY `INDEX_uav_hangar_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='机库信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar_bound`
--

DROP TABLE IF EXISTS `uav_hangar_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar_bound` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `bound` int NOT NULL COMMENT '绑定状态，1为已绑定，2为解除绑定',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`uav_code`,`hangar_code`,`bound`),
  KEY `INDEX_uav_load_bound_uav_code` (`uav_code`),
  KEY `INDEX_uav_load_bound_hangar_code` (`hangar_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机机库关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_hangar_video`
--

DROP TABLE IF EXISTS `uav_hangar_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_hangar_video` (
  `video_id` varchar(20) NOT NULL COMMENT '视频ID',
  `hangar_code` varchar(20) NOT NULL COMMENT '机库编码',
  `video_name` varchar(20) DEFAULT NULL COMMENT '视频名称',
  `video_line` varchar(200) NOT NULL COMMENT '视频线路',
  `push_stream` varchar(200) DEFAULT NULL COMMENT '推流地址',
  `pull_stream` varchar(200) DEFAULT NULL COMMENT '拉流地址',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`video_id`) USING BTREE,
  KEY `hangar_code` (`hangar_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='机库视频信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_bound`
--

DROP TABLE IF EXISTS `uav_load_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_bound` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `bound` int NOT NULL COMMENT '绑定状态，1为已绑定，2为解除绑定',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `load_type` varchar(100) DEFAULT NULL COMMENT '载荷类别',
  PRIMARY KEY (`uav_code`,`load_code`,`bound`),
  KEY `INDEX_uav_load_bound_uav_code` (`uav_code`),
  KEY `INDEX_uav_load_bound_load_code` (`load_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机载荷关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_cam`
--

DROP TABLE IF EXISTS `uav_load_cam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_cam` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `exp_mode` varchar(1100) DEFAULT NULL COMMENT '曝光模式',
  `work_mode` varchar(1100) DEFAULT NULL COMMENT '工作模式',
  `balance` varchar(1100) DEFAULT NULL COMMENT '白平衡',
  `img_format` varchar(1100) DEFAULT NULL COMMENT '图像存储格式',
  `img_size` varchar(1100) DEFAULT NULL COMMENT '图像尺寸',
  `cam_mode` varchar(1100) DEFAULT NULL COMMENT '拍照模式',
  `shut_speed` varchar(1100) DEFAULT NULL COMMENT '快门速度',
  `img_iso` varchar(1100) DEFAULT NULL COMMENT '照片ISO',
  `video_format` varchar(1100) DEFAULT NULL COMMENT '视频存储格式',
  `video_display` varchar(1100) DEFAULT NULL COMMENT '视频分辨率',
  `video_iso` varchar(1100) DEFAULT NULL COMMENT '视频ISO',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `pos_eva` int DEFAULT NULL COMMENT '正俯仰可控范围',
  `neg_eva` int DEFAULT NULL COMMENT '负俯仰可控范围',
  `pos_trans` int DEFAULT NULL COMMENT '正平移可控范围',
  `neg_trans` int DEFAULT NULL COMMENT '负平移可控范围',
  `pos_roll` int DEFAULT NULL COMMENT '正横滚可控范围',
  `neg_roll` int DEFAULT NULL COMMENT '负横滚可控范围',
  `eva_ctr_speed` int DEFAULT NULL COMMENT '俯仰最大控制速度',
  `trans_ctr_speed` int DEFAULT NULL COMMENT '水平最大控制速度',
  `roll_ctr_speed` int DEFAULT NULL COMMENT '横滚最大控制速度',
  `line` varchar(100) NOT NULL COMMENT '线路，0：自定义、1：备用线路1、2：备用线路2、3：备用线路3',
  `push_addr` text COMMENT '推流地址',
  `pull_addr` text COMMENT '拉流地址',
  `picture` text COMMENT '图片长度',
  `load_spec` varchar(2100) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `exp` json DEFAULT NULL COMMENT '扩展字段',
  `video_fmt` varchar(50) DEFAULT NULL COMMENT '视频编码',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `push_addr_rtsp` text COMMENT 'rtsp推流地址',
  `is_save` int NOT NULL DEFAULT '1' COMMENT '是否保存, 1为保留，0为不保留',
  `video_name` varchar(20) DEFAULT NULL COMMENT '视频名称',
  `load_name` varchar(100) DEFAULT NULL COMMENT '载荷名称',
  PRIMARY KEY (`load_code`),
  KEY `INDEX_uav_load_cam_model_name` (`model_name`),
  KEY `INDEX_uav_load_cam_use_stat` (`use_stat`),
  KEY `INDEX_uav_load_cam_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='摄像头载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_normal`
--

DROP TABLE IF EXISTS `uav_load_normal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_normal` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `picture` varchar(500) DEFAULT NULL COMMENT '图片路径列表',
  `load_spec` varchar(2100) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `exp` json DEFAULT NULL COMMENT '属性字段',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `load_name` varchar(100) DEFAULT NULL COMMENT '载荷名称',
  PRIMARY KEY (`load_code`),
  KEY `idx_uav_load_normal_model_name` (`model_name`),
  KEY `idx_uav_load_normal_mnf_name` (`mnf_name`),
  KEY `idx_uav_load_normal_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通用载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_load_spk`
--

DROP TABLE IF EXISTS `uav_load_spk`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_load_spk` (
  `load_code` varchar(20) NOT NULL COMMENT '载荷编码',
  `load_type` varchar(100) NOT NULL COMMENT '载荷类别',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态：1为可用，2为禁用，3为保养，4为报废',
  `spk_dist` int DEFAULT NULL COMMENT '扩音距离',
  `max_volume` int DEFAULT NULL COMMENT '最大音量',
  `weight` varchar(10) DEFAULT NULL COMMENT '重量',
  `mix_work_tmp` varchar(3) DEFAULT NULL COMMENT '最低工作温度',
  `max_work_tmp` varchar(3) DEFAULT NULL COMMENT '最高工作温度',
  `work_power` int DEFAULT NULL COMMENT '工作功率',
  `mix_work_vol` int DEFAULT NULL COMMENT '最低工作电压',
  `max_work_vol` int DEFAULT NULL COMMENT '最高工作电压',
  `picture` text COMMENT '图片长度',
  `load_spec` varchar(2100) DEFAULT NULL COMMENT '载荷描述，载荷规格',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `exp` json DEFAULT NULL COMMENT '扩展字段',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `load_name` varchar(100) DEFAULT NULL COMMENT '载荷名称',
  PRIMARY KEY (`load_code`),
  KEY `INDEX_uav_load_spk_model_name` (`model_name`),
  KEY `INDEX_uav_load_spk_use_stat` (`use_stat`),
  KEY `INDEX_uav_load_spk_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='喊话器载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_plane`
--

DROP TABLE IF EXISTS `uav_plane`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_plane` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `model_name` varchar(100) NOT NULL COMMENT '设备型号',
  `mnf_name` varchar(100) NOT NULL COMMENT '生产厂家',
  `use_stat` varchar(100) NOT NULL COMMENT '可用状态，1为可用，2为禁用，3为保养，4为报废',
  `online_stat` varchar(100) NOT NULL COMMENT '在线状态，1为在线，0为离线',
  `shape` varchar(100) NOT NULL COMMENT '无人机形态，1为固定翼、2为旋翼、3为混合',
  `size` varchar(100) NOT NULL COMMENT '无人机尺度，1微型无人机、2轻型无人机、3小型无人机、4大型无人机',
  `max_speed` int DEFAULT NULL COMMENT '最大航速',
  `hight` int DEFAULT NULL COMMENT '飞行高度',
  `max_hours` int DEFAULT NULL COMMENT '最大续航时间',
  `wind_resist` int DEFAULT NULL COMMENT '抗风等级',
  `mix_tmp` varchar(3) DEFAULT NULL COMMENT '最低温度',
  `max_tmp` varchar(3) DEFAULT NULL COMMENT '最高温度',
  `max_load` varchar(8) DEFAULT NULL COMMENT '最大安全载重',
  `hight_range` varchar(6) DEFAULT NULL COMMENT '最大飞行海拔高度',
  `stay_time` int DEFAULT NULL COMMENT '满载悬停时间',
  `material` varchar(1100) DEFAULT NULL COMMENT '材料',
  `paddle` int DEFAULT NULL COMMENT '桨数',
  `wheelbase` int DEFAULT NULL COMMENT '轴距',
  `weight` varchar(8) DEFAULT NULL COMMENT '重量（含电池）',
  `extra_if` varchar(1100) DEFAULT NULL COMMENT '外置接口(BUS/USB/HDMI/串口/电源接口/光纤接口等)',
  `volume` varchar(6) DEFAULT NULL COMMENT '体积（长*宽*高 mm）',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `picture` text COMMENT '图片长度',
  `company_id` varchar(20) DEFAULT NULL COMMENT '所属公司/机构',
  `note` varchar(2100) DEFAULT NULL COMMENT '无人机备注',
  `def_usr_id` varchar(20) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  `device_no` varchar(100) DEFAULT NULL COMMENT '设备号',
  `exp` json DEFAULT NULL COMMENT '扩展字段',
  `is_auto` int NOT NULL DEFAULT '0' COMMENT '自动上报标志，1为自动，0为手动',
  `fly_total` int DEFAULT NULL COMMENT '飞行总时长',
  `online_time` datetime DEFAULT NULL COMMENT '最近在线时间',
  `visitor_id` varchar(200) DEFAULT NULL COMMENT '所属游客ID',
  `is_real` int NOT NULL DEFAULT '0' COMMENT '真机标识，1为真机，0为模拟机',
  `location` varchar(1000) DEFAULT NULL COMMENT '无人机位置信息',
  `uav_name` varchar(100) NOT NULL COMMENT '无人机名称',
  `uav_sn` varchar(100) DEFAULT NULL COMMENT '无人机设备号',
  PRIMARY KEY (`uav_code`),
  KEY `INDEX_uav_plane_use_stat` (`use_stat`),
  KEY `INDEX_uav_plane_model_name` (`model_name`),
  KEY `INDEX_uav_plane_company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_plane_position`
--

DROP TABLE IF EXISTS `uav_plane_position`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_plane_position` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `report_time` datetime DEFAULT NULL COMMENT '位置更新时间',
  `uav_code` varchar(32) DEFAULT NULL COMMENT '无人机设备编号',
  `province` varchar(32) DEFAULT NULL COMMENT '省份',
  `city` varchar(32) DEFAULT NULL COMMENT '城市',
  `longitude` varchar(20) DEFAULT NULL COMMENT '当前无人机坐标经度，没有则为空',
  `latitude` varchar(20) DEFAULT NULL COMMENT '当前无人机坐标维度，没有则为空',
  `address` varchar(255) DEFAULT NULL COMMENT '地址',
  `type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '无人机启停状态',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_province` (`province`),
  KEY `idx_city` (`city`)
) ENGINE=InnoDB AUTO_INCREMENT=63969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='无人机位置信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_dev'
--

--
-- Dumping routines for database 'uav_dev'
--

--
-- Current Database: `uav_developer`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_developer` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_developer`;

--
-- Table structure for table `developer_resource`
--

DROP TABLE IF EXISTS `developer_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `developer_resource` (
  `id` bigint NOT NULL COMMENT 'id',
  `api_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口标识',
  `developer_id` bigint DEFAULT NULL COMMENT '开发者id',
  `client_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '客户端id',
  `request_method` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口名称',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接口地址',
  `service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '服务id',
  `expire` timestamp NULL DEFAULT NULL COMMENT '接口到期时间，如果为null，表示无限期',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `developer_user`
--

DROP TABLE IF EXISTS `developer_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `developer_user` (
  `id` bigint NOT NULL COMMENT 'id',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '开发者名称',
  `company_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司名称',
  `account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '账号',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码',
  `client_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户端id',
  `client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户端密钥',
  `id_photo` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '证件照',
  `telephone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '联系电话',
  `status` smallint NOT NULL DEFAULT '0' COMMENT '开发者状态，0:申请中，1:申请成功，2：申请失败',
  `explain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '申请状态说明',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开发者表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_app`
--

DROP TABLE IF EXISTS `open_app`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_app` (
  `id` bigint unsigned NOT NULL COMMENT '主键',
  `developer_id` bigint unsigned DEFAULT NULL COMMENT '开发者id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用名称',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用描述',
  `tenant_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户id',
  `company_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  `app_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用id，不可修改',
  `app_secret` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用密钥',
  `app_secret_update_at` datetime DEFAULT NULL COMMENT '更新密钥的时间',
  `website` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用网址',
  `type` int unsigned DEFAULT '0' COMMENT '应用类型，0：普通应用，绑定授权，1:暂未支持',
  `icon` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图标地址',
  `images` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用截图地址',
  `redirect_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调地址',
  `redirect_cancel_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调取消地址',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否被禁用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否被删除',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人id',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `update_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_app_developer_id` (`developer_id`) COMMENT '应用开发者id索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开发者应用表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_app_interface`
--

DROP TABLE IF EXISTS `open_app_interface`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_app_interface` (
  `id` bigint unsigned NOT NULL COMMENT '应用接口id',
  `developer_id` bigint unsigned NOT NULL COMMENT '开发者id',
  `app_id` bigint unsigned NOT NULL COMMENT '开发者应用id',
  `interface_id` bigint DEFAULT NULL COMMENT '接口ID',
  `interface_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接口编码',
  `limit_type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '限制类型',
  `limit_quantity` bigint unsigned NOT NULL COMMENT '限制额度',
  `use_type` smallint DEFAULT '0' COMMENT '0:定额，1：自定义类型',
  `use_quantity` bigint DEFAULT '0' COMMENT '使用额度',
  `expire_datetime` datetime NOT NULL COMMENT '到期时间',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否禁用，暂时不使用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，暂时不使用',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_app_interface_app_id` (`app_id`) COMMENT '应用id索引',
  KEY `idx_app_interface_interface_code` (`interface_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开发者应用接口';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_app_interface_log`
--

DROP TABLE IF EXISTS `open_app_interface_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_app_interface_log` (
  `id` bigint unsigned NOT NULL COMMENT '日志id',
  `developer_id` bigint unsigned NOT NULL COMMENT '开发者id',
  `app_id` bigint unsigned NOT NULL COMMENT '开发者应用id',
  `interface_id` bigint unsigned NOT NULL COMMENT '接口id',
  `interface_version_id` bigint DEFAULT NULL COMMENT '接口版本id',
  `app_interface_id` bigint unsigned NOT NULL COMMENT '应用接口id',
  `request_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '请求参数',
  `response_body` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '响应数据',
  `cost_time` bigint unsigned DEFAULT NULL COMMENT '请求响应时间',
  `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  `request_result` bit(1) DEFAULT b'0' COMMENT '请求结果0:正常，1:异常',
  `request_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '请求说明，正常，或者错误信息',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_app_interface_app_id` (`app_id`) COMMENT '应用id索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开发者应用接口调用日志，所有模式均有日志';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_app_interface_statistic`
--

DROP TABLE IF EXISTS `open_app_interface_statistic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_app_interface_statistic` (
  `id` bigint unsigned NOT NULL COMMENT 'id',
  `developer_id` bigint unsigned DEFAULT NULL COMMENT '开发者id',
  `app_id` bigint unsigned DEFAULT NULL COMMENT '应用id',
  `app_interface_id` bigint unsigned DEFAULT NULL COMMENT '应用接口id',
  `interface_id` bigint DEFAULT NULL COMMENT '接口id',
  `interface_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口编码',
  `interface_version_id` bigint DEFAULT NULL COMMENT '接口版本号',
  `interface_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口版本',
  `date` date DEFAULT NULL COMMENT '请求的日期统计',
  `request_times` int unsigned DEFAULT NULL COMMENT '调用次数',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_interface_static_app_interface_and_version_id` (`app_interface_id`,`interface_version_id`,`date`),
  KEY `idx_interface_statistic_developer_id` (`developer_id`),
  KEY `idx_interface_statistic_app_interface_id` (`app_interface_id`),
  KEY `idx_interface_static_interface_id` (`interface_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='应用接口调用统计';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_developer`
--

DROP TABLE IF EXISTS `open_developer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_developer` (
  `id` bigint NOT NULL COMMENT '开发者id',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '开发者账号',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '开发者名称',
  `telephone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号码',
  `email` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户邮箱',
  `type` smallint NOT NULL DEFAULT '0' COMMENT '用户类型，0:个人开发者，1:企业开发者',
  `tenant_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id',
  `company_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  `salt` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '随机盐',
  `password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '加密密码',
  `is_frozen` bit(1) NOT NULL COMMENT '是否被禁用',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否被删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建id',
  `update_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_http_param`
--

DROP TABLE IF EXISTS `open_http_param`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_http_param` (
  `id` bigint NOT NULL COMMENT '主键id',
  `interface_version_id` bigint unsigned NOT NULL COMMENT '接口版本id',
  `interface_id` bigint unsigned NOT NULL COMMENT '接口id',
  `type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '参数，HEADER,PARMS，FORMDATA，URL_ENCODED，RAW，RETURN',
  `key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '参数key',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '参数名称或描述',
  `using_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '参数类型',
  `using_type_ref` bigint DEFAULT NULL COMMENT '如果参数类型是自定义，关联自定义类型',
  `content_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '如果参数类型是集合，配置集合元素的类型',
  `content_type_ref` bigint unsigned DEFAULT NULL COMMENT '如果集合元素类型是自定义类型，关联自定义类型',
  `constraint_rule` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '参数规则',
  `order` int DEFAULT '0' COMMENT '属性排序',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除0:正常，1：删除',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='http接口请求参数表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_interface`
--

DROP TABLE IF EXISTS `open_interface`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_interface` (
  `id` bigint NOT NULL COMMENT '接口id',
  `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接口标识',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '接口名称',
  `impl_mode` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'CODE' COMMENT '接口实现方式，CODE:内部代码实现，,CONFIGURATION，配置方法实现',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口说明',
  `type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口类型，普通，高级',
  `group_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口分组，航线，空域等',
  `request_path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求路径',
  `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方式',
  `service_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微服务id',
  `duration` bigint DEFAULT NULL COMMENT '持续时间',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '接口是否被禁用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '接口是否被删除',
  `is_company_support` bit(1) DEFAULT b'0' COMMENT '是否需要绑定公司，0:否，1:是',
  `limit_type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '限制类型编码',
  `limit_quantity` bigint DEFAULT '0' COMMENT '默认的限制数量，-1，表示不限制，0:表示使用全局配置,取最小单位',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_interface_code` (`code`) COMMENT '接口code索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='接口表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_interface_code`
--

DROP TABLE IF EXISTS `open_interface_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_interface_code` (
  `id` bigint NOT NULL COMMENT '主键id',
  `interface_id` bigint DEFAULT NULL COMMENT '接口id',
  `interface_version_id` bigint DEFAULT NULL COMMENT '接口版本id',
  `program_language_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '程序语言code,与字典中相同',
  `code_sample` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '示例代码',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='接口多语言示例代码';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_interface_version`
--

DROP TABLE IF EXISTS `open_interface_version`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_interface_version` (
  `id` bigint NOT NULL COMMENT '接口版本id',
  `interface_id` bigint NOT NULL COMMENT '接口id',
  `interface_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口标识',
  `interface_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口版本号',
  `http_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'http请求方法，GET、POST',
  `http_path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'http请求的路径',
  `http_target_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'http请求目标类型，直接请求（DIRECT），微服务请求（MICROSERVICES）',
  `http_post_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'post请求类型，FORM_DATA,URL_ENCODED,RAW',
  `online_able` bit(1) DEFAULT b'0' COMMENT '是否可上线',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否禁用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_interface_code` (`interface_id`) COMMENT '接口code索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='接口版本信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_model`
--

DROP TABLE IF EXISTS `open_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_model` (
  `id` bigint unsigned NOT NULL COMMENT 'id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '实体名称',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '实体编码',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除0：正常，1：删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开放平台模型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_model_properties`
--

DROP TABLE IF EXISTS `open_model_properties`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_model_properties` (
  `id` bigint unsigned NOT NULL COMMENT '模型属性id',
  `model_id` bigint unsigned NOT NULL COMMENT '模型id',
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模型属性的key',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称或描述',
  `using_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '数据类型，整形(INT),2、浮点型(FLOAT)，3、字符型(STRING)\r\n5、布尔型(BOOLEAN)，6集合型(LIST)，7，自定义型(MODEL)',
  `using_type_ref` bigint unsigned DEFAULT NULL COMMENT '如果是数据类型是自定义类型7，则关联自定义类型的id',
  `content_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '如果数据类型是集合型6，则配置集合元素的数据类型',
  `content_type_ref` bigint unsigned DEFAULT NULL COMMENT '如果集合元素数据类型为7，则关联自定义类型id',
  `constraint_rule` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '约束规则',
  `order` int DEFAULT '0' COMMENT '属性排序',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_model_prop_model_id` (`model_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开放平台模型属性表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_developer'
--

--
-- Dumping routines for database 'uav_developer'
--

--
-- Current Database: `uav_emergency`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_emergency` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_emergency`;

--
-- Table structure for table `sms_group`
--

DROP TABLE IF EXISTS `sms_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sms_group` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '群组名称',
  `company_id` varchar(255) DEFAULT NULL COMMENT '公司id',
  `def_usr_id` varchar(255) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `upd_usr_id` varchar(255) DEFAULT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='小组表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sms_group_bound`
--

DROP TABLE IF EXISTS `sms_group_bound`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sms_group_bound` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `sms_id` int NOT NULL COMMENT '联系人id',
  `group_id` int NOT NULL COMMENT '群组id',
  `def_usr_id` varchar(255) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `upd_usr_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=210 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='联系人小组绑定表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sms_history`
--

DROP TABLE IF EXISTS `sms_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sms_history` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `uas_id` varchar(12) NOT NULL COMMENT '无人机id',
  `phone` varchar(20) DEFAULT NULL COMMENT '手机号',
  `usr_id` varchar(255) NOT NULL COMMENT '用户id',
  `appli_date` timestamp NOT NULL COMMENT '创建日期',
  `company_id` varchar(255) DEFAULT NULL COMMENT '公司id',
  `name` varchar(255) NOT NULL COMMENT '联系人姓名',
  `msg_code` varchar(32) NOT NULL COMMENT '分配任务编号,唯一标识',
  `send_stat` tinyint NOT NULL COMMENT '发送状态: 0 未确定  1 成功  2 失败',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sms_list`
--

DROP TABLE IF EXISTS `sms_list`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sms_list` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(12) NOT NULL COMMENT '姓名',
  `job` varchar(20) DEFAULT NULL COMMENT '职责',
  `phone` varchar(11) NOT NULL COMMENT '联系方式',
  `company_id` varchar(255) DEFAULT NULL COMMENT '公司id',
  `def_usr_id` varchar(255) NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL COMMENT '创建日期',
  `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `upd_usr_id` varchar(255) DEFAULT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL COMMENT '修改日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='联系人列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_emergency'
--

--
-- Dumping routines for database 'uav_emergency'
--

--
-- Current Database: `uav_feedback`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_feedback` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_feedback`;

--
-- Table structure for table `sys_feedback`
--

DROP TABLE IF EXISTS `sys_feedback`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_feedback` (
  `feedback_id` bigint NOT NULL COMMENT '反馈信息ID',
  `app_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '系统来源',
  `feedback_type_id` bigint DEFAULT NULL COMMENT '反馈类型',
  `feedback_desc` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '反馈描述',
  `telephone` varchar(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '手机号',
  `resource_link` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci COMMENT '图片链接',
  `create_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '反馈用户id',
  `create_by_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '反馈用户名',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '反馈时间',
  PRIMARY KEY (`feedback_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_feedback_type`
--

DROP TABLE IF EXISTS `sys_feedback_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_feedback_type` (
  `feedback_type_id` bigint NOT NULL COMMENT '反馈类型ID',
  `feedback_type_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '反馈类型',
  PRIMARY KEY (`feedback_type_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_feedback'
--

--
-- Dumping routines for database 'uav_feedback'
--

--
-- Current Database: `uav_gis`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_gis` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_gis`;

--
-- Table structure for table `emergence`
--

DROP TABLE IF EXISTS `emergence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `emergence` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `typeName` varchar(255) DEFAULT NULL COMMENT '类别',
  `pName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '省',
  `pCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '省编码',
  `cityName` varchar(255) DEFAULT NULL COMMENT '市',
  `cityCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '市编码',
  `adName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '区',
  `adCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '区编码',
  `dotGeometry` varchar(255) DEFAULT NULL COMMENT '经纬度',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机构名称',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '详细地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7237 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应急初始POI';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_grid`
--

DROP TABLE IF EXISTS `gis_grid`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_grid` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '原始名称',
  `mission_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '任务时间',
  `full_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '全名',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路径',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名称',
  `xmin` decimal(12,6) DEFAULT NULL COMMENT '范围：最小经度',
  `xmax` decimal(12,6) DEFAULT NULL COMMENT '范围：最大经度',
  `ymin` decimal(12,6) DEFAULT NULL COMMENT '范围：最小纬度',
  `ymax` decimal(12,6) DEFAULT NULL COMMENT '范围：最大纬度',
  `zip_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '结果zip包路径',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人',
  `scene_type` tinyint(1) DEFAULT NULL COMMENT '场景类型（0:森林火灾平战防控1:矿山安全监管执法2:危化园区监管执法3:工贸安全监管巡查4:全市假日文旅高峰期游客流量监测5:秸秆焚烧大气巡查6:河道治理巡查巡护）',
  `data_type` tinyint(1) DEFAULT '0' COMMENT '数据类型(0:建图结果、1:三维模型、2:单体模型、3:点云数据、4:地形数据、5:地图数据）',
  `resource` tinyint(1) DEFAULT '0' COMMENT '来源（0：本地，1：引用）',
  `status` tinyint(1) DEFAULT '1' COMMENT '从图层列表中添加（0:添加，1：取消）',
  `service_type` tinyint(1) DEFAULT '0' COMMENT '地图数据服务类型（0：arcgis）',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名',
  `sync_id` int DEFAULT NULL COMMENT '引用数据同步关联id',
  `size` bigint DEFAULT '0' COMMENT '数据大小',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='二维视图表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_image`
--

DROP TABLE IF EXISTS `gis_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_image` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `type` varchar(20) DEFAULT NULL COMMENT '类型（图片：image；视频：video）',
  `size` bigint DEFAULT NULL COMMENT '文件大小',
  `file_id` varchar(100) DEFAULT NULL COMMENT '素材仓库文件id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='回传影像';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_model`
--

DROP TABLE IF EXISTS `gis_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_model` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `main_id` bigint DEFAULT NULL COMMENT '三维模型主表关联id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `file_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'md5值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='成果管理文件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_model_position`
--

DROP TABLE IF EXISTS `gis_model_position`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_model_position` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `model_id` bigint NOT NULL COMMENT '三维单体模型关联id',
  `longitude` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `altitude` decimal(11,6) DEFAULT NULL COMMENT '海拔',
  PRIMARY KEY (`id`),
  KEY `idx_visual_id` (`model_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='单体模型位置信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_release_resource`
--

DROP TABLE IF EXISTS `gis_release_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_release_resource` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `project_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库项目id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='资源释放表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_result_choose`
--

DROP TABLE IF EXISTS `gis_result_choose`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_result_choose` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `data_id` varchar(32) DEFAULT NULL COMMENT '数据管理id(关联二三维，POI等模块的id)',
  `user_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户id',
  `resource` int NOT NULL DEFAULT '0' COMMENT '来源（0：中移凌云；1：app端）',
  `data_type` tinyint(1) DEFAULT NULL COMMENT '数据类型(0:建图结果、1:三维模型、2:单体模型、3:点云数据、4:地形数据、5:地图数据、6:POI)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1886 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据工具化选择列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_three_d`
--

DROP TABLE IF EXISTS `gis_three_d`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_three_d` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '原始名称',
  `mission_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '任务时间',
  `full_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '全名',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路径',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名称',
  `zip_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '结果zip包路径',
  `screen_space` int DEFAULT '16' COMMENT '显示精度',
  `memory_usage` int DEFAULT '1024' COMMENT '模型使用的最大内存（512-5120）',
  `height` decimal(10,2) DEFAULT '0.00' COMMENT '相对于模型本身高度的偏移值(米)',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人',
  `scene_type` tinyint(1) DEFAULT NULL COMMENT '场景类型（0:森林火灾平战防控1:矿山安全监管执法2:危化园区监管执法3:工贸安全监管巡查4:全市假日文旅高峰期游客流量监测5:秸秆焚烧大气巡查6:河道治理巡查巡护）',
  `data_type` tinyint(1) DEFAULT '1' COMMENT '数据类型(0:建图结果、1:三维模型、2:单体模型、3:点云数据、4:地形数据、5:地图数据)',
  `resource` tinyint(1) DEFAULT '0' COMMENT '来源（0：本地，1：引用）',
  `status` tinyint(1) DEFAULT '1' COMMENT '从图层列表中添加（0:添加，1：取消）',
  `online` tinyint(1) DEFAULT '0' COMMENT '开源在线数据（0：本地上传，1：在线数据）',
  `bucket_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '桶名',
  `sync_id` int DEFAULT NULL COMMENT '引用数据同步关联id',
  `size` bigint DEFAULT '0' COMMENT '数据大小',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='三维视图表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_vr`
--

DROP TABLE IF EXISTS `gis_vr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_vr` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `size` bigint DEFAULT NULL COMMENT '文件大小',
  `file_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库文件id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '公司id',
  `longitude` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `height` decimal(10,2) DEFAULT '0.00' COMMENT '高度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='全景照片';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `poi_type`
--

DROP TABLE IF EXISTS `poi_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `poi_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `type_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型编码',
  `icon_object` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'icon图标对象路径',
  `type_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型名',
  `is_deleted` tinyint(1) NOT NULL COMMENT '是否删除，0：未删除，1：已删除',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改人',
  `p_code` varchar(20) DEFAULT NULL COMMENT '父类型编码',
  `level` int DEFAULT NULL COMMENT '类型层级',
  `biz_domain` int DEFAULT NULL COMMENT '业务域，0:通用，1：应急通信平台',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_type_code` (`type_code`) USING BTREE,
  KEY `idx_type_name` (`type_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='POI类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `poi_type_property`
--

DROP TABLE IF EXISTS `poi_type_property`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `poi_type_property` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型编码',
  `property_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '属性名',
  `property_type` int NOT NULL COMMENT '属性类型，0：文本，1：时间，2：文件',
  `property_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '属性编码',
  `is_deleted` tinyint(1) NOT NULL COMMENT '是否删除，0：未删除，1：删除',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改人',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_property_code` (`property_code`) USING BTREE,
  KEY `idx_type_code_property_name` (`type_code`,`property_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='POI类型属性表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_gis'
--

--
-- Dumping routines for database 'uav_gis'
--

--
-- Current Database: `uav_hyperspectral`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_hyperspectral` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_hyperspectral`;

--
-- Table structure for table `t_algorithm`
--

DROP TABLE IF EXISTS `t_algorithm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_algorithm` (
  `id` varchar(128) NOT NULL COMMENT '主键',
  `algorithm_name` varchar(50) NOT NULL COMMENT '算法名称',
  `algorithm_identification` varchar(50) DEFAULT NULL COMMENT '算法标识',
  `algorithm_type` varchar(50) DEFAULT NULL COMMENT '算法类型',
  `variety` varchar(20) DEFAULT NULL COMMENT '作物种类',
  `storage_location` varchar(256) DEFAULT NULL COMMENT '存储位置',
  `create_time` varchar(256) DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(256) DEFAULT NULL COMMENT '更新时间',
  `remake` varchar(255) DEFAULT NULL COMMENT '备注',
  `algorithm_des` varchar(255) DEFAULT NULL COMMENT '算法描述',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_NAME_UNIQUE` (`algorithm_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='算法列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_algorithm_param`
--

DROP TABLE IF EXISTS `t_algorithm_param`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_algorithm_param` (
  `id` varchar(128) NOT NULL COMMENT '主键id',
  `algorithm_id` varchar(128) DEFAULT NULL COMMENT '算法的外键id',
  `parameter_name` varchar(50) DEFAULT NULL COMMENT '参数名称',
  `parameter_type` varchar(50) DEFAULT NULL COMMENT '参数类型',
  `parameter_value` varchar(50) DEFAULT NULL COMMENT '参数值',
  `serial_number` int DEFAULT NULL COMMENT '序号',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='算法表的参数列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_area`
--

DROP TABLE IF EXISTS `t_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_area` (
  `id` varchar(64) NOT NULL COMMENT 'id',
  `name` varchar(100) DEFAULT NULL COMMENT '区域名称',
  `parent_id` bigint NOT NULL COMMENT '父节点',
  `sort` smallint DEFAULT NULL COMMENT '排序',
  `leaf` smallint DEFAULT NULL COMMENT '子节点',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='区域列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_data_publish`
--

DROP TABLE IF EXISTS `t_data_publish`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_data_publish` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `product_id` varchar(32) DEFAULT NULL COMMENT '产品id',
  `product_name` varchar(255) DEFAULT NULL COMMENT '产品名称',
  `file_size` varchar(16) DEFAULT NULL COMMENT '数据量大小',
  `start_time` bigint DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint DEFAULT NULL COMMENT '结束时间',
  `publish_status` tinyint DEFAULT NULL COMMENT '发布状态 1，待发布 2, 发布中 3,已发布',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='数据发布记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_data_publish_detail`
--

DROP TABLE IF EXISTS `t_data_publish_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_data_publish_detail` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `data_publish_id` varchar(32) DEFAULT NULL COMMENT '发布数据id',
  `data_id` varchar(32) DEFAULT NULL COMMENT '数据id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `file_size` varchar(16) DEFAULT NULL COMMENT '文件大小',
  `publish_url` varchar(255) DEFAULT NULL COMMENT '发布的url',
  `status` tinyint DEFAULT NULL COMMENT '任务状态 0,发布中 1,失败 2, 成功',
  `error_info` varchar(1000) DEFAULT NULL COMMENT '失败原因',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='数据发布记录详情表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_data_source`
--

DROP TABLE IF EXISTS `t_data_source`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_data_source` (
  `id` varchar(255) NOT NULL COMMENT 'id',
  `dir_id` varchar(32) NOT NULL COMMENT '目录ID',
  `is_dir` varchar(32) DEFAULT NULL COMMENT '是否为目录',
  `file_size` bigint DEFAULT NULL COMMENT '文件大小',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `file_path` varchar(255) DEFAULT NULL COMMENT '文件路径',
  `ext` varchar(50) DEFAULT NULL COMMENT '文件扩展名',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT 'minio文件所属存储桶名',
  `object_name` varchar(255) DEFAULT NULL COMMENT 'minio文件目录名',
  `download_url` varchar(255) DEFAULT NULL COMMENT '下载路径',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='基础数据记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_product_data`
--

DROP TABLE IF EXISTS `t_product_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_product_data` (
  `id` varchar(255) NOT NULL COMMENT 'id',
  `dir_name` varchar(255) DEFAULT NULL COMMENT '数据目录',
  `data_type` int DEFAULT NULL COMMENT '数据类型 1 原始数据 2 过程数据 3 专题产品',
  `data_source` int DEFAULT NULL COMMENT '数据来源 1 上传数据 2 过程数据',
  `description` varchar(255) DEFAULT NULL COMMENT '数据描述',
  `area` varchar(255) DEFAULT NULL COMMENT '区域',
  `file_size` bigint DEFAULT NULL COMMENT '文件大小',
  `file_count` int DEFAULT NULL COMMENT '文件数',
  `exec_status` int DEFAULT NULL COMMENT '执行状态',
  `progress` float(10,4) DEFAULT NULL COMMENT '进度（百分比）',
  `start_time` bigint DEFAULT NULL COMMENT '上传开始时间',
  `end_time` bigint DEFAULT NULL COMMENT '上传结束时间',
  `success_count` int DEFAULT NULL COMMENT '入库文件成功数',
  `publish_status` int DEFAULT NULL COMMENT '发布状态：1 未发布 2 发布中 3 已发布',
  `upload_file_path` varchar(255) DEFAULT NULL COMMENT '产品文件路径',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id，用于数据权限分离',
  `company_id` varchar(32) DEFAULT NULL COMMENT '公司id，用于数据权限分离',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '更新时间',
  `longitude` double(10,6) DEFAULT NULL COMMENT '经度',
  `latitude` double(10,6) DEFAULT NULL COMMENT '纬度',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='产品数据表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_product_data_detail`
--

DROP TABLE IF EXISTS `t_product_data_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_product_data_detail` (
  `id` varchar(255) NOT NULL COMMENT 'id',
  `product_data_id` varchar(32) DEFAULT NULL COMMENT '归档产品数据目录ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT '产品名称',
  `error_info` varchar(2000) DEFAULT NULL COMMENT '失败原因',
  `upload_status` int DEFAULT NULL COMMENT '任务状态',
  `file_size` varchar(20) DEFAULT NULL COMMENT '文件大小',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='产品详情表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_task`
--

DROP TABLE IF EXISTS `t_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_task` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `task_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
  `task_num` varchar(255) DEFAULT NULL COMMENT '任务编号',
  `type` tinyint DEFAULT NULL COMMENT '任务类型',
  `algorithm_id` varchar(32) DEFAULT NULL COMMENT '算法id',
  `algorithm_name` varchar(255) DEFAULT NULL COMMENT '算法名称',
  `region_name` varchar(255) DEFAULT NULL COMMENT '区域名称',
  `region_file` varchar(255) DEFAULT NULL COMMENT '区域裁剪文件路径',
  `create_user` varchar(255) DEFAULT NULL COMMENT '创建人',
  `output_path` varchar(255) DEFAULT NULL COMMENT '输出路径',
  `product_data_id` varchar(32) DEFAULT NULL COMMENT '原始产品数据id',
  `progress` double(16,2) DEFAULT NULL COMMENT '任务进度(百分比)',
  `exec_status` tinyint DEFAULT NULL COMMENT '执行状态 0:准备阶段 1:数据拼接 2:数据裁剪 3:作物品质监测|作物长势监测|病虫害评估监测 4:专题图生成 5:数据发布 6:任务完成',
  `status` tinyint DEFAULT NULL COMMENT '任务状态 0 未开始 1 执行中 2 已完成',
  `exec_str` varchar(32) DEFAULT NULL COMMENT '当前执行步骤',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `source_data_id` varchar(32) DEFAULT NULL COMMENT '源数据id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_task_result`
--

DROP TABLE IF EXISTS `t_task_result`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_task_result` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `task_step_id` varchar(32) DEFAULT NULL COMMENT '任务步骤id',
  `task_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
  `picture_path` varchar(255) DEFAULT NULL COMMENT '专题图查看路径',
  `publish_file_name` varchar(255) DEFAULT NULL COMMENT '发布数据名称',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  `data_type` tinyint DEFAULT NULL COMMENT '数据类型',
  `product_data_id` varchar(32) DEFAULT NULL COMMENT '产品id',
  `picture_real_path` varchar(255) DEFAULT NULL COMMENT '专题图真实路径',
  `report_file` varchar(255) DEFAULT NULL COMMENT '文件',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务结果记录列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_task_step`
--

DROP TABLE IF EXISTS `t_task_step`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_task_step` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `task_id` varchar(32) DEFAULT NULL COMMENT '任务id',
  `step_name` varchar(255) DEFAULT NULL COMMENT '步骤名称',
  `start_time` bigint DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint DEFAULT NULL COMMENT '结束时间',
  `exec_status` tinyint DEFAULT NULL COMMENT '执行状态 0、执行中 1、成功 2、失败',
  `error_info` varchar(2000) DEFAULT NULL COMMENT '失败原因',
  `task_result_id` varchar(32) DEFAULT NULL COMMENT '生成结果id',
  `create_time` bigint DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='任务步骤记录列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_hyperspectral'
--

--
-- Dumping routines for database 'uav_hyperspectral'
--

--
-- Current Database: `uav_industrial_portfolio`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_industrial_portfolio` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_industrial_portfolio`;

--
-- Table structure for table `air_line_cabinet_info`
--

DROP TABLE IF EXISTS `air_line_cabinet_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_line_cabinet_info` (
  `id` bigint NOT NULL COMMENT '主键',
  `air_line_id` bigint DEFAULT NULL COMMENT '关联的航线id',
  `start_cabinet_id` bigint DEFAULT NULL COMMENT '起点智能柜id',
  `start_cabinet_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '起点智能柜名字',
  `end_cabinet_id` bigint DEFAULT NULL COMMENT '终点智能柜id',
  `end_cabinet_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '终点智能柜名字',
  `def_status` int DEFAULT NULL COMMENT '默认状态,1默认航线，0非默认航线',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `deleted` int DEFAULT NULL COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='航线智能柜关联信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_line_info_seal`
--

DROP TABLE IF EXISTS `air_line_info_seal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_line_info_seal` (
  `id` bigint NOT NULL COMMENT '主键id',
  `line_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '航线模板名称',
  `source_type` int(4) unsigned zerofill DEFAULT NULL COMMENT '来源类型',
  `import_time` datetime DEFAULT NULL COMMENT '为KML导入时记录导入的时间',
  `import_user_id` bigint DEFAULT NULL COMMENT '为KML导入时记录导入userId',
  `import_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '为KML导入时记录导入者姓名',
  `line_properties` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '系统航线的航距设置、航线角度、最大坡度角等属性',
  `strap_buffer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '带状区域底图',
  `area_array` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '当为区域航线时区域的坐标',
  `air_line_id` bigint NOT NULL COMMENT '航线模板id(用于溯源)',
  `shape_type` int DEFAULT NULL COMMENT '航线形状类型',
  `completion_action` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '完成动作',
  `reset_camera` int DEFAULT '0' COMMENT '每次航点复位云台， 0 不复位，1 复位',
  `conn_lost_plan` int DEFAULT '3' COMMENT '断网措施 1: 返航，2:悬停，3：完成剩余航线',
  `remarks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `org_id` int DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `air_zone_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '区域ID',
  `air_zone` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '飞行区域',
  `air_zone_lat` decimal(20,7) DEFAULT NULL COMMENT '区域中心点纬度',
  `air_zone_lng` decimal(20,7) DEFAULT NULL COMMENT '区域中心点经度',
  `air_space_id` bigint DEFAULT NULL COMMENT '空域ID',
  `air_space` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '飞行空域',
  `flyer_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '飞手姓名',
  `flyer_op_time` datetime DEFAULT NULL COMMENT '飞手飞行时间',
  `fly_uav_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '飞手飞行器类型',
  `length` decimal(10,2) DEFAULT NULL COMMENT '路径长度',
  `height_type` int DEFAULT NULL COMMENT '高度类型',
  `height` decimal(3,0) DEFAULT NULL COMMENT '飞行高度',
  `cruising_speed` decimal(3,1) DEFAULT NULL COMMENT '巡航速度',
  `planned_fly_duration` decimal(10,2) DEFAULT NULL COMMENT '预计飞行时间',
  `point_num` int DEFAULT NULL COMMENT '航点数',
  `point_basic_info_mode` int DEFAULT NULL COMMENT '航线基础信息模式',
  `origin_coordinate_type` int DEFAULT NULL COMMENT '原始坐标类型',
  `area` decimal(10,2) DEFAULT NULL COMMENT '区域面积',
  `hangar_model_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机库型号id',
  `hangar_model` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机库型号',
  `dev_category` int DEFAULT NULL COMMENT '设备种类',
  `uav_model_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '无人机型号ID',
  `uav_model` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '无人机型号',
  `load_models` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '载荷型号列表',
  `step` int NOT NULL COMMENT '航线创建步数',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航线规划基本信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_point_info_seal`
--

DROP TABLE IF EXISTS `air_point_info_seal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_point_info_seal` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `sort_number` int DEFAULT NULL COMMENT '航点飞行顺序',
  `air_point_type` int DEFAULT NULL COMMENT '航点类型:1起飞点,2飞行点,3.降落点(终点)',
  `height` decimal(5,1) DEFAULT NULL COMMENT '高度',
  `speed` decimal(3,1) DEFAULT NULL COMMENT '速度',
  `point_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '航点图片',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `air_point_id` bigint DEFAULT NULL COMMENT '关联的航点模板id(用于溯源)',
  `air_line_case_id` bigint DEFAULT NULL COMMENT '航线实例id',
  `air_line_id` bigint DEFAULT NULL COMMENT '关联的航线模板id(用于溯源)',
  `action_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '航点动作列表',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人名称',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人名称',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bts_info`
--

DROP TABLE IF EXISTS `bts_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bts_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '基站信息ID',
  `bts_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度',
  `bts_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度',
  `bts_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度wgs84格式',
  `bts_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度wgs84格式',
  `bts_height` decimal(5,1) DEFAULT NULL COMMENT '基站高度',
  `bts_azimuth_1` decimal(5,1) DEFAULT NULL COMMENT '方位角1',
  `bts_azimuth_2` decimal(5,1) DEFAULT NULL COMMENT '方位角2',
  `bts_azimuth_3` decimal(5,1) DEFAULT NULL COMMENT '方位角3',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deleted` int DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='基站信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cabinet_info`
--

DROP TABLE IF EXISTS `cabinet_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cabinet_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '编码',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '名称',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '地址',
  `object_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的objectPath',
  `gcj02_lat` decimal(20,7) DEFAULT NULL COMMENT '纬度（高德）',
  `gcj02_lon` decimal(20,7) DEFAULT NULL COMMENT '经度（高德）',
  `wgs84_lat` decimal(20,7) DEFAULT NULL COMMENT '纬度（wgs）',
  `wgs84_lon` decimal(20,7) DEFAULT NULL COMMENT '经度（wgs）',
  `onl_status` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '在线状态',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `deleted` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智能柜信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_alarm`
--

DROP TABLE IF EXISTS `civil_military_alarm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_alarm` (
  `id` bigint NOT NULL COMMENT '告警id',
  `aerocraft_type` int DEFAULT NULL COMMENT '飞行器类型，0：云平台无人机，1：基站探测到的飞行器',
  `aerocraft_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器id',
  `area_type` int DEFAULT NULL COMMENT '告警的区域类型，0：规划区域告警，1：基站探测区域告警',
  `order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行编号，仅无人机使用',
  `radar_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站雷达id，基站告警使用',
  `target_type` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '探测到的目标类型',
  `event` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '入侵事件，闯入：INTRUDE',
  `status` int DEFAULT NULL COMMENT '告警状态：0：告警中，1:告警结束',
  `company_id` bigint DEFAULT NULL COMMENT '公司id',
  `begin_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `end_type` int DEFAULT NULL COMMENT '结束类型，0：自动结束，1：手动结束',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id，如果是触发则为空',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0：未删除，1：删除',
  PRIMARY KEY (`id`),
  KEY `idx_aerocraft` (`company_id`,`aerocraft_type`,`aerocraft_id`,`area_type`) USING BTREE,
  KEY `idx_status_update_at` (`status`,`update_at`),
  KEY `idx_company_id_status_del_time` (`company_id`,`status`,`is_del`,`begin_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='军民融合告警记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_alarm_area`
--

DROP TABLE IF EXISTS `civil_military_alarm_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_alarm_area` (
  `id` bigint NOT NULL COMMENT '告警区域id',
  `alarm_id` bigint DEFAULT NULL COMMENT '告警id',
  `area_type` int DEFAULT NULL COMMENT '区域类型，0：规划区域，1：基站探测区域',
  `area_id` bigint DEFAULT NULL COMMENT '区域id',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  PRIMARY KEY (`id`),
  KEY `idx_alarm_airspace_alarm_id` (`alarm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='告警区域表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_bts_info`
--

DROP TABLE IF EXISTS `civil_military_bts_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_bts_info` (
  `id` bigint unsigned NOT NULL COMMENT '基站信息ID',
  `bts_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站名称',
  `bts_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站编码',
  `radar_id` varchar(64) DEFAULT NULL COMMENT '基站雷达id',
  `bts_community_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理小区名称',
  `bts_community_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理小区编号',
  `bts_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度',
  `bts_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度',
  `bts_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度wgs84格式',
  `bts_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度wgs84格式',
  `bts_height` decimal(5,1) DEFAULT NULL COMMENT '基站探测高度',
  `bts_radius` decimal(5,1) DEFAULT NULL COMMENT '探测器探测半径',
  `bts_toward` decimal(5,1) DEFAULT NULL COMMENT '基站探测器朝向',
  `bts_sector_angle` decimal(5,1) DEFAULT NULL COMMENT '基站探测扇形角度',
  `bts_info_dip_angle` decimal(5,1) DEFAULT '19.0' COMMENT '下傾角（°）（上傾用負數角度表示）',
  `bts_info_vertical_sector_angle` decimal(5,1) DEFAULT '25.0' COMMENT '垂直扇形角度',
  `altitude` decimal(5,1) DEFAULT NULL COMMENT '地面海拔高度',
  `alarm_closed` bit(1) DEFAULT b'0' COMMENT '0告警，1不告警',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `update_id` bigint DEFAULT NULL COMMENT '更新用户id',
  `create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人名称',
  `online_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` bit(1) DEFAULT b'0' COMMENT '0保留,1假删除',
  `origin` varchar(50) DEFAULT NULL COMMENT '数据来源',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_bts_code` (`bts_code`) USING BTREE,
  KEY `idx_online_time` (`online_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='军民融合基站信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_bts_record_info`
--

DROP TABLE IF EXISTS `civil_military_bts_record_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_bts_record_info` (
  `id` bigint NOT NULL COMMENT '基站记录id',
  `bts_id` bigint DEFAULT NULL COMMENT '基站id',
  `bts_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站名称',
  `bts_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站编码',
  `radar_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站雷达id',
  `bts_community_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理小区名称',
  `bts_community_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理小区编号',
  `bts_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度',
  `bts_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度',
  `bts_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '基站纬度wgs84格式',
  `bts_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '基站经度wgs84格式',
  `bts_height` decimal(5,1) DEFAULT NULL COMMENT '基站探测高度',
  `bts_radius` decimal(5,1) DEFAULT NULL COMMENT '探测器探测半径',
  `bts_toward` decimal(5,1) DEFAULT NULL COMMENT '基站探测器朝向',
  `bts_sector_angle` decimal(5,1) DEFAULT NULL COMMENT '基站探测扇形角度',
  `bts_info_dip_angle` decimal(5,1) DEFAULT '19.0' COMMENT '下傾角（°）（上傾用負數角度表示）',
  `bts_info_vertical_sector_angle` decimal(5,1) DEFAULT '25.0' COMMENT '垂直扇形角度',
  `altitude` decimal(5,1) DEFAULT NULL COMMENT '地面海拔高度',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `version` int DEFAULT NULL COMMENT '记录版本',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_bts_code` (`bts_code`) USING BTREE,
  KEY `idx_bts_id` (`bts_id`) USING BTREE,
  KEY `idx_bts_end_time` (`start_time`,`end_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='军民融合基站信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_detection_configure_info`
--

DROP TABLE IF EXISTS `civil_military_detection_configure_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_detection_configure_info` (
  `id` bigint unsigned NOT NULL COMMENT '低空探测配置ID',
  `ref_lat` decimal(20,7) DEFAULT NULL COMMENT '参照点纬度',
  `ref_lng` decimal(20,7) DEFAULT NULL COMMENT '参照点经度',
  `ref_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '参照点纬度wgs84格式',
  `ref_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '参照点经度wgs84格式',
  `configs` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '个人所有配置',
  `keep_duration` bigint DEFAULT NULL COMMENT '探测目标轨迹保留时长',
  `suppression_num` int DEFAULT NULL COMMENT '虚警的抑制点数',
  `user_id` bigint DEFAULT NULL COMMENT '用户ID',
  `user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `deleted` bit(1) DEFAULT b'0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='低空探测配置信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_statisic`
--

DROP TABLE IF EXISTS `civil_military_statisic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_statisic` (
  `id` bigint NOT NULL COMMENT '主键id',
  `bts_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站id',
  `bts_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站编码',
  `dimension` int DEFAULT '0' COMMENT '维度（0:全部 1:年  2:月 3:周  4:日 ）',
  `dimension_value` int DEFAULT NULL COMMENT '年：2024，月202401，日20240101',
  `total` int DEFAULT NULL COMMENT '探测总架次',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_bts_statistic_dim` (`bts_code`,`dimension`,`dimension_value`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='基站探测统计表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `civil_military_track`
--

DROP TABLE IF EXISTS `civil_military_track`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `civil_military_track` (
  `id` bigint NOT NULL COMMENT '主键id',
  `radar_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '基站雷达编号',
  `track_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '基站探测的飞行器id',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_track_id` (`track_id`) USING BTREE,
  KEY `idx_track_create_at` (`create_at`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='基站探测统计表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `conflict_early_warning`
--

DROP TABLE IF EXISTS `conflict_early_warning`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `conflict_early_warning` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `air_space` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域ID',
  `deleted` tinyint DEFAULT NULL COMMENT '飞行计划空域ID',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户ID',
  `def_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户ID',
  `upd_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='冲突预警';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `detection_configure_info`
--

DROP TABLE IF EXISTS `detection_configure_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `detection_configure_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '低空探测配置ID',
  `ref_lat` decimal(20,7) DEFAULT NULL COMMENT '参照点纬度',
  `ref_lng` decimal(20,7) DEFAULT NULL COMMENT '参照点经度',
  `ref_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '参照点纬度wgs84格式',
  `ref_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '参照点经度wgs84格式',
  `keep_duration` bigint DEFAULT NULL COMMENT '探测目标轨迹保留时长',
  `user_id` bigint DEFAULT NULL COMMENT '用户ID',
  `user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `deleted` int DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='低空探测配置信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `drone_info`
--

DROP TABLE IF EXISTS `drone_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `drone_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `device_no` varchar(255) DEFAULT NULL COMMENT '设备号',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '编码',
  `model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '型号',
  `manufacturer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '生产厂家',
  `load_weight` decimal(10,2) DEFAULT NULL COMMENT '最大安全载重',
  `enable` tinyint DEFAULT NULL COMMENT '可用状态 1.可用 2.禁用 3.保养 4.报废',
  `onl_status` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '在线状态',
  `def_status` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '默认执飞',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_id` bigint DEFAULT NULL COMMENT '创建人',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人',
  `deleted` tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `emergency_area_info`
--

DROP TABLE IF EXISTS `emergency_area_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `emergency_area_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
  `area` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'GCJ-02区域范围',
  `w_area` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'WGS84区域范围',
  `location` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '地址',
  `status` int DEFAULT NULL COMMENT '状态：0：影藏，1：显示',
  `color` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '颜色',
  `remarks` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='应急兴趣区域表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `emergency_plane_status`
--

DROP TABLE IF EXISTS `emergency_plane_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `emergency_plane_status` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uas_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机ID',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `station_sn` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站编号',
  `mission_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业ID',
  `mission_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业名称',
  `scene_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '场景名称',
  `plane_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机名称',
  `plane_model` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机类型',
  `start_job_time` datetime DEFAULT NULL COMMENT '开始作业时间',
  `stop_job_time` datetime DEFAULT NULL COMMENT '停止作业时间',
  `status` tinyint DEFAULT NULL COMMENT '当前状态。 0.已开启  1.已关闭',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_uas_id` (`uas_id`),
  KEY `idx_station_sn` (`station_sn`),
  KEY `idx_mission_id` (`mission_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='无人机通信作业状态';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `emergency_resource_info`
--

DROP TABLE IF EXISTS `emergency_resource_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `emergency_resource_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `resource_name` varchar(30) DEFAULT NULL COMMENT '资源名称',
  `resource_type` varchar(30) DEFAULT NULL COMMENT '资源类型',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `location` varchar(200) DEFAULT NULL COMMENT '地址',
  `remarks` varchar(30) DEFAULT NULL COMMENT '备注',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='应急资源信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `env_protection_air_line_related_info`
--

DROP TABLE IF EXISTS `env_protection_air_line_related_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `env_protection_air_line_related_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `air_line_id` bigint DEFAULT NULL COMMENT '航线ID',
  `mission_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '巡检作业ID列表',
  `mission_id` bigint DEFAULT NULL COMMENT '最近一条开始的作业ID',
  `mission_executor_id` int DEFAULT NULL COMMENT '执行人id',
  `org_id` int DEFAULT NULL COMMENT '公司ID',
  `deleted` tinyint DEFAULT '0' COMMENT '0保留,1假删除',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='智慧环保航线关联信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_info`
--

DROP TABLE IF EXISTS `order_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '订单号',
  `uav_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机编码',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='订单信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `park_patrol_air_line_related_info`
--

DROP TABLE IF EXISTS `park_patrol_air_line_related_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `park_patrol_air_line_related_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `air_line_id` bigint DEFAULT NULL COMMENT '航线ID',
  `mission_id` bigint DEFAULT NULL COMMENT '最近一条开始的作业ID',
  `mission_executor_id` int DEFAULT NULL COMMENT '执行人id',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `deleted` tinyint unsigned DEFAULT '0' COMMENT '0保留,1假删除',
  `create_time` bigint unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=124 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='园区巡检航线关联信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `patrol_record_info`
--

DROP TABLE IF EXISTS `patrol_record_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `patrol_record_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `patrol_time` bigint unsigned DEFAULT NULL COMMENT '巡检时间',
  `status` tinyint unsigned DEFAULT NULL COMMENT '状态(0 正常，1 异常)',
  `highest_temperature` decimal(10,2) DEFAULT NULL COMMENT '最高温度',
  `highest_temperature_threshold` decimal(10,2) DEFAULT NULL COMMENT '最高温度阈值',
  `tmp_id` bigint unsigned DEFAULT NULL COMMENT '测温点位ID',
  `images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '巡检记录图片列表',
  `lat` decimal(20,7) DEFAULT NULL COMMENT '巡检记录GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT '巡检记录GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='巡检记录信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `photoelectric_alarm`
--

DROP TABLE IF EXISTS `photoelectric_alarm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `photoelectric_alarm` (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警ID',
  `camera_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '摄像头ID',
  `thumbnail_file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '缩略图文件ID',
  `alarm_time` timestamp NULL DEFAULT NULL COMMENT '告警时间',
  `ai_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '目标类型：bird、drone',
  `bird` int DEFAULT NULL COMMENT '探测目标数量',
  `drone` int DEFAULT NULL COMMENT '探测目标数量',
  `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件ID',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除,0:否，1:是',
  `company_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`),
  KEY `idx_alarm_time` (`alarm_time`) USING BTREE COMMENT 'index'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='光电摄像头告警表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `photoelectric_camera_info`
--

DROP TABLE IF EXISTS `photoelectric_camera_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `photoelectric_camera_info` (
  `id` int NOT NULL COMMENT '摄像头ID',
  `camera_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '摄像头名称',
  `camera_resolution` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分辨率',
  `camera_toward` decimal(5,1) DEFAULT NULL COMMENT '摄像头朝向',
  `camera_radius` decimal(5,1) DEFAULT NULL COMMENT '摄像头覆盖半径',
  `camera_sector_angle` decimal(5,1) DEFAULT NULL COMMENT '摄像头覆盖角度',
  `camera_lat` decimal(20,7) DEFAULT NULL COMMENT '摄像头纬度',
  `camera_lng` decimal(20,7) DEFAULT NULL COMMENT '摄像头经度',
  `zoom` decimal(5,1) DEFAULT NULL COMMENT '当前变焦倍数',
  `push_stream` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '推流地址',
  `thumbnail_pull_stream` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '小窗拉流地址',
  `pull_stream` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '拉流地址',
  `company_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='光电摄像头表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `police_case_info`
--

DROP TABLE IF EXISTS `police_case_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `police_case_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '数据库主键',
  `type` varchar(255) NOT NULL COMMENT '事件类型',
  `deleted` int DEFAULT '0' COMMENT '删除标记位',
  `company_id` bigint DEFAULT NULL COMMENT '公司id',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `gcj02_lon` bigint DEFAULT NULL COMMENT 'gcj02 经度 扩大一定倍数',
  `gcj02_lat` bigint DEFAULT NULL COMMENT 'gcj02 纬度 扩大一定倍数',
  `wgs84_lat` bigint DEFAULT NULL COMMENT 'wgs84 纬度 扩大一定倍数',
  `create_timestamp` bigint DEFAULT NULL COMMENT '创建时间戳',
  `wgs82_lon` bigint DEFAULT NULL COMMENT 'wgs84 经度 扩大一定倍数',
  `dispatch_time` bigint DEFAULT NULL COMMENT '出警时间戳',
  `uas_id` varchar(255) DEFAULT NULL COMMENT '出警无人机id',
  `hangar_id` varchar(255) DEFAULT NULL COMMENT '出警机库id',
  `mission_id` bigint DEFAULT NULL COMMENT '出警作业id',
  `AJID` varchar(255) DEFAULT NULL COMMENT '案件ID',
  `AJLX` varchar(255) DEFAULT NULL COMMENT '案件类型',
  `BJSJ` varchar(255) DEFAULT NULL COMMENT '报警时间',
  `AFDZ` varchar(255) DEFAULT NULL COMMENT '案发地址',
  `CZDX` varchar(255) DEFAULT NULL COMMENT '处置对象',
  `ZJHM` varchar(255) DEFAULT NULL COMMENT '报警电话',
  `ZJYHM` varchar(255) DEFAULT NULL COMMENT '报警人',
  `ZGZDDM` varchar(255) DEFAULT NULL COMMENT '主管中队代码',
  `ZGZDMC` varchar(255) DEFAULT NULL COMMENT '主管中队名称',
  `SSZDDM` varchar(255) DEFAULT NULL COMMENT '所属支队代码',
  `SSZDMC` varchar(255) DEFAULT NULL COMMENT '所属支队名称',
  `SSJW` varchar(255) DEFAULT NULL COMMENT '所属居委',
  `SSJD` varchar(255) DEFAULT NULL COMMENT '所属街道',
  PRIMARY KEY (`id`),
  KEY `idx_AJID` (`AJID`)
) ENGINE=InnoDB AUTO_INCREMENT=1823960996555468803 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='警情信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sense_data_sink_config`
--

DROP TABLE IF EXISTS `sense_data_sink_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sense_data_sink_config` (
  `id` bigint NOT NULL COMMENT '主键id',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分发者编码',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分发者名称',
  `type` int DEFAULT NULL COMMENT '分发者类型',
  `public_key` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公钥',
  `config` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '配置',
  `is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
  `upd_usr_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `upd_date` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sense_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='SF adapter的分发配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `temperature_measuring_point_info`
--

DROP TABLE IF EXISTS `temperature_measuring_point_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `temperature_measuring_point_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '测温点名称',
  `air_line_id` bigint DEFAULT NULL COMMENT '航线ID',
  `line_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '航线名称',
  `status` tinyint unsigned DEFAULT NULL COMMENT '测温点状态(0 正常，1 异常)',
  `latest_highest_temperature` decimal(10,2) DEFAULT NULL COMMENT '最近最高温度',
  `highest_temperature_threshold` decimal(10,2) DEFAULT NULL COMMENT '最高温度阈值',
  `latest_patrol_time` bigint unsigned DEFAULT NULL COMMENT '最近巡检时间',
  `mission_id` bigint DEFAULT NULL COMMENT '作业ID',
  `mission_type` int DEFAULT NULL COMMENT '作业类型(普通作业，定时作业计划，定时作业实例,...)',
  `mission_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业名称',
  `air_point_index` int unsigned DEFAULT NULL COMMENT '航点序号',
  `action_num` int unsigned DEFAULT NULL COMMENT '动作号',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `deleted` tinyint unsigned DEFAULT '0' COMMENT '0保留,1假删除',
  `create_time` bigint unsigned DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='测温点位信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_info`
--

DROP TABLE IF EXISTS `tower_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `route_id` bigint NOT NULL COMMENT '线路id',
  `route_name` varchar(40) NOT NULL COMMENT '线路名称',
  `tower_number` varchar(3) DEFAULT NULL COMMENT '杆塔号',
  `sort_number` int DEFAULT NULL COMMENT '杆塔连线顺序',
  `maintenance_team` varchar(40) DEFAULT NULL COMMENT '运维班组',
  `tower_type` varchar(40) DEFAULT NULL COMMENT '杆塔类别',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人id',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3744 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='杆塔信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_pic_info`
--

DROP TABLE IF EXISTS `tower_pic_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_pic_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `route_id` bigint DEFAULT NULL COMMENT '线路id',
  `tower_id` bigint NOT NULL COMMENT '杆塔id',
  `mission_id` bigint DEFAULT NULL COMMENT '作业id',
  `file_type` varchar(20) DEFAULT NULL COMMENT '图片类型',
  `file_name` varchar(255) DEFAULT NULL COMMENT '图片名称',
  `create_date` datetime DEFAULT NULL COMMENT '写入时间',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `source_type` int DEFAULT NULL COMMENT '图片来源类型',
  `storage_size` decimal(10,2) DEFAULT NULL COMMENT '图片大小',
  `file_url` varchar(1000) DEFAULT NULL COMMENT '图片存储地址',
  `real_lat` double DEFAULT NULL COMMENT '拍摄时无人机纬度',
  `real_lng` double DEFAULT NULL COMMENT '拍摄时无人机经度',
  `defect_list` text COMMENT '缺陷列表',
  `project_id` varchar(50) DEFAULT NULL COMMENT '素材仓库的projectId',
  `object_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的objectPath',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=477 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='杆塔图片信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tower_route_info`
--

DROP TABLE IF EXISTS `tower_route_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tower_route_info` (
  `id` bigint NOT NULL COMMENT 'id',
  `route_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '线路名称',
  `air_line_id` text COMMENT '航线模板id列表(用于溯源)',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人id',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='线路信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `traffic_airport_warn_info`
--

DROP TABLE IF EXISTS `traffic_airport_warn_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `traffic_airport_warn_info` (
  `id` bigint NOT NULL COMMENT '主键 ID',
  `warn_time` datetime DEFAULT NULL COMMENT '告警时间',
  `bts_code` varchar(255) NOT NULL COMMENT '基站编号',
  `runway_no` varchar(255) DEFAULT NULL COMMENT '跑道编号',
  `invader_id` varchar(255) DEFAULT NULL COMMENT '入侵物编号',
  `warn_info` varchar(100) DEFAULT NULL COMMENT '告警详情',
  `flight_about` varchar(100) DEFAULT NULL COMMENT '影响航班',
  `invader_lng` decimal(20,7) DEFAULT NULL COMMENT '入侵物经度',
  `invader_lat` decimal(20,7) DEFAULT NULL COMMENT '入侵物纬度',
  `handle_state` int DEFAULT NULL COMMENT '处理状态,0:未处理，1:已处理',
  `handle_info` varchar(255) DEFAULT NULL COMMENT '处理意见',
  `handle_id` bigint DEFAULT NULL COMMENT '处理人',
  `handle_time` datetime DEFAULT NULL COMMENT '处理时间',
  `org_id` bigint DEFAULT NULL COMMENT '所属组织',
  `create_id` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` bit(1) DEFAULT b'0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_traffic_airport_warn_info_org_id_index` (`org_id`),
  KEY `idx_traffic_airport_warn_info_warn_time_index` (`warn_time`),
  KEY `idx_traffic_airport_warn_info_bts_code_index` (`bts_code`),
  KEY `idx_traffic_airport_warn_info_runway_no_index` (`runway_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智慧机场-探测事件';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `traffic_flight_info`
--

DROP TABLE IF EXISTS `traffic_flight_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `traffic_flight_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `flight_no` varchar(50) NOT NULL COMMENT '航班号',
  `takeoff_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '起飞时间',
  `landing_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '降落时间',
  `runway_no` varchar(50) NOT NULL COMMENT '跑道编号',
  `aircraft_type` varchar(50) DEFAULT NULL COMMENT '机型',
  `org_id` bigint DEFAULT NULL COMMENT '所属组织',
  `create_id` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人',
  `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_traffic_flight_info_takeoff_time_index` (`takeoff_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='航班信息-智慧交通中应用';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `traffic_runway_info`
--

DROP TABLE IF EXISTS `traffic_runway_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `traffic_runway_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `runway_no` varchar(50) DEFAULT NULL COMMENT '跑道编号',
  `runway_name` varchar(50) DEFAULT NULL COMMENT '跑道名称',
  `left_top_lng` decimal(20,7) DEFAULT NULL COMMENT '左上经度',
  `left_top_lat` decimal(20,7) DEFAULT NULL COMMENT '左上纬度',
  `left_bottom_lng` decimal(20,7) DEFAULT NULL COMMENT '左下经度',
  `left_bottom_lat` decimal(20,7) DEFAULT NULL COMMENT '左下纬度',
  `right_top_lng` decimal(20,7) DEFAULT NULL COMMENT '右上经度',
  `right_top_lat` decimal(20,7) DEFAULT NULL COMMENT '右上纬度',
  `right_bottom_lng` decimal(20,7) DEFAULT NULL COMMENT '右下经度',
  `right_bottom_lat` decimal(20,7) DEFAULT NULL COMMENT '右下纬度',
  `org_id` bigint DEFAULT NULL COMMENT '所属组织',
  `create_id` bigint DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` bit(1) DEFAULT b'0' COMMENT '删除标记',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='跑道信息-智慧交通';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_heart_his`
--

DROP TABLE IF EXISTS `user_heart_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_heart_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '公司ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `user_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户类型（scout:侦察员; flying:飞手）',
  `heart_time` datetime NOT NULL COMMENT '心跳时间',
  `longitude` decimal(15,8) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(15,8) DEFAULT NULL COMMENT '纬度',
  `direction_angle` decimal(10,5) DEFAULT NULL COMMENT '方向角',
  `udate_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25442 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户历史心跳表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_status`
--

DROP TABLE IF EXISTS `user_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_status` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户归属公司ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `user_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户类型（scout:侦察员; flying:飞手）',
  `last_heart_time` datetime NOT NULL COMMENT '最近一次心跳时间',
  `longitude` decimal(15,8) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(15,8) DEFAULT NULL COMMENT '纬度',
  `direction_angle` decimal(10,5) DEFAULT NULL COMMENT '方向角',
  `online` tinyint DEFAULT '1' COMMENT '0.不在线 1.在线，默认值',
  `online_time` datetime DEFAULT NULL COMMENT '上线时间',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_user_id` (`user_id`,`user_type`),
  KEY `idx_company_id` (`company_id`),
  KEY `idx_last_heart_time` (`last_heart_time`),
  KEY `idx_online_time` (`online_time`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户状态表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `web_flag_info`
--

DROP TABLE IF EXISTS `web_flag_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `web_flag_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '数据库主键',
  `flag_name` varchar(255) DEFAULT NULL COMMENT '标记名称',
  `flag_address` varchar(255) DEFAULT NULL COMMENT '标记地址',
  `icon` varchar(255) DEFAULT NULL COMMENT '标记地址',
  `color` varchar(255) DEFAULT NULL COMMENT '标记地址',
  `extra_data` varchar(255) DEFAULT NULL COMMENT '标记地址',
  `flag_note` varchar(255) DEFAULT NULL COMMENT '标记地址',
  `gcj02_lon` bigint DEFAULT NULL COMMENT 'gcj02 经度 扩大一定倍数',
  `gcj02_lat` bigint DEFAULT NULL COMMENT 'gcj02 纬度 扩大一定倍数',
  `wgs82_lon` bigint DEFAULT NULL COMMENT 'wgs84 经度 扩大一定倍数',
  `wgs84_lat` bigint DEFAULT NULL COMMENT 'wgs84 经度 扩大一定倍数',
  `user_id` int DEFAULT NULL COMMENT '用户id',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `deleted` int DEFAULT '0' COMMENT '删除标志位',
  `last_modified_time` bigint DEFAULT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1641633432938885122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='公安页面标记';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zc_line_config`
--

DROP TABLE IF EXISTS `zc_line_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zc_line_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增表ID',
  `point_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '关联侦察点编号',
  `line_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '侦察线路名称',
  `order_number` int NOT NULL COMMENT '侦察线路序号编号',
  `line_point` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '线路点',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_point_code` (`point_code`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='侦察点表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zc_point_config`
--

DROP TABLE IF EXISTS `zc_point_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zc_point_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `point_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '侦察线路编号',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `point_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '侦察点名称',
  `order_number` int DEFAULT NULL COMMENT '侦察点序号',
  `line_number` int DEFAULT NULL COMMENT '侦察路线数',
  `longitude` decimal(15,8) DEFAULT NULL COMMENT '经度',
  `latitude` decimal(15,8) DEFAULT NULL COMMENT '纬度',
  `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '地址',
  `deleted` tinyint DEFAULT NULL COMMENT '是否删除(1.删除 0.未删除）',
  `add_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '添加用户ID',
  `modify_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改用户ID',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_point_code` (`point_code`),
  KEY `idx_company_id` (`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='侦察线路表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_industrial_portfolio'
--

--
-- Dumping routines for database 'uav_industrial_portfolio'
--

--
-- Current Database: `uav_iot_dispatcher`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_iot_dispatcher` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_iot_dispatcher`;

--
-- Table structure for table `cmii_uav_perception_position_node`
--

DROP TABLE IF EXISTS `cmii_uav_perception_position_node`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cmii_uav_perception_position_node` (
  `id` varchar(36) COLLATE utf8mb4_bin NOT NULL,
  `task_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT 'cmii_uav_perception_task的主键id',
  `latitude` double NOT NULL COMMENT '纬度',
  `longitude` double NOT NULL COMMENT '经度',
  `altitude` float NOT NULL COMMENT '海拔',
  `height` float NOT NULL COMMENT '相对地面高度',
  `speed_x` float NOT NULL COMMENT 'x轴方向速度，北',
  `speed_y` float NOT NULL COMMENT 'y轴方向速度，东',
  `speed_z` float NOT NULL COMMENT 'z轴方向速度，地',
  `distance` float DEFAULT NULL COMMENT '传感源到目标距离',
  `timestamp` datetime(6) NOT NULL COMMENT '该条记录创建的时间戳，精确到毫秒',
  `data_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '感知数据的id',
  `radar_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '仅针对5G-A感知，作为感知源设备的id，即雷达自己的id',
  `device_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '摄像头跟踪的设备id，即摄像头自己的id',
  `company_id` int NOT NULL COMMENT '公司ID，用于数据隔离',
  PRIMARY KEY (`id`),
  KEY `ix_cmii_uav_perception_position_node_data_id` (`data_id`),
  KEY `ix_cmii_uav_perception_position_node_task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cmii_uav_perception_task`
--

DROP TABLE IF EXISTS `cmii_uav_perception_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cmii_uav_perception_task` (
  `id` varchar(36) COLLATE utf8mb4_bin NOT NULL,
  `project_id` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '项目编号',
  `group_id` varchar(96) COLLATE utf8mb4_bin NOT NULL COMMENT '该组（探测任务）的编号，非唯一的，可以重复',
  `origin_topic` varchar(96) COLLATE utf8mb4_bin NOT NULL COMMENT '原始引导源',
  `shared_topic` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '共享引导源',
  `publish_topic` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT 'IoT设备通知主题',
  `lifecycle_is_started` tinyint(1) NOT NULL COMMENT '任务是否开始',
  `lifecycle_is_completed` tinyint(1) NOT NULL COMMENT '任务是否完成',
  `lifecycle_created_time` datetime(6) NOT NULL COMMENT '任务创建时间',
  `lifecycle_completed_time` datetime(6) DEFAULT NULL COMMENT '任务结束时间',
  `lifecycle_max_lifetime` int NOT NULL COMMENT '任务最大存活时间(单位秒)',
  `device_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '当前摄像头跟踪的设备id，即摄像头自己的id',
  `company_id` int NOT NULL COMMENT '公司ID，用于数据隔离',
  PRIMARY KEY (`id`),
  KEY `ix_cmii_uav_perception_task_group_id` (`group_id`),
  KEY `ix_cmii_uav_perception_task_lifecycle_is_completed` (`lifecycle_is_completed`),
  KEY `ix_cmii_uav_perception_task_lifecycle_is_started` (`lifecycle_is_started`),
  KEY `ix_cmii_uav_perception_task_project_id` (`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cmii_uav_servo_device`
--

DROP TABLE IF EXISTS `cmii_uav_servo_device`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cmii_uav_servo_device` (
  `id` varchar(36) COLLATE utf8mb4_bin NOT NULL COMMENT '主键id',
  `camera_name` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的名字',
  `camera_device_id` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的设备id',
  `camera_project_id` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的项目所属id',
  `camera_ip` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的ip',
  `camera_port` int NOT NULL COMMENT '摄像头的port',
  `camera_rtsp_port` int NOT NULL COMMENT '摄像头rtsp推流端口',
  `onvif_user` varchar(24) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'onvif连接摄像头的用户名',
  `onvif_passwd` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'onvif连接摄像头的密码',
  `camera_pan_range_min` float NOT NULL COMMENT '摄像头的水平最小度数',
  `camera_pan_range_max` float NOT NULL COMMENT '摄像头的水平最大度数',
  `camera_tilt_range_min` float NOT NULL COMMENT '摄像头的垂直最小度数',
  `camera_tilt_range_max` float NOT NULL COMMENT '摄像头的垂直最大度数',
  `camera_pan_speed_min` float NOT NULL COMMENT '摄像头的水平最小速度',
  `camera_pan_speed_max` float NOT NULL COMMENT '摄像头的水平最大速度',
  `camera_tilt_speed_min` float NOT NULL COMMENT '摄像头的垂直最小速度',
  `camera_tilt_speed_max` float NOT NULL COMMENT '摄像头的垂直最大速度',
  `camera_zoom_range_min` float NOT NULL COMMENT '摄像头的变焦最小倍数',
  `camera_zoom_range_max` float NOT NULL COMMENT '摄像头的变焦最大倍数',
  `dist_min` float NOT NULL COMMENT '摄像头观测目标的最小距离',
  `dist_max` float NOT NULL COMMENT '摄像头观测目标的最大距离',
  `dist_min_zoom_index` float NOT NULL COMMENT '摄像头的最小变焦步长',
  `dist_max_zoom_index` float NOT NULL COMMENT '摄像头的最大变焦步长',
  `zoom_coeff` float NOT NULL COMMENT '摄像头的变焦系数',
  `camera_latitude` double DEFAULT NULL COMMENT '摄像头所在的纬度',
  `camera_longitude` double DEFAULT NULL COMMENT '摄像头所在的经度',
  `camera_altitude` float DEFAULT NULL COMMENT '摄像头所在的海拔',
  `camera_height` float DEFAULT NULL COMMENT '摄像头所在的高度（相对地面高度）',
  `camera_delay` float NOT NULL COMMENT '摄像头延迟',
  `camera_zoom_method` float NOT NULL COMMENT '触发变焦的方式，默认为1',
  `camera_pan_trime` float NOT NULL COMMENT '摄像头的水平偏差度',
  `camera_tilt_trime` float NOT NULL COMMENT '摄像头的垂直偏差度',
  `camera_reverse` float NOT NULL COMMENT '摄像头是否反转，默认不反转',
  `camera_hfov` float NOT NULL COMMENT '摄像头的水平视场角',
  `camera_vfov` float NOT NULL COMMENT '摄像头的垂直视场角',
  `camera_focal_len_min` float NOT NULL COMMENT '摄像头最小焦距',
  `camera_focal_len_max` float NOT NULL COMMENT '摄像头最大焦距',
  `mqtt_username` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的账号名',
  `mqtt_password` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的密码',
  `mqtt_host` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的地址',
  `mqtt_port` int NOT NULL COMMENT '摄像头连接mqtt的端口',
  `mqtt_keep_alive_interval` int NOT NULL COMMENT '会话心跳时间,单位为秒',
  `mqtt_qos` int NOT NULL COMMENT '服务质量,0代表“至多一次”',
  `dispatcher_topic` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '下发到边端设备的topic',
  `reporting_topic` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '边端设备上传回来的topic',
  `auto_cam_connect` tinyint(1) NOT NULL COMMENT '任务是否开始',
  `auto_push_stream` tinyint(1) NOT NULL COMMENT '任务是否开始',
  `media_push_stream` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的推流地址',
  `media_pull_stream` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '前端的拉流地址',
  `media_ai_pull_stream` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '前端的AI流拉流地址',
  `created_at` datetime(6) DEFAULT NULL COMMENT '记录创建时间',
  `updated_at` datetime(6) DEFAULT NULL COMMENT '记录更新时间',
  `company_id` int NOT NULL COMMENT '公司ID，用于数据隔离',
  `user_id` varchar(16) COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID，用于数据隔离',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ix_cmii_uav_servo_device_camera_device_id` (`camera_device_id`),
  KEY `ix_cmii_uav_servo_device_media_ai_pull_stream` (`media_ai_pull_stream`),
  KEY `ix_cmii_uav_servo_device_media_pull_stream` (`media_pull_stream`),
  KEY `ix_cmii_uav_servo_device_media_push_stream` (`media_push_stream`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_iot_dispatcher'
--

--
-- Dumping routines for database 'uav_iot_dispatcher'
--

--
-- Current Database: `uav_kpi_monitor`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_kpi_monitor` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_kpi_monitor`;

--
-- Table structure for table `ds_config`
--

DROP TABLE IF EXISTS `ds_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ds_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `ds_code` varchar(32) NOT NULL COMMENT '数据源编号',
  `ds_name` varchar(32) NOT NULL COMMENT '数据源名称',
  `ds_type` varchar(12) NOT NULL COMMENT '数据源类型，db:数据库;http:Http接口',
  `config_info` varchar(4000) DEFAULT NULL COMMENT 'db:数据库配置;db_type:mysql|host (port 数据库端口；user_name 用户名；password 密码；database 数据库名)http:url:请求地址；method:POST,GET；serviceId: 服务标识名,cmii-uav-user,cmii-uav-oauth,cmii-uav-process,cmii-uav-notice等)。',
  `remark` varchar(256) DEFAULT NULL COMMENT '模板描述',
  `create_id` varchar(32) DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ds_code` (`ds_code`)
) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `his_fetch_kpi`
--

DROP TABLE IF EXISTS `his_fetch_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `his_fetch_kpi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `fetch_time` timestamp NOT NULL COMMENT '采集时间',
  `kpi_type` varchar(32) NOT NULL COMMENT '指标类型',
  `kpi_name` varchar(32) NOT NULL COMMENT '指标名称',
  `kpi_level` varchar(8) NOT NULL COMMENT '指标层次(SB:设备,XT:系统,YW:业务,GZ:感知)',
  `kpi_val` decimal(20,5) DEFAULT NULL COMMENT '指标取值',
  `is_report` tinyint NOT NULL COMMENT '是否需要上报',
  `score` varchar(12) DEFAULT NULL COMMENT 'standard:达标；excellet：优秀；unstandard:不达标',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=533386 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `his_report_kpi`
--

DROP TABLE IF EXISTS `his_report_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `his_report_kpi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `report_time` timestamp NOT NULL COMMENT '上报时间',
  `kpi_type` varchar(32) NOT NULL COMMENT '指标类型',
  `kpi_name` varchar(32) NOT NULL COMMENT '指标名称',
  `kpi_level` varchar(8) NOT NULL COMMENT '指标层次(SB:设备,XT:系统,YW:业务,GZ:感知)',
  `kpi_val` decimal(20,5) DEFAULT NULL COMMENT '指标取值',
  `success` tinyint NOT NULL COMMENT '上报状态(0.失败； 1.成功)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=454028 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `kpi_config`
--

DROP TABLE IF EXISTS `kpi_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `kpi_config` (
  `id` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,
  `kpi_type` varchar(32) NOT NULL COMMENT '指标类型',
  `kpi_level` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '指标层次(SB:设备,XT:系统,YW:业务,GZ:感知)',
  `kpi_name` varchar(32) NOT NULL COMMENT '指标名称',
  `fetch_type` varchar(12) NOT NULL COMMENT '采集方式(sql：数据库;http:接口)',
  `fetch_cycle` varchar(32) NOT NULL COMMENT '采集周期（minute:5分钟； hour:1小时；day:每天；month:月；year:年度）',
  `ds_code` varchar(32) NOT NULL COMMENT '数据源编号',
  `fetch_condition` varchar(2000) DEFAULT NULL COMMENT '采集条件：\n采集方式sql:sql语句；\nhttp:Http接口。\n可包含变量包括:dayTimeStart:东八区当日00:00:00,dayTimeEnd:当日 23:59:59',
  `result_key` varchar(20) DEFAULT NULL COMMENT '采集指标标识名',
  `kpi_data_type` varchar(12) DEFAULT NULL COMMENT '指标数据类型(long:整数；double：小数）',
  `standard_val` decimal(20,5) DEFAULT NULL COMMENT '达标值',
  `excellet_val` decimal(20,5) DEFAULT NULL COMMENT '优秀值',
  `warn_value` decimal(20,5) DEFAULT NULL COMMENT '预警值',
  `kpi_unit` varchar(12) NOT NULL COMMENT '指标单位,如%',
  `is_report` tinyint(1) DEFAULT NULL COMMENT '该指标是否上报（0.不上报；1.上报）',
  `report_cycle` varchar(32) DEFAULT NULL COMMENT 'is_report为1时生效。上报周期（minute:5分钟； hour:1小时；day:每天；month:月；year:年度）',
  `rt_critical_val` decimal(20,5) DEFAULT NULL COMMENT 'is_report为1时生效。 上报临界值：为空则不做限制；不为空则在坏过临界值则不上报',
  `is_lock` tinyint(1) DEFAULT NULL COMMENT '是否锁定(1.锁定 0.不锁定）',
  `remark` varchar(255) DEFAULT NULL COMMENT '描述',
  `create_id` varchar(32) DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `kpi_type` (`kpi_type`)
) ENGINE=InnoDB AUTO_INCREMENT=325 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `kpi_task_failover`
--

DROP TABLE IF EXISTS `kpi_task_failover`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `kpi_task_failover` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `create_time` timestamp NOT NULL COMMENT '任务创建时间',
  `task_type` varchar(12) DEFAULT NULL COMMENT 'fetch:采集； report:上报指标',
  `kpi_type` varchar(32) NOT NULL COMMENT '指标类型',
  `kpi_name` varchar(12) DEFAULT NULL COMMENT '指标名称',
  `kpi_level` varchar(8) DEFAULT NULL COMMENT '指标层次(SB:设备,XT:系统,YW:业务,GZ:感知)',
  `kpi_val` decimal(20,5) DEFAULT NULL COMMENT '指标取值',
  `expect_start_tm` timestamp NOT NULL COMMENT '希望执行时间，调用程序设置，为空则立马执行。',
  `last_execute_tm` timestamp NULL DEFAULT NULL COMMENT '上次执行完成时时间',
  `spent` int NOT NULL COMMENT '发送耗费时间ms',
  `expire_tm` timestamp NOT NULL COMMENT '超时时间，超过这个时间失败则不再重试',
  `success` tinyint NOT NULL COMMENT '是否成功(1.成功  0.失败）',
  `in_queue` tinyint NOT NULL COMMENT '是否放入任务队列（0.未。 1已放入）',
  `retries` int DEFAULT NULL COMMENT '发送次数',
  `result_desc` varchar(255) DEFAULT NULL COMMENT '执行结果描述',
  `update_at` timestamp NOT NULL,
  `create_at` timestamp NOT NULL,
  PRIMARY KEY (`id`),
  KEY `expect_start_tm` (`expect_start_tm`),
  KEY `expire_tm` (`expire_tm`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sos_kpi`
--

DROP TABLE IF EXISTS `sos_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sos_kpi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `category` varchar(24) NOT NULL COMMENT '分类,job:作业信息；bss:基站&卫星信息;summary:概况',
  `report_sec` timestamp NULL DEFAULT NULL COMMENT '指标上报时间',
  `kpi_info` text COMMENT '指标信息',
  PRIMARY KEY (`id`),
  KEY `report_sec` (`report_sec`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_kpi_monitor'
--

--
-- Dumping routines for database 'uav_kpi_monitor'
--

--
-- Current Database: `uav_lifecycle`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_lifecycle` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_lifecycle`;

--
-- Table structure for table `biz_log`
--

DROP TABLE IF EXISTS `biz_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `log_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日志产生时间',
  `app_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '系统名，微服务系统名。如 用户中心',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '厂商id',
  `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '模块分类，如 "登录"',
  `sub_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '模块小分类，如 "验证码登录"',
  `operate_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '动作事件。 如登录',
  `lang` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'zh_CN' COMMENT '语言,zh_CN:简体中文; en_US:英文;zh_TW:繁体中文',
  `operate_result` smallint DEFAULT NULL COMMENT '操作结果说明，0:操作成功，1:操作失败 2.未知',
  `operate_identity` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '动作事件关联信息。 如 用户id',
  `operate_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '动作事件相关数值。如 email',
  `operate_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作相关其他参数。JSON对象存储，存储方式. {"变量名称":"变量的值"}',
  `operate_time` int DEFAULT NULL COMMENT '操作持续时间',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日志入库时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_category` (`category`) USING BTREE,
  KEY `idx_log_time` (`log_time`) USING BTREE,
  KEY `idx_operate_identiy` (`operate_identity`) USING BTREE,
  KEY `idx_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bridge_data_consumer`
--

DROP TABLE IF EXISTS `bridge_data_consumer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_data_consumer` (
  `id` bigint NOT NULL COMMENT '序号',
  `code` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消费者编码',
  `business` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '业务',
  `purpose` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用途',
  `contact_name` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人名称',
  `contact_phone` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人电话',
  `mqtt_user` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'mqtt用户名',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` bigint DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新人',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据消费方';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bridge_device_info`
--

DROP TABLE IF EXISTS `bridge_device_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_device_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '序列号',
  `provider_code` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '设备提供方编码;每类设备接入平台时，由平台统一分配',
  `device_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '设备id;每台设备接入时，需提供该设备ID',
  `device_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备名称',
  `device_longitude` decimal(24,6) DEFAULT NULL COMMENT '设备安装经度',
  `device_latitude` decimal(24,6) DEFAULT NULL COMMENT '设备安装纬度',
  `device_altitude` decimal(24,6) DEFAULT NULL COMMENT '设备安装海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型;0、5G-A基站，1、合作无人机，2、监管无人机，3、RemoteID无人机，4、雷达设备，5、频谱设备，6、光电设备，7、反制设备，8、诱骗设备，9、干扰设备，10、指挥车，11、察打一体，999、其他设备',
  `work_state` int DEFAULT NULL COMMENT '设备工作状态;0：未工作，1：工作中，2:设备异常',
  `extension` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '扩展信息',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` bigint DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新人',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bridge_device_provider`
--

DROP TABLE IF EXISTS `bridge_device_provider`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_device_provider` (
  `id` bigint NOT NULL COMMENT '序列号',
  `name` varchar(90) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '提供方名称',
  `code` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '提供商编码',
  `mqtt_user` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'mqtt用户',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` bigint DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新人',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备提供方';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cert_device`
--

DROP TABLE IF EXISTS `cert_device`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cert_device` (
  `id` bigint NOT NULL COMMENT '主键',
  `manufacturer_id` bigint NOT NULL COMMENT '厂商id，如果为0，表示中移凌云的服务器证书',
  `mnf_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '生产厂商认证的名称',
  `uav_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机唯一识别码',
  `product_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机产品名称',
  `product_model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机产品型号',
  `uav_verify_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机校验码',
  `serial_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书序列号',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书名称',
  `cert` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书内容，base编码',
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书主题',
  `valid_start_date` datetime(6) NOT NULL COMMENT '证书有效开始时间',
  `valid_end_date` datetime(6) NOT NULL COMMENT '证书有效结束时间',
  `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书对应的私钥',
  `csr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '证书请求的csr',
  `status` int NOT NULL COMMENT '证书状态0：在用，1：过期，2：吊销',
  `history_verify_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机历史的校验码，默认存最近的5条',
  `revoke_time` datetime(6) DEFAULT NULL COMMENT '吊销时间',
  `is_del` bit(1) NOT NULL COMMENT '证书是否删除',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_cert_uavId_code` (`uav_verify_code`,`uav_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='设备证书表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cert_manufacturer_ca`
--

DROP TABLE IF EXISTS `cert_manufacturer_ca`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cert_manufacturer_ca` (
  `id` bigint NOT NULL COMMENT '主键',
  `manufacturer_id` bigint DEFAULT NULL COMMENT '厂商id，如果为0，表示中移凌云的CA',
  `serial_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书序列号',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书名称',
  `mnf_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '生产厂商认证的名称',
  `cert` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书内容，base编码',
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书主题',
  `valid_start_date` datetime(6) NOT NULL COMMENT '证书有效开始时间',
  `valid_end_date` datetime(6) NOT NULL COMMENT '证书有效结束时间',
  `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书对应的私钥',
  `csr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '证书请求的csr',
  `status` int NOT NULL COMMENT '证书状态0：在用，1：过期，2：吊销，3、非活动',
  `revoke_time` datetime(6) DEFAULT NULL COMMENT '吊销时间',
  `is_del` bit(1) NOT NULL COMMENT '证书是否删除',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='厂商证书表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cert_root_ca`
--

DROP TABLE IF EXISTS `cert_root_ca`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cert_root_ca` (
  `id` bigint NOT NULL COMMENT '主键',
  `serial_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书序列号',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证书名称',
  `cert` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书内容，base编码',
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书主题',
  `valid_start_date` datetime(6) NOT NULL COMMENT '证书有效开始时间',
  `valid_end_date` datetime(6) NOT NULL COMMENT '证书有效结束时间',
  `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证书对应的私钥',
  `csr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '证书请求的csr',
  `status` int NOT NULL COMMENT '证书状态0：在用，1：过期，2：吊销',
  `is_del` bit(1) NOT NULL COMMENT '证书是否删除',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='根证书表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `epc_auth`
--

DROP TABLE IF EXISTS `epc_auth`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `epc_auth` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `uav_id` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机唯一识别码',
  `imei` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'imei',
  `sn` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'sn',
  `imsi` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'imsi',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '0 未删除  1 已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='epc验证表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_activities`
--

DROP TABLE IF EXISTS `flight_activities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_activities` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `flight_code` bigint NOT NULL COMMENT '飞行活动编号',
  `apply_user_id` bigint DEFAULT NULL COMMENT '申请人ID',
  `apply_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '申请人姓名',
  `apply_time` datetime DEFAULT NULL COMMENT '申请时间',
  `operate_mode` int DEFAULT NULL COMMENT '操控模式（1遥控飞行、2自主飞行',
  `fly_mode` int DEFAULT NULL COMMENT '飞行模式（1超视距飞行、2视距内飞行）',
  `task_type` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务性质（违法建设检查、海事巡查、汛期地质灾害抢险排查飞行、训练飞行）等',
  `plan_flytime_start` datetime DEFAULT NULL COMMENT '预计飞行开始时间',
  `plan_flytime_end` datetime DEFAULT NULL COMMENT '预计飞行结束时间',
  `max_fly_height` decimal(10,2) DEFAULT NULL COMMENT '最大飞行高度(米）',
  `contact_info` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '通信联络方式',
  `land` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '起降备降场地',
  `emergency` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应急处置程序',
  `support` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '特殊飞行保障需求',
  `monitor` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '导航和被监视能力',
  `method` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行速度和进出空域方法',
  `radio` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '指挥控制链路无线电频率以及占用带宽',
  `radar` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '二次雷达应答机或有关自动监视设备代码',
  `apply_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '其他必要信息',
  `other_relate_info` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '涉及其他活动',
  `file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '活动批准文件',
  `status` int DEFAULT NULL COMMENT '飞行活动状态：0.待申请； 1.待审批； 2.已通过； 3.已拒绝； 4. 被驳回；5失效；',
  `aircraft_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '航空器id',
  `operator_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '操控员id',
  `airspace_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行空域名称',
  `airspace_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '飞行空域信息。geoJson格式',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '0 未删除  1 删除',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_flight_code` (`flight_code`),
  KEY `idx_plan_flytime_start` (`plan_flytime_start`),
  KEY `idx_plan_flytime_end` (`plan_flytime_end`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='飞行活动表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_activity_task`
--

DROP TABLE IF EXISTS `flight_activity_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_activity_task` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `flight_code` bigint NOT NULL COMMENT '关联飞行活动',
  `task_node_status` int DEFAULT NULL COMMENT '任务节点状态  0.待申请； 1.待审批； 2.已通过； 3.已拒绝； 4. 被驳回；5失效',
  `op_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '审批人Id',
  `comment` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '评论',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_flight_code` (`flight_code`)
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='审批任务记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gateway_request_log`
--

DROP TABLE IF EXISTS `gateway_request_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gateway_request_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求ip地址',
  `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法',
  `service_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微服务名称',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求路径',
  `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户客户端agent',
  `request_time` datetime(6) DEFAULT NULL COMMENT '请求时间',
  `response_time` datetime(6) DEFAULT NULL COMMENT '响应时间',
  `cost_time` int DEFAULT NULL COMMENT '执行消耗时间',
  `http_status` int DEFAULT NULL COMMENT '请求状态',
  `is_success` bit(1) DEFAULT b'1' COMMENT '业务是否请求成功',
  `platform_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台类型',
  `create_at` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '入库时间',
  `code` int DEFAULT NULL COMMENT '业务响应码',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_request_time` (`request_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='请求日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_info`
--

DROP TABLE IF EXISTS `gis_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) NOT NULL COMMENT '原始名称',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除，0：未删除，1：已删除',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路径',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名称',
  `xmin` decimal(12,6) DEFAULT NULL COMMENT '范围：最小经度',
  `xmax` decimal(12,6) DEFAULT NULL COMMENT '范围：最大经度',
  `ymin` decimal(12,6) DEFAULT NULL COMMENT '范围：最小纬度',
  `ymax` decimal(12,6) DEFAULT NULL COMMENT '范围：最大纬度',
  `file_id` varchar(255) DEFAULT NULL COMMENT '文件Id',
  `company_id` varchar(20) DEFAULT NULL COMMENT '公司id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(20) DEFAULT NULL COMMENT '修改人',
  `data_type` tinyint(1) DEFAULT '0' COMMENT '数据类型(0:建图结果、1:三维模型、2:单体模型、3:点云数据、4:地形数据、5:地图数据）',
  `status` tinyint(1) DEFAULT '1' COMMENT '从图层列表中添加（0:添加，1：取消）',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名',
  `screen_space` int DEFAULT '16' COMMENT '显示精度',
  `height` decimal(10,2) DEFAULT '0.00' COMMENT '相对于模型本身高度的偏移值(米)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='地图数据管理列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_airspace_config`
--

DROP TABLE IF EXISTS `ky_airspace_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_airspace_config` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域编号',
  `area_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '空域名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '空域范围（geojson）',
  `area_type` int NOT NULL COMMENT '空域类型：10 .适飞区  20 管制区  30 临时空域',
  `area_sub_category` int NOT NULL COMMENT '制区分类，针对管制区，21：管制区1， 22：管制区2,... 11:适飞区， 31.临时空域',
  `lower_height` decimal(9,3) DEFAULT NULL COMMENT '空域底部距离地面高度',
  `upper_height` decimal(9,3) DEFAULT NULL COMMENT '空域顶部距离地面高度',
  `create_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人ID',
  `shape_type` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域形状。“Point”、“MultiPoint”、“LineString”、“MultiLineString”、“Polygon”、“MultiPolygon”、“GeometryCollection”',
  `start_time` datetime DEFAULT NULL COMMENT '生效开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '生效截至时间',
  `aircraft_models` int DEFAULT NULL COMMENT '适用飞行机型:1微型; 2轻型  4小型 8中型 16大型。多个机型求和',
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  `risk_level` int DEFAULT NULL COMMENT '风险等级。 10.低风险    20.中风险     30高风险。   NULL则代表未计算 0.无数据,不做评估',
  `min_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最小值',
  `max_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最大值',
  `min_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最小值',
  `max_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最大值',
  `status` int DEFAULT NULL COMMENT '发布状态。 0. 待审批 1.待发布  2.已发布',
  `publish_time` datetime DEFAULT NULL COMMENT '发布时间',
  `code_status` tinyint DEFAULT NULL COMMENT '同步打码状态 0.待打码  1.打码中  2. 打码成功  3.打码失败 ',
  `code_desc` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '打码失败描述',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联空域配置记录（修改前的记录）',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`),
  UNIQUE KEY `uniq_area_name` (`area_name`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_end_time` (`end_time`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='空域配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_airspace_config_his`
--

DROP TABLE IF EXISTS `ky_airspace_config_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_airspace_config_his` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域编号',
  `area_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '空域范围（geojson）',
  `area_type` int DEFAULT NULL COMMENT '空域类型：10 .适飞区  20 管制区  30 临时空域',
  `area_sub_category` int DEFAULT NULL COMMENT '制区分类，针对管制区，21：管制区1， 22：管制区2,... 11:适飞区， 31.临时空域',
  `lower_height` decimal(9,3) DEFAULT NULL COMMENT '空域底部距离地面高度',
  `upper_height` decimal(9,3) DEFAULT NULL COMMENT '空域顶部距离地面高度',
  `create_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人ID',
  `shape_type` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域形状。“Point”、“MultiPoint”、“LineString”、“MultiLineString”、“Polygon”、“MultiPolygon”、“GeometryCollection”',
  `start_time` datetime DEFAULT NULL COMMENT '生效开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '生效截至时间',
  `aircraft_models` int DEFAULT NULL COMMENT '适用飞行机型:1微型; 2轻型  4小型 8中型 16大型。多个机型求和',
  `capacity` int DEFAULT NULL COMMENT '空域容量',
  `risk_level` int DEFAULT NULL COMMENT '风险等级。 10.低风险    20.中风险     30高风险。   NULL则代表未计算 0.无数据,不做评估',
  `min_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最小值',
  `max_latitude84` decimal(10,7) DEFAULT NULL COMMENT '空域纬度最大值',
  `min_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最小值',
  `max_longitude84` decimal(10,7) DEFAULT NULL COMMENT '空域经度最大值',
  `real_start_time` datetime DEFAULT NULL COMMENT '实际生效开始时间',
  `real_end_time` datetime DEFAULT NULL COMMENT '实际生效结束时间',
  `status` int DEFAULT NULL COMMENT '发布状态。 0. 待审批 1.待发布  2.已发布',
  `publish_time` datetime DEFAULT NULL COMMENT '发布时间',
  `sync_status` int DEFAULT NULL COMMENT '同步状态。 0.未同步  1.已同步',
  `sync_time` datetime DEFAULT NULL COMMENT '同步时间',
  `validate` tinyint NOT NULL COMMENT '当前记录是否有效。 0, 无效 1.有效',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联空域配置记录（修改前的记录）',
  `ref_id` bigint DEFAULT NULL COMMENT '关联的空域记录id',
  `operate_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '操作类型. add:新建； update：修改',
  `delete_time` datetime DEFAULT NULL COMMENT '失效时间',
  `delete_type` tinyint DEFAULT NULL COMMENT '触发失效原因 1.删除   2.修改',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_area_name` (`area_name`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='空域配置历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_airspace_kpi`
--

DROP TABLE IF EXISTS `ky_airspace_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_airspace_kpi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域编号',
  `kpi_type` tinyint DEFAULT NULL COMMENT '指标类型。 11，人口密度 12,网络信号',
  `kpi_val` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '空域指标值,json存储',
  `status` tinyint DEFAULT NULL COMMENT '0. 待评估  1. 评估中 2.完成评估  3.评估失败  4.空域已删除,不做评估',
  `evaluation_time` datetime DEFAULT NULL COMMENT '最近1次评估时间',
  `tries` int DEFAULT NULL COMMENT '尝试次数',
  `expect_execute_time` datetime DEFAULT NULL COMMENT '期望下次评估时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`,`kpi_type`),
  KEY `idx_execute_time` (`expect_execute_time`)
) ENGINE=InnoDB AUTO_INCREMENT=235 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='空域指标表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_airspace_risk_level`
--

DROP TABLE IF EXISTS `ky_airspace_risk_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_airspace_risk_level` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '空域编号',
  `risk_level` int DEFAULT NULL COMMENT '风险等级。 10.低风险    20.中风险     30高风险。  40.无数据,无风险等级  NULL则代表未计算',
  `remark` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '风险备注',
  `status` tinyint DEFAULT NULL COMMENT '0. 待评估  1. 评估中 2.完成评估  3.评估失败  ',
  `evaluation_time` datetime DEFAULT NULL COMMENT '评估时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`),
  KEY `idx_update_at` (`update_at`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='空域风险等级';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_config_geonum_detail`
--

DROP TABLE IF EXISTS `ky_config_geonum_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_config_geonum_detail` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `area_category` tinyint DEFAULT NULL COMMENT '1.飞行活动空域; 2. 划设空域',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '飞行活动编号，空域编号',
  `area_type` int DEFAULT NULL COMMENT '空域类型：10 .适飞区  20 管制区  30 临时空域',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '空域信息,geoJSON格式',
  `geo_codes` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '网格对象列表，将区域栅格化为网格编码列表（包含geo_num4，geo_num10_16）',
  `start_time` datetime DEFAULT NULL COMMENT '生效开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '生效截至时间',
  `aircraft_models` int DEFAULT NULL COMMENT '适用飞行机型:1微型; 2轻型  4小型 8中型 16大型。多个机型求和',
  `lower_height` decimal(9,3) DEFAULT NULL COMMENT '空域底部距离地面高度',
  `upper_height` decimal(9,3) DEFAULT NULL COMMENT '空域顶部距离地面高度',
  `sync_status` tinyint DEFAULT NULL COMMENT '0. 待同步; 1.完成空域打码  2.完成网格码同步|完成删除 3.打码失败',
  `is_del` tinyint(1) DEFAULT NULL COMMENT '是否删除。 0.未删除  1.已删除',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_area_code` (`area_code`,`area_category`)
) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='空域任务表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_flight_act_geo_detail`
--

DROP TABLE IF EXISTS `ky_flight_act_geo_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_flight_act_geo_detail` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `flight_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '飞行活动编号',
  `stat_date` date DEFAULT NULL COMMENT '统计日期，活动跨日期情况，可产生多条记录',
  `pass_time` datetime DEFAULT NULL COMMENT '通过时间，同步比对使用',
  `geo_num4s` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '二维网格码列表，将区域栅格化为网格编码列表',
  `status` tinyint DEFAULT NULL COMMENT '状态。0.未生成分钟明细表；1.已生成分钟明细表  2.已生产冲突数据',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_flight_code` (`flight_code`,`stat_date`),
  KEY `idx_pass_time` (`pass_time`),
  KEY `idx_stat_date` (`stat_date`)
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='飞行活动区域网格明细';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ky_flight_conflict_area`
--

DROP TABLE IF EXISTS `ky_flight_conflict_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ky_flight_conflict_area` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `stat_date` date DEFAULT NULL COMMENT '统计日期',
  `area_type` int DEFAULT NULL COMMENT '空域类型：10 .适飞区  20 管制区  30 临时空域',
  `area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '空域编号',
  `flight_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '飞行活动编号',
  `caculate_time` datetime DEFAULT NULL COMMENT '记录产生时间，每天凌晨2点对前一天飞行活动进行分析',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_code` (`area_code`,`stat_date`,`area_type`,`flight_code`),
  KEY `idx_stat_date` (`stat_date`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='飞行活动冲突空域记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `manuf_detail`
--

DROP TABLE IF EXISTS `manuf_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `manuf_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `manf_id` bigint DEFAULT NULL COMMENT '生产厂商id',
  `type_id` int DEFAULT NULL COMMENT '生产厂商类型id',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名',
  `number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件号码',
  `pic_front` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件照(正面)',
  `pic_back` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件照(反面)',
  `company_num` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '统一社会信用代码',
  `area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '地区或省',
  `manuf_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '生产厂家名称',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='生产厂商详情表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `manufacturer`
--

DROP TABLE IF EXISTS `manufacturer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `manufacturer` (
  `id` bigint NOT NULL COMMENT '厂商id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '厂商昵称',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '厂商手机号',
  `avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像地址',
  `authentication_status` int NOT NULL COMMENT '认证状态，0： 未认证，1已认证',
  `authentication_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '认证名称',
  `authentication_time` datetime(6) DEFAULT NULL COMMENT '认证时间',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录密码',
  `password_modify_time` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '更新密码时间',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被禁用，0：否，1：禁用',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被删除，0：否，1：删除',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='生产商家表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `manufacturer_login_log`
--

DROP TABLE IF EXISTS `manufacturer_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `manufacturer_login_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `login_type` int DEFAULT NULL COMMENT '登录类型，0: 账号密码登录，1：手机号验证码登录',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆ip地址',
  `login_time` datetime(6) NOT NULL COMMENT '登陆时间',
  `login_success` bit(1) NOT NULL COMMENT '登录状态，0：失败，1：成功',
  `create_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_login_log_supervisor_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='厂商用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `owner`
--

DROP TABLE IF EXISTS `owner`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `owner` (
  `id` bigint NOT NULL COMMENT '使用者id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '使用者昵称',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '使用者手机号',
  `type` int NOT NULL COMMENT '使用者类型，0：个人，1：企业',
  `avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像地址',
  `authentication_status` int NOT NULL COMMENT '认证状态，0： 未认证，1已认证',
  `authentication_time` datetime(6) DEFAULT NULL COMMENT '认证时间',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被禁用，0：否，1：禁用',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被删除，0：否，1：删除',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='普通用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `owner_account`
--

DROP TABLE IF EXISTS `owner_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `owner_account` (
  `id` bigint NOT NULL COMMENT '账号id，一个用户可有多种登陆方式',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `user_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户密码',
  `password_modify_time` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '最后更新密码时间',
  `type` smallint DEFAULT NULL COMMENT '用户账号类型0:手机号密码登录',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除：0:正常，1:删除',
  `create_at` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '注册时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_account_user_account` (`user_account`) USING BTREE,
  KEY `idx_account_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='普通用户账号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `owner_detail`
--

DROP TABLE IF EXISTS `owner_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `owner_detail` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `owner_id` bigint NOT NULL COMMENT '使用者id',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
  `number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码',
  `fname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '法人姓名',
  `fnumber` varchar(128) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '法人证件号码',
  `pic_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件照(正面)',
  `pic_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件照(反面)',
  `start_at` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件起始日期',
  `end_at` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '证件结束日期',
  `license_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '营业执照',
  `company_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '企业名称',
  `company_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '统一社会信用代码',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  `type` int DEFAULT NULL COMMENT '使用者类型，0：个人，1：企业',
  `is_del` bit(1) DEFAULT b'0' COMMENT '用户是否被删除，0：否，1：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='普通用户认证表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `owner_flyer_info`
--

DROP TABLE IF EXISTS `owner_flyer_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `owner_flyer_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `flyer_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '执照编号',
  `flyer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名',
  `sign_date` datetime DEFAULT NULL COMMENT '签发日期',
  `expiration_date` datetime DEFAULT NULL COMMENT '失效日期',
  `certificate_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执照种类',
  `category_level` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '类别等级',
  `cert_level` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '级别等级',
  `sight_level` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '超视距等级',
  `teacher_level` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '教员等级',
  `audit_status` int DEFAULT '0' COMMENT '审批状态,0:待验证，1、已通过，2、未通过',
  `no_pass_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '不通过原因',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `certificate` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '证书附件',
  `telephone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '手机号',
  `owner_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '归属用户ID',
  `is_del` tinyint(1) DEFAULT NULL COMMENT '是否删除。 0.未删除 1.已删除',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者ID',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者ID',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='操控员信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `owner_login_log`
--

DROP TABLE IF EXISTS `owner_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `owner_login_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `login_type` int DEFAULT NULL COMMENT '登录类型，0: 账号密码登录，1：手机号验证码登录',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆ip地址',
  `login_time` datetime(6) NOT NULL COMMENT '登陆时间',
  `login_success` bit(1) NOT NULL COMMENT '登录状态，0：失败，1：成功',
  `create_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_login_log_supervisor_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='普通用户登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator`
--

DROP TABLE IF EXISTS `regulator`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator` (
  `id` bigint NOT NULL COMMENT '厂商id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '厂商昵称',
  `is_system_admin` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否是系统管理员',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '厂商手机号',
  `avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像地址',
  `authentication_status` int NOT NULL COMMENT '认证状态，0： 未认证，1已认证',
  `authentication_time` datetime(6) DEFAULT NULL COMMENT '认证时间',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录密码',
  `password_modify_time` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '更新密码时间',
  `is_frozen` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被禁用，0：否，1：禁用',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否被删除，0：否，1：删除',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='监管者表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_api`
--

DROP TABLE IF EXISTS `regulator_api`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_api` (
  `id` bigint NOT NULL COMMENT '主键id',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'api编码，以API_开头',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口名称',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口描述',
  `service_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务id',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口路径',
  `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法。POST,GET,DELETE 等',
  `is_open` bit(1) DEFAULT b'0' COMMENT '是否公开，0:内部接口，1:公开接口，可不做权限校验',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `create_at` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_resource_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管者接口表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_login_log`
--

DROP TABLE IF EXISTS `regulator_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_login_log` (
  `id` bigint NOT NULL COMMENT '主键id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `login_type` int DEFAULT NULL COMMENT '登录类型，0: 账号密码登录，1：手机号验证码登录',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆ip地址',
  `login_time` datetime(6) NOT NULL COMMENT '登陆时间',
  `login_success` bit(1) NOT NULL COMMENT '登录状态，0：失败，1：成功',
  `create_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_login_log_supervisor_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管员用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_resource`
--

DROP TABLE IF EXISTS `regulator_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_resource` (
  `id` bigint NOT NULL COMMENT '自增id',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源标识，菜单类型以 MENU_ 开头，按钮类型以 ACTION_ 开头，接口类型以 API_ 开头',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源名称',
  `icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源图标，针对菜单',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源描述',
  `type` smallint DEFAULT NULL COMMENT '资源类型，0:菜单，1:按钮',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源路径',
  `pid` bigint DEFAULT NULL COMMENT '菜单拥有上级菜单id，按钮的上级id表示菜单的按钮',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `order` int DEFAULT NULL COMMENT '展示顺序，值越小，越在前',
  `level` int DEFAULT '1' COMMENT '菜单层级',
  `create_at` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管者资源表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_resource_api_mapping`
--

DROP TABLE IF EXISTS `regulator_resource_api_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_resource_api_mapping` (
  `id` bigint NOT NULL COMMENT '主键id',
  `resource_id` bigint DEFAULT NULL COMMENT '资源id',
  `api_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口编码',
  `create_at` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_resouce_api_resouce_id` (`resource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='资源与接口的映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_role`
--

DROP TABLE IF EXISTS `regulator_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_role` (
  `id` bigint NOT NULL COMMENT '角色id',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色名称',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色标志符',
  `desc` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色描述',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否锁定,0:正常，1:锁定',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志：0:正常，1删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管者角色表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_role_mapping`
--

DROP TABLE IF EXISTS `regulator_role_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_role_mapping` (
  `id` bigint NOT NULL COMMENT '主键id',
  `regulator_id` bigint NOT NULL COMMENT '监管者id',
  `role_id` bigint NOT NULL COMMENT '角色id',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_regulator_role_regulator_id` (`regulator_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管者角色映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_role_resource_mapping`
--

DROP TABLE IF EXISTS `regulator_role_resource_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_role_resource_mapping` (
  `id` bigint NOT NULL COMMENT '主键id',
  `role_id` bigint NOT NULL COMMENT '角色id',
  `resource_id` bigint NOT NULL COMMENT '资源id',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_role_resouce_role_id` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='角色与资源的关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sync_mnf`
--

DROP TABLE IF EXISTS `sync_mnf`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sync_mnf` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `mnf_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '生产厂家',
  `number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '统一社会信用代码',
  `unit_code` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '统一社会信用代码(new)',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '删除标识  0: 未删除  1: 删除',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新用户id',
  `update_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2520 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='预置的无人机生产厂商表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sync_type`
--

DROP TABLE IF EXISTS `sync_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sync_type` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `mnf_id` int DEFAULT NULL COMMENT '生产厂商id',
  `product_model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品型号',
  `product_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品名称',
  `product_category` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品类别',
  `product_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品类型',
  `empty_weight` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '空机重量(kg)',
  `max_weight` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最大起飞重量(kg)',
  `usage` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '产品用途',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '0: 未删除 1: 已删除',
  `create_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建用户id',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6876 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='预置无人机厂商的无人机型号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_area_config`
--

DROP TABLE IF EXISTS `sys_area_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_area_config` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '标识唯一区域，街道以上区域采用addcode代替。（东莞精确到街道，此时采用上级addcode+街道名称拼音首字母）',
  `parent_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父节点code',
  `city_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '城市编码（每个城市不同）',
  `ad_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '街道没有独有的adcode，均继承父类（区县）的adcode',
  `level` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '区域类型。country:国家，province:省份；city:地市；district：区县 street:街道',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
  `longitude` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '中心坐标点经度',
  `latitude` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '中心坐标点维度',
  `source` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'gaodemap:高德地图；man:人工',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=148805 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='区域表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dictionary`
--

DROP TABLE IF EXISTS `sys_dictionary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dictionary` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `category` varchar(24) COLLATE utf8mb4_bin NOT NULL COMMENT '分类',
  `type_code` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '类型编号',
  `type_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '类型名称',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_category` (`category`,`type_code`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='词典配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_detail`
--

DROP TABLE IF EXISTS `uav_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `identity` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机唯一产品识别码',
  `verify_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '校验码',
  `code_type` int DEFAULT NULL COMMENT '识别码类型 0: 识别码  1: 序列号',
  `manuf_id` int DEFAULT NULL COMMENT '生产厂商id',
  `manuf` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '生产厂商',
  `product_model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品型号',
  `product_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品名称',
  `product_category` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品类别',
  `product_type` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品类型',
  `device_id` int DEFAULT NULL COMMENT '型号id',
  `usage` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '使用用途',
  `usage_other` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '其他使用用途',
  `registry_time` datetime DEFAULT NULL COMMENT '注册时间',
  `photo_front` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无人机正面照片',
  `photo_num` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备标识照片',
  `device_status` tinyint DEFAULT NULL COMMENT '设备状态(0: 未激活  1: 激活  2: 已注销  3: --)',
  `cert_status` int DEFAULT NULL COMMENT '证书状态0：在用，1：过期，2：吊销',
  `logout_date` datetime DEFAULT NULL COMMENT '注销时间',
  `logout_type` int DEFAULT NULL COMMENT '注销类别(0:所有权变更 1:报废/失事 2:出国 3:其他)',
  `logout_reason` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '注销原因',
  `logout_man` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '注销人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
  `create_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人姓名',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',
  `update_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人姓名',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除 0: 未删除 1: 删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='无人机注册表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `warn_handle`
--

DROP TABLE IF EXISTS `warn_handle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `warn_handle` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `warn_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警唯一标识',
  `handle_userId` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '处理人员id',
  `handle_time` datetime DEFAULT NULL COMMENT '处理时间',
  `handle_type` int DEFAULT NULL COMMENT '处置方式。 11. 迫降 12.返航    21 无线电干扰  22 导航诱骗',
  `handle_longitude84` double DEFAULT NULL COMMENT '处置时无人机经度(WGS-84)',
  `handle_latitude84` double DEFAULT NULL COMMENT '处置时无人机的纬度(WGS-84)',
  `handle_height` double DEFAULT NULL COMMENT '处置时无人机的高度',
  `handle_content` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '处理内容',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_warn_code` (`warn_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='告警处置记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `warn_item`
--

DROP TABLE IF EXISTS `warn_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `warn_item` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `warn_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警唯一标识',
  `uas_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机识别码（或探测目标id',
  `id_type` tinyint DEFAULT NULL COMMENT '无人机的id类型,1、三方平台 2、监管无人机 3、RemoteID  4.探测轨迹',
  `cooperate` tinyint NOT NULL COMMENT '是否为合作类 1.合作； 0.非合作',
  `provider_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备来源厂家编号',
  `device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '数据来源设备id（设备方定义id)',
  `device_type` int DEFAULT NULL COMMENT '来源设备类型(0、5G-A基站，（5ga） 1、雷达设备，(radar)2、频谱设备， (spec)3、光电设备，(oe)4、反制设备,（cm）5、诱骗设备，(dec)6、干扰设备，(ifr) 7、指挥车，(cv)8、察打一体， (isrs)999、其他设备(other))',
  `event` tinyint NOT NULL COMMENT '告警类型(1 偏航预警；2 闯入管制区；3 闯入临时空域；4.非合飞行）',
  `warn_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警特征值(uasId、event、refcode等产生）',
  `warning_content` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警信息,主要是存放各种告警说明',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint NOT NULL COMMENT '告警状态：0：告警中，1:告警结束',
  `longitude84` double DEFAULT NULL COMMENT '产生告警时经度(WGS-84)',
  `latitude84` double DEFAULT NULL COMMENT '产生告警时纬度(WGS-84)',
  `height` double DEFAULT NULL COMMENT '产生告警时高度',
  `altitude` double DEFAULT NULL COMMENT '拔高度，单位米',
  `speed` double DEFAULT NULL COMMENT '产生告警时的地速度',
  `end_type` tinyint DEFAULT NULL COMMENT '结束类型，0：自动结束，1：手动结束',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域编号； event为3时：飞行活动编号',
  `ref_area_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域名称.只存第一个空域名称',
  `uav_update_time` datetime DEFAULT NULL COMMENT '无人机信息更新时间(以下为告警最新对应无人机信息)',
  `uav_lng` double DEFAULT NULL COMMENT '最近1次告警时无人机经度',
  `uav_lat` double DEFAULT NULL COMMENT '最近1次告警时无人机纬度',
  `uav_height` double DEFAULT NULL COMMENT '最近1次告警时无人机高度',
  `uav_altitude` double DEFAULT NULL COMMENT '最近1次告警时无人机的拔高度，单位米',
  `uav_speed` double DEFAULT NULL COMMENT '最近1次告警时无人机地速度',
  `is_deal` tinyint DEFAULT NULL COMMENT '是否已经处置。 0.未处置 1.已处置',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_uas_id_event` (`uas_id`,`event`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_warn_key` (`warn_key`,`status`),
  KEY `idx_end_time` (`end_time`),
  KEY `idx_warn_code` (`warn_code`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2084416 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='告警记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `warn_item_his`
--

DROP TABLE IF EXISTS `warn_item_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `warn_item_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `warn_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警唯一标识',
  `uas_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机识别码（或探测目标id',
  `id_type` tinyint DEFAULT NULL COMMENT '无人机的id类型,1、三方平台 2、监管无人机 3、RemoteID  4.探测轨迹',
  `cooperate` tinyint NOT NULL COMMENT '是否为合作类 1.合作； 0.非合作',
  `provider_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备来源厂家编号',
  `device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '数据来源设备id（设备方定义id)',
  `device_type` int DEFAULT NULL COMMENT '来源设备类型(0、5G-A基站，（5ga） 1、雷达设备，(radar)2、频谱设备， (spec)3、光电设备，(oe)4、反制设备,（cm）5、诱骗设备，(dec)6、干扰设备，(ifr) 7、指挥车，(cv)8、察打一体， (isrs)999、其他设备(other))',
  `event` tinyint NOT NULL COMMENT '告警类型(1 偏航预警；2 闯入管制区；3 闯入临时空域；4.非合飞行）',
  `warn_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警特征值(uasId、event、refcode等产生）',
  `warning_content` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警信息,主要是存放各种告警说明',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint NOT NULL COMMENT '告警状态：0：告警中，1:告警结束',
  `longitude84` double DEFAULT NULL COMMENT '产生告警时经度(WGS-84)',
  `latitude84` double DEFAULT NULL COMMENT '产生告警时纬度(WGS-84)',
  `height` double DEFAULT NULL COMMENT '产生告警时高度',
  `altitude` double DEFAULT NULL COMMENT '拔高度，单位米',
  `speed` double DEFAULT NULL COMMENT '产生告警时的地速度',
  `end_type` tinyint DEFAULT NULL COMMENT '结束类型，0：自动结束，1：手动结束',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域编号； event为3时：飞行活动编号',
  `ref_area_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域名称.只存第一个空域名称',
  `uav_update_time` datetime DEFAULT NULL COMMENT '无人机信息更新时间(以下为告警最新对应无人机信息)',
  `uav_lng` double DEFAULT NULL COMMENT '最近1次告警时无人机经度',
  `uav_lat` double DEFAULT NULL COMMENT '最近1次告警时无人机纬度',
  `uav_height` double DEFAULT NULL COMMENT '最近1次告警时无人机高度',
  `uav_altitude` double DEFAULT NULL COMMENT '最近1次告警时无人机的拔高度，单位米',
  `uav_speed` double DEFAULT NULL COMMENT '最近1次告警时无人机地速度',
  `is_deal` tinyint DEFAULT NULL COMMENT '是否已经处置。 0.未处置 1.已处置',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_uas_id_event` (`uas_id`,`event`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_warn_key` (`warn_key`,`status`),
  KEY `idx_end_time` (`end_time`),
  KEY `idx_warn_code` (`warn_code`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2084411 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='告警历史记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weak_password`
--

DROP TABLE IF EXISTS `weak_password`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weak_password` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '弱密码',
  `encode_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密后的密码',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_weak_password_password` (`password`) USING BTREE,
  UNIQUE KEY `uniq_weak_password_encoder_passwprd` (`encode_password`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10618 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='弱密码表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_lifecycle'
--

--
-- Dumping routines for database 'uav_lifecycle'
--

--
-- Current Database: `uav_live`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_live` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_live`;

--
-- Dumping events for database 'uav_live'
--

--
-- Dumping routines for database 'uav_live'
--

--
-- Current Database: `uav_logger`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_logger` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_logger`;

--
-- Table structure for table `biz_log`
--

DROP TABLE IF EXISTS `biz_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `log_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日志产生时间',
  `app_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '系统名，微服务系统名。如 用户中心',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '厂商id',
  `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模块分类，如 "登录"',
  `sub_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模块小分类，如 "验证码登录"',
  `operate_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '动作事件。 如登录',
  `lang` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'zh_CN' COMMENT '语言,zh_CN:简体中文; en_US:英文;zh_TW:繁体中文',
  `operate_result` smallint DEFAULT NULL COMMENT '操作结果说明，0:操作成功，1:操作失败 2.未知',
  `operate_identity` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '动作事件关联信息。 如 用户id',
  `operate_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '动作事件相关数值。如 email',
  `operate_desc` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '操作相关其他参数。JSON对象存储，存储方式. {"变量名称":"变量的值"}',
  `operate_time` int DEFAULT NULL COMMENT '操作持续时间',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日志入库时间',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `operate_identiy` (`operate_identity`),
  KEY `log_time` (`log_time`),
  KEY `idx_company_id` (`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13696708 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_logger'
--

--
-- Dumping routines for database 'uav_logger'
--

--
-- Current Database: `uav_mcms`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_mcms` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_mcms`;

--
-- Table structure for table `biaoqian`
--

DROP TABLE IF EXISTS `biaoqian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biaoqian` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '标签id',
  `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '标签名称',
  `zhuangtai` smallint DEFAULT NULL COMMENT '1.发布2.未发布',
  `sort_number` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='标签表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lanmu`
--

DROP TABLE IF EXISTS `lanmu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `lanmu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '栏目id',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '栏目名',
  `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '栏目说明',
  `zhuangtai` smallint DEFAULT '1' COMMENT '1.发布2.未发布',
  `sort_number` int DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='蓝目标';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lanmu_wenzhang`
--

DROP TABLE IF EXISTS `lanmu_wenzhang`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `lanmu_wenzhang` (
  `id` int NOT NULL DEFAULT '0' COMMENT '主键id',
  `lanmuid` int DEFAULT NULL COMMENT '栏目id',
  `wenzhangid` int DEFAULT NULL COMMENT '文章id',
  `sort_number` int DEFAULT NULL COMMENT '排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='栏目文章映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mulu`
--

DROP TABLE IF EXISTS `mulu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mulu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '目录名',
  `pid` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '父id',
  `url` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_user`
--

DROP TABLE IF EXISTS `t_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `t_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `username` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '用户名',
  `password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '密码',
  `gmt_create` datetime DEFAULT NULL COMMENT '数据创建时间（必备字段）',
  `gmt_modified` datetime DEFAULT NULL COMMENT '数据更新时间（必备字段）',
  `role` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '权限角色：0：管理员  1：普通用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tupian`
--

DROP TABLE IF EXISTS `tupian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tupian` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `lanmuid` int DEFAULT NULL COMMENT '栏目id',
  `wenzhangid` int DEFAULT NULL COMMENT '文章id',
  `resourceType` int DEFAULT '1' COMMENT '资源类型',
  `url` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '图片地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=359 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='图片文章映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `wenzhang`
--

DROP TABLE IF EXISTS `wenzhang`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `wenzhang` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `biaoti` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '文章名',
  `neirong` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci COMMENT '文章内容',
  `zhuangtai` smallint DEFAULT '1' COMMENT '1.发布2.未发布',
  `zhonglei` smallint DEFAULT NULL COMMENT '1.普通文章2.banner3.底部4.二维码5合作伙伴',
  `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  `modifytime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `biaoqian` int DEFAULT NULL COMMENT '标签',
  `wenzhangid` int DEFAULT NULL COMMENT '用于banner关联文章（自关联查询）',
  `sort_number` int DEFAULT NULL COMMENT '排序',
  `culling` bit(1) DEFAULT b'0' COMMENT '是否是精选',
  `recommend` bit(1) DEFAULT b'0' COMMENT '是否推荐',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=434 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='文章表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_mcms'
--

--
-- Dumping routines for database 'uav_mcms'
--

--
-- Current Database: `uav_mission`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_mission` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_mission`;

--
-- Table structure for table `ai_pic_detect_info`
--

DROP TABLE IF EXISTS `ai_pic_detect_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_pic_detect_info` (
  `pic_id` bigint unsigned NOT NULL COMMENT '主键id,=picture_general.id',
  `mission_id` bigint DEFAULT NULL COMMENT '作业id',
  `have_object` varchar(1) DEFAULT NULL COMMENT '是否有缺陷',
  `status` varchar(10) DEFAULT NULL COMMENT '调用状态',
  `objects` text COMMENT '缺陷识别结果列表',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否被删除',
  PRIMARY KEY (`pic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI缺陷详细信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_pic_info`
--

DROP TABLE IF EXISTS `ai_pic_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_pic_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `mission_id` bigint NOT NULL COMMENT '作业id',
  `type` int DEFAULT NULL COMMENT '图片来源类型',
  `project_id` varchar(50) DEFAULT NULL COMMENT '素材仓库的projectId',
  `object_size` decimal(10,2) DEFAULT NULL COMMENT '文件对象大小',
  `object_id` varchar(50) DEFAULT NULL COMMENT '素材仓库object id',
  `object_name` varchar(255) DEFAULT NULL COMMENT '素材仓库的objectName',
  `object_path` varchar(255) DEFAULT NULL COMMENT '上传到素材仓库返回的ObjectPath',
  `lat` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `lon` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `person_num` int NOT NULL DEFAULT '0' COMMENT 'AI检测人群数量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6181 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI图片信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_line_info_seal`
--

DROP TABLE IF EXISTS `air_line_info_seal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_line_info_seal` (
  `id` bigint NOT NULL,
  `line_name` varchar(255) NOT NULL COMMENT '航线模板名称',
  `air_line_id` bigint NOT NULL COMMENT '航线模板id(用于溯源)',
  `source_type` int unsigned DEFAULT NULL COMMENT '航线来源',
  `shape_type` int DEFAULT NULL COMMENT '航线形态类型',
  `completion_action` varchar(1024) DEFAULT NULL COMMENT '航线完成动作',
  `remarks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `org_id` int DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `air_zone_id` varchar(128) DEFAULT NULL,
  `air_zone` varchar(40) DEFAULT NULL COMMENT '飞行区域',
  `air_zone_lat` decimal(20,7) DEFAULT NULL COMMENT '区域中心点纬度',
  `air_zone_lng` decimal(20,7) DEFAULT NULL COMMENT '区域中心点经度',
  `air_space_id` bigint DEFAULT NULL COMMENT '空域ID',
  `air_space` varchar(40) DEFAULT NULL COMMENT '飞行空域',
  `flyer_name` varchar(20) DEFAULT NULL COMMENT '飞手姓名',
  `flyer_op_time` datetime DEFAULT NULL COMMENT '飞手飞行时间',
  `fly_uav_type` varchar(128) DEFAULT NULL COMMENT '飞手飞行器类型',
  `length` decimal(10,2) DEFAULT NULL COMMENT '路径长度',
  `height_type` int DEFAULT NULL COMMENT '高度类型',
  `height` decimal(3,0) DEFAULT NULL COMMENT '飞行高度',
  `cruising_speed` decimal(3,1) DEFAULT NULL COMMENT '巡航速度',
  `planned_fly_duration` decimal(10,2) DEFAULT NULL COMMENT '预计飞行时间',
  `point_num` int DEFAULT NULL COMMENT '航点数',
  `point_basic_info_mode` int DEFAULT NULL COMMENT '航线基础信息模式',
  `origin_coordinate_type` int DEFAULT NULL COMMENT '原始坐标类型',
  `area` decimal(10,2) DEFAULT NULL COMMENT '区域面积',
  `hangar_model_id` varchar(50) DEFAULT NULL COMMENT '机库机型号ID',
  `hangar_model` varchar(50) DEFAULT NULL COMMENT '机库型号',
  `dev_category` int DEFAULT NULL COMMENT '设备种类',
  `uav_model_id` varchar(50) DEFAULT NULL COMMENT '无人机型号ID',
  `uav_model` varchar(100) DEFAULT NULL COMMENT '无人机型号',
  `load_models` text COMMENT '载荷型号列表',
  `step` int NOT NULL COMMENT '航线创建步数',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `import_time` datetime DEFAULT NULL COMMENT '为KML导入时记录导入的时间',
  `import_user_id` bigint DEFAULT NULL COMMENT '为KML导入时记录导入userId',
  `import_user_name` varchar(255) DEFAULT NULL COMMENT '为KML导入时记录导入者姓名',
  `line_properties` text COMMENT '系统航线的航距设置、航线角度、最大坡度角等属性',
  `strap_buffer` text COMMENT '带状区域底图',
  `area_array` text COMMENT '当为区域航线时区域的坐标',
  `conn_lost_plan` int DEFAULT '3' COMMENT '断网措施 1: 返航，2:悬停，3：完成剩余航线',
  `reset_camera` int DEFAULT '0' COMMENT '每次航点复位云台， 0 不复位，1 复位',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航线规划基本信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_point_info_seal`
--

DROP TABLE IF EXISTS `air_point_info_seal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_point_info_seal` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sort_number` int DEFAULT NULL COMMENT '航点飞行顺序',
  `air_point_type` int DEFAULT NULL COMMENT '航点类型:1起飞点,2飞行点,3.降落点(终点)',
  `height` decimal(5,1) DEFAULT NULL COMMENT '高度',
  `speed` decimal(3,1) DEFAULT NULL COMMENT '速度',
  `point_image` varchar(255) DEFAULT NULL COMMENT '航点图片',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `air_point_id` bigint DEFAULT NULL COMMENT '关联的航点模板id(用于溯源)',
  `air_line_case_id` bigint DEFAULT NULL COMMENT '航线实例id',
  `air_line_id` bigint DEFAULT NULL COMMENT '关联的航线模板id(用于溯源)',
  `action_list` text COMMENT '航点动作列表',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3066170618 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `alert_event`
--

DROP TABLE IF EXISTS `alert_event`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `alert_event` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `source_type` int NOT NULL COMMENT '告警来源 ai识别告警10；烟雾告警 (属于ai)11；火情识别告警 (属于ai)12；第三方问题上报50',
  `dealt` tinyint NOT NULL DEFAULT '0' COMMENT '是否处理0 否，1 是',
  `dealt_opinion` varchar(255) DEFAULT NULL COMMENT '处理意见',
  `latitude84` double NOT NULL COMMENT '告警经纬度',
  `longitude84` double NOT NULL COMMENT '告警经纬度',
  `latitude02` double NOT NULL COMMENT '告警经纬度',
  `longitude02` double NOT NULL COMMENT '告警经纬度',
  `altitude` float NOT NULL COMMENT '告警经纬度',
  `address` varchar(255) DEFAULT NULL COMMENT '地址',
  `pic_object_id` varchar(255) DEFAULT NULL COMMENT '素材仓库图片object id',
  `mission_id` bigint DEFAULT NULL COMMENT '正在执行告警的作业id',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `deleted` tinyint DEFAULT '0' COMMENT '删除',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `alert_desc` varchar(255) DEFAULT NULL COMMENT '告警表述',
  `aim_latitude84` double DEFAULT NULL COMMENT '出警目标点坐标',
  `aim_longitude84` double DEFAULT NULL COMMENT '出警目标点坐标',
  `aim_latitude02` double DEFAULT NULL COMMENT '出警目标点坐标',
  `aim_longitude02` double DEFAULT NULL COMMENT '出警目标点坐标',
  `aim_altitude` float DEFAULT NULL COMMENT '出警目标点坐标',
  `uav_code` varchar(20) DEFAULT NULL COMMENT '出警无人机',
  `dealt_date` datetime DEFAULT NULL COMMENT '告警处理时间，处理后更新',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_alert_event_id_uindex` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3633 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应急保障的告警事件';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `calendar`
--

DROP TABLE IF EXISTS `calendar`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `calendar` (
  `datelist` date NOT NULL,
  PRIMARY KEY (`datelist`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `demonstrate_plan`
--

DROP TABLE IF EXISTS `demonstrate_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `demonstrate_plan` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `plan_name` varchar(255) DEFAULT NULL COMMENT '方案名称',
  `uas_id` varchar(255) NOT NULL COMMENT '无人机id',
  `hangar_id` varchar(255) DEFAULT NULL COMMENT '机库id',
  `line_id` bigint NOT NULL COMMENT '航线id，必须',
  `plan_type` tinyint DEFAULT '1' COMMENT '用户演示方案 1， 预设场景方案2',
  `preset_name` varchar(255) DEFAULT NULL COMMENT '如果是预设方案，预设方案的名称',
  `preset_code` varchar(255) DEFAULT NULL COMMENT '如果是预设方案，编号，写死',
  `preset_id` bigint DEFAULT NULL COMMENT '如果是预设方案新建的演示，需要设置该字段',
  `uav_video_id` bigint DEFAULT NULL COMMENT '推流视频表id',
  `hangar_video_id` varchar(255) DEFAULT NULL COMMENT '机库视频多路视频使用列表存(素材仓库id)',
  `repeat_mode` varchar(255) DEFAULT NULL COMMENT '循环模式：周一到周五：一，二，三，四，五',
  `activated` tinyint(1) DEFAULT '0' COMMENT '是否激活',
  `running_m_id` bigint DEFAULT NULL COMMENT '正在执行的作业id',
  `xxljob_id` int DEFAULT NULL COMMENT '定时xxljob任务id',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `user_id` int DEFAULT NULL COMMENT '方案制定者id',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` tinyint DEFAULT '0' COMMENT '是否删除',
  `loop_times` int DEFAULT '1' COMMENT '循环次数，默认1',
  `loop_left` int DEFAULT '0' COMMENT '剩余循环次数，初始化使用loop_times',
  `start_time` datetime DEFAULT NULL COMMENT '定时开始时间，null：不定时',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_demonstrate_plan_id_uindex` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='演示方案';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `demonstration_video`
--

DROP TABLE IF EXISTS `demonstration_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `demonstration_video` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `file_name` varchar(255) NOT NULL COMMENT '视频文件名称',
  `object_id` varchar(255) NOT NULL COMMENT '素材仓库的id',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` tinyint DEFAULT '0' COMMENT '是否删除',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_demonstration_video_id_uindex` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='演示视频';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_record`
--

DROP TABLE IF EXISTS `flight_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `uas_id` varchar(254) NOT NULL COMMENT '无人机id',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `fly_duration` bigint DEFAULT '0' COMMENT '飞行时长(单位s)',
  `fly_distance` bigint DEFAULT '0' COMMENT '飞行距离(单位m)',
  `track_order_id` varchar(254) DEFAULT NULL COMMENT '轨迹id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=62939 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机飞行轨迹记录项';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fly_duration`
--

DROP TABLE IF EXISTS `fly_duration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fly_duration` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `cid` int NOT NULL COMMENT 'companyId',
  `duration` bigint NOT NULL COMMENT '飞行时长 单位min',
  `cal_date` date NOT NULL COMMENT '统计时间 yyyy-mm-dd',
  `create_time` datetime DEFAULT NULL COMMENT '写入时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_cid` (`cid`) USING BTREE COMMENT 'companyId作为索引'
) ENGINE=InnoDB AUTO_INCREMENT=11715 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='飞行时长记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fly_log`
--

DROP TABLE IF EXISTS `fly_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fly_log` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `online_time` datetime DEFAULT NULL COMMENT '上线时间',
  `uav_code` varchar(255) DEFAULT NULL COMMENT '飞机uavCode',
  `fly_area` varchar(255) DEFAULT NULL COMMENT '飞行区域',
  `mission_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
  `cid` bigint DEFAULT NULL COMMENT 'companyId',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_uav_cid` (`uav_code`,`cid`) USING BTREE COMMENT '同一架飞机只允许插入一次'
) ENGINE=InnoDB AUTO_INCREMENT=124488 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `foia_fly_history`
--

DROP TABLE IF EXISTS `foia_fly_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `foia_fly_history` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `mission_id` bigint NOT NULL COMMENT 'missionId',
  `start_dronebox_id` bigint NOT NULL COMMENT '起飞机场id',
  `terminal_dronebox_id` bigint NOT NULL COMMENT '停机机场id',
  `uas_id` varchar(50) DEFAULT NULL COMMENT '飞机uasId',
  `drone_id` bigint NOT NULL COMMENT '飞机id',
  `route_id` bigint NOT NULL,
  `route_last_update_at` bigint DEFAULT NULL,
  `task_id` bigint DEFAULT NULL COMMENT '当为空时，代表一键起飞指令触发的',
  `user_id` bigint DEFAULT NULL COMMENT '当一键起飞时，触发用户的用户id',
  `task_start_at` bigint DEFAULT NULL,
  `task_end_at` bigint DEFAULT NULL,
  `fly_start_at` bigint DEFAULT NULL,
  `fly_end_at` bigint DEFAULT NULL,
  `fly_meters` bigint DEFAULT NULL,
  `max_distance_meters` bigint DEFAULT NULL,
  `min_altitude_meters` bigint DEFAULT NULL,
  `take_photo_count` bigint DEFAULT NULL,
  `take_video_seconds` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=448 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `foia_pic_info`
--

DROP TABLE IF EXISTS `foia_pic_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `foia_pic_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `fly_history_id` bigint NOT NULL COMMENT 'flyHistoryId',
  `mission_id` bigint DEFAULT NULL COMMENT '作业id',
  `file_type` varchar(20) NOT NULL COMMENT '图片类型',
  `file_name` varchar(255) NOT NULL COMMENT '图片名称  航点编号_动作序号_unix时间戳_图片类型.jpg',
  `file_url` varchar(1000) DEFAULT NULL COMMENT '图片存储地址',
  `seq` int DEFAULT NULL COMMENT '航点动作序号',
  `group_index` bigint DEFAULT NULL COMMENT 'DJI组号',
  `collection_point` varchar(255) DEFAULT NULL COMMENT '采集点',
  `temperature_threshold` float DEFAULT NULL COMMENT '温度阈值',
  `way_point_num` int NOT NULL COMMENT '航点编号',
  `action_num` int NOT NULL COMMENT '动作编号',
  `take_timestamp` bigint DEFAULT NULL COMMENT '拍照时的时间戳',
  `max_temperature` float DEFAULT NULL COMMENT '图片最高温度',
  `min_temperature` float DEFAULT NULL COMMENT '图片最低温度',
  `max_temperature_point_x` float DEFAULT NULL COMMENT '图片最高温度横坐标',
  `max_temperature_point_y` float DEFAULT NULL COMMENT '图片最高温度纵坐标',
  `min_temperature_point_x` float DEFAULT NULL COMMENT '图片最低温度横坐标',
  `min_temperature_point_y` float DEFAULT NULL COMMENT '图片最低温度纵坐标',
  `real_lat` double DEFAULT NULL COMMENT '拍摄时纬度',
  `real_lng` double DEFAULT NULL COMMENT '拍摄时经度',
  `real_alt` float DEFAULT NULL COMMENT '拍摄时高度',
  `mount_pitch` float DEFAULT NULL COMMENT '拍摄时云台垂直角',
  `mount_yaw` float DEFAULT NULL COMMENT '拍摄时云台水平角',
  `mount_focal` int(10) unsigned zerofill DEFAULT NULL COMMENT '拍摄时相机放大倍数',
  `create_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '写入时间',
  `project_id` varchar(50) DEFAULT NULL COMMENT '素材仓库的projectId',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '上传到素材仓库返回的bucketName',
  `object_path` varchar(255) DEFAULT NULL COMMENT '上传到素材仓库返回的ObjectPath',
  `object_name` varchar(255) DEFAULT NULL COMMENT '素材仓库的objectName',
  `object_id` varchar(50) DEFAULT NULL COMMENT '素材仓库object id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21385 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `keyboard_bindings`
--

DROP TABLE IF EXISTS `keyboard_bindings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `keyboard_bindings` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `org_id` int NOT NULL COMMENT '公司id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `data_value` text NOT NULL COMMENT '用户设置值',
  `data_key` varchar(255) NOT NULL COMMENT '用户设置项名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='单机监视用户云台键盘快捷键操作';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `megaphone_records_info`
--

DROP TABLE IF EXISTS `megaphone_records_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `megaphone_records_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `company_id` int NOT NULL COMMENT '公司id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `record_name` varchar(40) NOT NULL COMMENT '录音名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `record_duration` bigint NOT NULL COMMENT '录音时长，单位s',
  `minio_address` varchar(1000) DEFAULT NULL COMMENT '图片存储地址',
  `object_id` varchar(255) DEFAULT NULL COMMENT '素材仓库对象id',
  `project_id` varchar(255) DEFAULT NULL COMMENT '素材仓库项目id',
  `minio_bucket_name` varchar(255) DEFAULT NULL COMMENT 'minio桶名',
  `minio_object_name` varchar(255) DEFAULT NULL COMMENT 'minio对象地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1791390004249202690 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='喊话器录音记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mission_info`
--

DROP TABLE IF EXISTS `mission_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mission_info` (
  `id` bigint NOT NULL COMMENT 'id',
  `mission_name` varchar(310) NOT NULL COMMENT '作业名称',
  `mission_model` int DEFAULT NULL COMMENT '作业模式',
  `mission_state` int DEFAULT NULL COMMENT '作业状态',
  `approval_state` int DEFAULT NULL COMMENT '审批状态',
  `approval_inst_id` varchar(255) DEFAULT NULL COMMENT '审批实例ID',
  `mission_executor_id` int DEFAULT NULL COMMENT '执行人id',
  `mission_executor` varchar(50) DEFAULT NULL COMMENT '执行人',
  `estimated_start_time` datetime DEFAULT NULL COMMENT '预计开始时间',
  `estimated_end_time` datetime DEFAULT NULL COMMENT '预计结束时间',
  `actual_start_time` datetime DEFAULT NULL COMMENT '实际开始时间',
  `actual_end_time` datetime DEFAULT NULL COMMENT '实际结束时间',
  `mission_remarks` varchar(2010) DEFAULT NULL COMMENT '备注',
  `line_case_id` bigint DEFAULT NULL COMMENT '航线实例id',
  `line_name` varchar(255) DEFAULT NULL COMMENT '航线模板名称',
  `dev_category` int DEFAULT NULL COMMENT '设备类型',
  `hangar_case_code` varchar(20) DEFAULT NULL COMMENT '机库实例编码',
  `hangar_case` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机库实例信息',
  `uav_case_code` varchar(20) DEFAULT NULL COMMENT '无人机实例编码',
  `uav_case` varchar(500) DEFAULT NULL COMMENT '无人机实例信息',
  `load_cases` mediumtext COMMENT '载荷实例列表',
  `air_space_id` bigint DEFAULT NULL COMMENT '飞行空域id',
  `air_space` varchar(40) DEFAULT NULL COMMENT '飞行空域',
  `switch_point` varchar(500) DEFAULT NULL COMMENT '切换模式时的坐标点',
  `switch_mode` int DEFAULT NULL COMMENT '切换模式',
  `switch_log` mediumtext COMMENT '切换历史，记录每一次切换的时间、地点、状态等',
  `ai_info` varchar(255) DEFAULT NULL COMMENT 'AI处理相关信息',
  `site_conditions` varchar(310) DEFAULT NULL COMMENT '现场情况描述',
  `org_id` bigint DEFAULT NULL COMMENT '公司id',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人id',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `type` int DEFAULT NULL COMMENT '作业类型',
  `condition` mediumtext COMMENT '作业执行条件',
  `url` varchar(500) DEFAULT NULL COMMENT 'URL模板',
  `project_id` varchar(40) DEFAULT NULL COMMENT '素材仓库项目id',
  `task_type` varchar(30) DEFAULT NULL COMMENT '所属任务类型',
  `task_name` varchar(30) DEFAULT NULL COMMENT '所属任务名称',
  `light_flag` tinyint(1) DEFAULT '0' COMMENT '置顶标记,点亮的作业会在大屏中置顶显示',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mission_notice_users`
--

DROP TABLE IF EXISTS `mission_notice_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mission_notice_users` (
  `id` bigint NOT NULL COMMENT '主键 就是作业id',
  `ai_event_notice_users_sms` varchar(255) DEFAULT NULL COMMENT '短信通知ai 事件 用户',
  `auto_send_report_sms` tinyint(1) DEFAULT '0' COMMENT '自动发送作业报告 false 否； true 是',
  `report_notice_users_sms` varchar(255) DEFAULT NULL COMMENT '短信通知作业报告用户',
  `deleted` int DEFAULT NULL COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='作业关联的被通知用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `num`
--

DROP TABLE IF EXISTS `num`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `num` (
  `i` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `patrol_line`
--

DROP TABLE IF EXISTS `patrol_line`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `patrol_line` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `air_line_id` bigint NOT NULL COMMENT '航线管理的id',
  `air_line_name` varchar(254) DEFAULT NULL COMMENT '航线名称',
  `mission_count` int DEFAULT '0' COMMENT '累计所有使用该巡检航线的作业数量（从该航线添加到了该表算起）',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `deleted` tinyint DEFAULT '0' COMMENT '删除',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检航线信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `picture_general`
--

DROP TABLE IF EXISTS `picture_general`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `picture_general` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `mission_id` bigint DEFAULT NULL COMMENT '作业id',
  `uas_id` varchar(20) DEFAULT NULL COMMENT '无人机id',
  `file_type` varchar(20) NOT NULL COMMENT '图片类型',
  `file_name` varchar(255) NOT NULL COMMENT '图片名称  航点编号_动作序号_unix时间戳_图片类型.jpg',
  `way_point_num` int DEFAULT NULL COMMENT '航点编号',
  `action_num` int DEFAULT NULL COMMENT '动作编号',
  `take_timestamp` bigint DEFAULT NULL COMMENT '拍照时的时间戳',
  `latitude84` double DEFAULT NULL COMMENT '拍摄时纬度84',
  `longitude84` double DEFAULT NULL COMMENT '拍摄时经度84',
  `latitude02` double DEFAULT NULL COMMENT '拍摄时纬度02',
  `longitude02` double DEFAULT NULL COMMENT '拍摄时经度02',
  `altitude` float DEFAULT NULL COMMENT '拍摄时高度',
  `mount_pitch` float DEFAULT NULL COMMENT '拍摄时云台垂直角',
  `mount_yaw` float DEFAULT NULL COMMENT '拍摄时云台水平角',
  `mount_focal` int(10) unsigned zerofill DEFAULT NULL COMMENT '拍摄时相机放大倍数',
  `object_id` varchar(50) DEFAULT NULL COMMENT '素材仓库的文件id',
  `label_related` tinyint(1) DEFAULT '0' COMMENT '是否有环保问题信息',
  `temp_related` tinyint(1) DEFAULT '0' COMMENT '是否有测温信息',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否被删除',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '写入时间',
  `address` varchar(254) DEFAULT NULL COMMENT '经纬度对应的地址',
  `company_id` int NOT NULL COMMENT '公司id',
  `media_type` varchar(20) DEFAULT NULL COMMENT '媒体类型 null = picture， picture|video',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=117253 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='照片基础信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `picture_label`
--

DROP TABLE IF EXISTS `picture_label`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `picture_label` (
  `pic_id` bigint unsigned NOT NULL COMMENT '主键id,自增',
  `env_labels` varchar(50) DEFAULT '' COMMENT '环保问题标签',
  `env_label_other` varchar(30) DEFAULT NULL COMMENT '环保其他问题标签内容',
  `env_describe` varchar(100) DEFAULT NULL COMMENT '环保问题描述',
  `gas_labels` varchar(50) DEFAULT '' COMMENT '气体分类标签，业务上与环保问题标签互斥',
  `label_sort` tinyint DEFAULT '1' COMMENT '照片标记分类 1 问题，2 气体',
  PRIMARY KEY (`pic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='照片问题标签表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `story_info`
--

DROP TABLE IF EXISTS `story_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `story_info` (
  `id` bigint NOT NULL COMMENT '故事ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '故事名称',
  `state` int DEFAULT NULL COMMENT '故事状态（0:ready,1:running,2:suspend,3:stop）',
  `remarks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '故事备注',
  `type` int DEFAULT NULL COMMENT '故事类型',
  `org_id` bigint DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建者名称',
  `create_id` bigint DEFAULT NULL COMMENT '创建者ID',
  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改者名称',
  `modify_id` bigint DEFAULT NULL COMMENT '修改者ID',
  `modify_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `deleted` int DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='故事信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `story_object_info`
--

DROP TABLE IF EXISTS `story_object_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `story_object_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '故事对象ID',
  `uav_case_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '无人机编码',
  `uav_type` int DEFAULT NULL COMMENT '无人机类型(0:真机,1:模拟机)',
  `seq_num` int DEFAULT NULL COMMENT '对象顺序号',
  `line_case_id` bigint DEFAULT NULL COMMENT '航线实例ID',
  `line_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '航线名称',
  `line_track_id` bigint DEFAULT NULL COMMENT '航迹实例ID',
  `track_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '航迹名称',
  `project_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的projectId',
  `bucket_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的bucketName',
  `object_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的objectName',
  `object_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的objectPath',
  `object_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '素材仓库的视频ID',
  `story_id` bigint DEFAULT NULL COMMENT '关联的故事ID',
  `ai_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'AI处理相关信息',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建者名称',
  `create_id` bigint DEFAULT NULL COMMENT '创建者ID',
  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `modify_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改者名称',
  `modify_id` bigint DEFAULT NULL COMMENT '修改者ID',
  `modify_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `deleted` int DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=272 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='故事对象信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_mission'
--

--
-- Dumping routines for database 'uav_mission'
--

--
-- Current Database: `uav_multi_link`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_multi_link` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_multi_link`;

--
-- Table structure for table `multi_link_switch_param`
--

DROP TABLE IF EXISTS `multi_link_switch_param`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `multi_link_switch_param` (
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编码',
  `switch_mode` int NOT NULL DEFAULT '0' COMMENT '切换模式 0自动 1手动锁定 2手动切换一次',
  `switch_to_link` int DEFAULT '0' COMMENT '切换至链路 0 5G链路 1 APP链路',
  `detect_period` int NOT NULL DEFAULT '1000' COMMENT '检测周期ms',
  `drop_threshold` int NOT NULL DEFAULT '20' COMMENT '丢包率门限%',
  `expect_hub_video_rate` int NOT NULL DEFAULT '4096' COMMENT '5G链路期望视频码率kbps',
  `expect_app_video_rate` int NOT NULL DEFAULT '2048' COMMENT 'app链路期望视频码率kbps',
  `auto_switch_back_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT '故障修复后是否自动切换 0 不自动切换 1 切换',
  `auto_switch_back_to_link` int NOT NULL DEFAULT '0' COMMENT '故障修复后自动切换回某链路  0 5G链路 1 APP链路',
  `upd_usr_id` varchar(20) NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`uav_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='多链路切换参数表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_multi_link'
--

--
-- Dumping routines for database 'uav_multi_link'
--

--
-- Current Database: `uav_notice`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_notice` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_notice`;

--
-- Table structure for table `admin_bulletin`
--

DROP TABLE IF EXISTS `admin_bulletin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_bulletin` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `channel` int NOT NULL COMMENT '发布渠道: 1.登录页;2.邮件 4. 短信',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公告名称',
  `type` int NOT NULL COMMENT '类型：1.版本发布  2.系统维护  3 通告',
  `show_time_start` datetime NOT NULL COMMENT '显示开始时间',
  `show_time_end` datetime DEFAULT NULL COMMENT '显示截至时间',
  `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公告内容',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `status` int NOT NULL COMMENT '状态 0.草稿 1. 上架   2.下架',
  `online_time` datetime DEFAULT NULL COMMENT '上线时间',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`id`),
  KEY `idx_startTime` (`show_time_start`),
  KEY `idx_endTime` (`show_time_end`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='公告消息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mail_provider_cfg`
--

DROP TABLE IF EXISTS `mail_provider_cfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mail_provider_cfg` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `provider_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息发送提供者代码',
  `provider_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息发送提供者名称',
  `mail_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件地址',
  `mail_from` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '来自',
  `mail_default_personal` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '默认用户',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件账号',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件密码',
  `mail_host` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件host',
  `mail_port` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件端口',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL,
  `create_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `provider_code` (`provider_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_log`
--

DROP TABLE IF EXISTS `msg_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `msg_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分配任务编号,唯一标识',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '任务创建时间',
  `msg_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息类型',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户ID',
  `app_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分配应用id',
  `tpl_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板代号',
  `tpl_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板名称',
  `tpl_title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板标题',
  `send_to` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发送地址',
  `param_map` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求参数',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '发送内容(sms:短信为预期内容;email:为实际内容不包含附件）',
  `start_tm` timestamp NULL DEFAULT NULL COMMENT '执行完成时时间',
  `spent` int DEFAULT NULL COMMENT '发送耗费时间ms',
  `provider_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息发送提供者代码',
  `msg_group` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息批次号，唯一编码，与前文响应中的msgGroup对应',
  `response_status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调结果,短信最终发送结果',
  `attach_num` int DEFAULT NULL COMMENT '附件数',
  `attach_size` bigint DEFAULT NULL COMMENT '附件大小（单位B）',
  `success` tinyint(1) DEFAULT NULL COMMENT '是否成功(1.成功  0.失败）',
  `wait_confirm` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1.等待确认； 0.无需确认',
  `retries` int DEFAULT NULL COMMENT '执行次数',
  `result_desc` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执行结果描述',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_create_time` (`create_time`),
  KEY `idx_tenant_id` (`tenant_id`),
  KEY `idx_msg_group` (`msg_group`)
) ENGINE=InnoDB AUTO_INCREMENT=80023 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_status_report`
--

DROP TABLE IF EXISTS `msg_status_report`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_status_report` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `msg_group` varchar(32) NOT NULL COMMENT '消息批次号，唯一编码，与前文响应中的msgGroup对应',
  `mobile` varchar(32) NOT NULL COMMENT '发送地址',
  `report_status` varchar(32) NOT NULL COMMENT '发送成功状态码：DELIVRD。',
  `success` tinyint NOT NULL COMMENT '是否成功(1.成功  0.失败）',
  `submit_date` datetime DEFAULT NULL COMMENT '提交时间，格式：yyyyMMddHHmmss。',
  `receive_date` datetime NOT NULL COMMENT '接收时间，格式同上。',
  `error_code` varchar(32) DEFAULT NULL COMMENT '发送失败的状态码，如DB:0140。',
  `source` varchar(6) NOT NULL COMMENT '报告来源(aliyun:阿里云,mas：mas平台)',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_msg_group` (`msg_group`),
  KEY `idx_mobile` (`mobile`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='消息发送状态报告';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_task`
--

DROP TABLE IF EXISTS `msg_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_task` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `msg_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分配任务编号,唯一标识',
  `msg_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板类型(sms：短信， email:邮件, websms:站内信）',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '任务创建时间',
  `msg_model` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '消息内容，消息模型序列号内容',
  `expect_start_tm` timestamp NULL DEFAULT NULL COMMENT '希望执行时间，调用程序设置，为空则立马执行。',
  `last_execute_tm` timestamp NULL DEFAULT NULL COMMENT '上次执行完成时时间',
  `spent` int DEFAULT NULL COMMENT '发送耗费时间ms',
  `expire_tm` timestamp NULL DEFAULT NULL COMMENT '超时时间，超过这个时间失败则不再重试',
  `success` tinyint DEFAULT '0' COMMENT '是否成功(1.成功  0.失败）',
  `in_queue` tinyint DEFAULT '0' COMMENT '是否放入任务队列（0.未。 1已放入）',
  `retries` int DEFAULT NULL COMMENT '发送次数',
  `result_desc` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执行结果描述',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `msg_code` (`msg_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1145 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_tpl`
--

DROP TABLE IF EXISTS `msg_tpl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_tpl` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tpl_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模板类型(sms：短信， email:邮件,webmsg:站内信）',
  `app_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用id',
  `tpl_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板代号',
  `tpl_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模板名称',
  `tpl_title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板标题',
  `tpl_content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '模板类内容',
  `provider_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息发送提供者代码',
  `provider_tpl_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '外部实际模板编号，若为空，则用tpl_code代替',
  `notice_type` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'sys' COMMENT '通知类型(sys：系统通知;biz：业务通知)',
  `emergency` tinyint DEFAULT '1' COMMENT '紧急消息(0.普通消息 1.紧急消息)',
  `status` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板状态(LOCK:锁定，NORMAL：正常)',
  `ext_prop` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储约束属性变量名',
  `identify_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份标识',
  `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板描述',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tpl_code` (`tpl_type`,`tpl_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2929 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_tpl_lang`
--

DROP TABLE IF EXISTS `msg_tpl_lang`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_tpl_lang` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tpl_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模板类型(sms：短信， email:邮件,webmsg:站内信）',
  `tpl_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板代号',
  `lang` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '语言标识',
  `tpl_title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板标题',
  `tpl_content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '模板类内容',
  `provider_tpl_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '外部实际模板编号，若为空，则用tpl_code代替',
  `identify_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份标识，和msg_tpl的对应',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tpl_code` (`tpl_type`,`tpl_code`,`lang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3762 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `open_app`
--

DROP TABLE IF EXISTS `open_app`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `open_app` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `app_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用唯一标识',
  `app_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用名称',
  `app_secrect` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用密钥',
  `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '状态(enable，disable)',
  `limit_ip` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '限制访问ip',
  `limit_tpl_code` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '限制访问模板编号',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者ID',
  `create_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者姓名',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者ID',
  `modify_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者姓名',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_app_id` (`app_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='短信开放接口账号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_status`
--

DROP TABLE IF EXISTS `user_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_status` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `create_time` timestamp NULL DEFAULT NULL COMMENT '第一次初始化配置时间',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `status` tinyint NOT NULL COMMENT '免打扰状态（0.全部接收 1. 夜间不接收 2.不发送邮件、站内不提示）',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_web_msg`
--

DROP TABLE IF EXISTS `user_web_msg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_web_msg` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID',
  `accept_time` timestamp NOT NULL COMMENT '站内信接收时间',
  `send_time` timestamp NOT NULL COMMENT '站内信发送时间',
  `notice_type` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '通知分类(sys：系统消息；biz：业务消息)',
  `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站内信标题',
  `summary` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息摘要',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '站内信内容',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '封面',
  `msg_type_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息类型编号',
  `biz_msg_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '业务端消息编号',
  `emergency` tinyint(1) DEFAULT NULL COMMENT '是否紧急(1.紧急 0.不紧急)',
  `has_read` tinyint(1) NOT NULL COMMENT '是否已读(1.已读 0.未读)',
  `read_at` timestamp NULL DEFAULT NULL COMMENT '用户查看时间',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=130895 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_web_msg_lang`
--

DROP TABLE IF EXISTS `user_web_msg_lang`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_web_msg_lang` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `lang` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '语言（en_US:英文;zh_TW:繁体中文)',
  `ref_id` bigint DEFAULT NULL COMMENT '语言（en_US:英文;zh_TW:繁体中文)',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站内信标题',
  `summary` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站内信摘要',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '站内信内容',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '站内信封面',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `ref_id_lang` (`ref_id`,`lang`) USING BTREE,
  KEY `ref_id` (`ref_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28265 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_notice'
--

--
-- Dumping routines for database 'uav_notice'
--

--
-- Current Database: `uav_oauth`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_oauth` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_oauth`;

--
-- Table structure for table `clientdetails`
--

DROP TABLE IF EXISTS `clientdetails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clientdetails` (
  `appId` varchar(128) NOT NULL,
  `resourceIds` varchar(256) DEFAULT NULL,
  `appSecret` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `grantTypes` varchar(256) DEFAULT NULL,
  `redirectUrl` varchar(256) DEFAULT NULL,
  `authorities` varchar(256) DEFAULT NULL,
  `access_token_validity` int DEFAULT NULL,
  `refresh_token_validity` int DEFAULT NULL,
  `additionalInformation` varchar(4096) DEFAULT NULL,
  `autoApproveScopes` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`appId`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_access_token`
--

DROP TABLE IF EXISTS `oauth_access_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_access_token` (
  `token_id` varchar(256) DEFAULT NULL,
  `token` blob,
  `authentication_id` varchar(128) NOT NULL,
  `user_name` varchar(256) DEFAULT NULL,
  `client_id` varchar(256) DEFAULT NULL,
  `authentication` blob,
  `refresh_token` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`authentication_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_approvals`
--

DROP TABLE IF EXISTS `oauth_approvals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_approvals` (
  `userId` varchar(256) DEFAULT NULL,
  `clientId` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL,
  `expiresAt` timestamp NULL DEFAULT NULL,
  `lastModifiedAt` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_client_details`
--

DROP TABLE IF EXISTS `oauth_client_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_client_details` (
  `client_id` varchar(128) 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '回调地址',
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_client_token`
--

DROP TABLE IF EXISTS `oauth_client_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_client_token` (
  `token_id` varchar(256) DEFAULT NULL,
  `token` blob,
  `authentication_id` varchar(128) NOT NULL,
  `user_name` varchar(256) DEFAULT NULL,
  `client_id` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`authentication_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_code`
--

DROP TABLE IF EXISTS `oauth_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_code` (
  `code` varchar(256) DEFAULT NULL,
  `authentication` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_refresh_token`
--

DROP TABLE IF EXISTS `oauth_refresh_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `oauth_refresh_token` (
  `token_id` varchar(256) DEFAULT NULL,
  `token` blob,
  `authentication` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_oauth'
--

--
-- Dumping routines for database 'uav_oauth'
--

--
-- Current Database: `uav_process`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_process` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_process`;

--
-- Table structure for table `act_app_appdef`
--

DROP TABLE IF EXISTS `act_app_appdef`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_app_appdef` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VERSION_` int NOT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_APP_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`),
  KEY `ACT_IDX_APP_DEF_DPLY` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_APP_DEF_DPLY` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_app_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_app_databasechangelog`
--

DROP TABLE IF EXISTS `act_app_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_app_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_app_databasechangeloglock`
--

DROP TABLE IF EXISTS `act_app_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_app_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_app_deployment`
--

DROP TABLE IF EXISTS `act_app_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_app_deployment` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_app_deployment_resource`
--

DROP TABLE IF EXISTS `act_app_deployment_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_app_deployment_resource` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_APP_RSRC_DPL` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_APP_RSRC_DPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_app_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_casedef`
--

DROP TABLE IF EXISTS `act_cmmn_casedef`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_casedef` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VERSION_` int NOT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` bit(1) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `DGRM_RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HAS_START_FORM_KEY_` bit(1) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_CASE_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`),
  KEY `ACT_IDX_CASE_DEF_DPLY` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_CASE_DEF_DPLY` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_cmmn_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_databasechangelog`
--

DROP TABLE IF EXISTS `act_cmmn_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_databasechangeloglock`
--

DROP TABLE IF EXISTS `act_cmmn_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_deployment`
--

DROP TABLE IF EXISTS `act_cmmn_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_deployment` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_deployment_resource`
--

DROP TABLE IF EXISTS `act_cmmn_deployment_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_deployment_resource` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  `GENERATED_` bit(1) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_CMMN_RSRC_DPL` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_CMMN_RSRC_DPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_cmmn_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_hi_case_inst`
--

DROP TABLE IF EXISTS `act_cmmn_hi_case_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_hi_case_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STATE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_hi_mil_inst`
--

DROP TABLE IF EXISTS `act_cmmn_hi_mil_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_hi_mil_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TIME_STAMP_` datetime(3) DEFAULT NULL,
  `CASE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_hi_plan_item_inst`
--

DROP TABLE IF EXISTS `act_cmmn_hi_plan_item_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_hi_plan_item_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STATE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STAGE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `IS_STAGE_` bit(1) DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ITEM_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ITEM_DEFINITION_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_AVAILABLE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_ENABLED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_DISABLED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_STARTED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_SUSPENDED_TIME_` datetime(3) DEFAULT NULL,
  `COMPLETED_TIME_` datetime(3) DEFAULT NULL,
  `OCCURRED_TIME_` datetime(3) DEFAULT NULL,
  `TERMINATED_TIME_` datetime(3) DEFAULT NULL,
  `EXIT_TIME_` datetime(3) DEFAULT NULL,
  `ENDED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `ENTRY_CRITERION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXIT_CRITERION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SHOW_IN_OVERVIEW_` bit(1) DEFAULT NULL,
  `EXTRA_VALUE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_ru_case_inst`
--

DROP TABLE IF EXISTS `act_cmmn_ru_case_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_ru_case_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STATE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `LOCK_TIME_` datetime(3) DEFAULT NULL,
  `IS_COMPLETEABLE_` bit(1) DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_CASE_INST_CASE_DEF` (`CASE_DEF_ID_`),
  KEY `ACT_IDX_CASE_INST_PARENT` (`PARENT_ID_`),
  KEY `ACT_IDX_CASE_INST_REF_ID_` (`REFERENCE_ID_`),
  CONSTRAINT `ACT_FK_CASE_INST_CASE_DEF` FOREIGN KEY (`CASE_DEF_ID_`) REFERENCES `act_cmmn_casedef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_ru_mil_inst`
--

DROP TABLE IF EXISTS `act_cmmn_ru_mil_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_ru_mil_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TIME_STAMP_` datetime(3) DEFAULT NULL,
  `CASE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_MIL_CASE_DEF` (`CASE_DEF_ID_`),
  KEY `ACT_IDX_MIL_CASE_INST` (`CASE_INST_ID_`),
  CONSTRAINT `ACT_FK_MIL_CASE_DEF` FOREIGN KEY (`CASE_DEF_ID_`) REFERENCES `act_cmmn_casedef` (`ID_`),
  CONSTRAINT `ACT_FK_MIL_CASE_INST` FOREIGN KEY (`CASE_INST_ID_`) REFERENCES `act_cmmn_ru_case_inst` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_ru_plan_item_inst`
--

DROP TABLE IF EXISTS `act_cmmn_ru_plan_item_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_ru_plan_item_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STAGE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `IS_STAGE_` bit(1) DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `STATE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `ITEM_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ITEM_DEFINITION_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `IS_COMPLETEABLE_` bit(1) DEFAULT NULL,
  `IS_COUNT_ENABLED_` bit(1) DEFAULT NULL,
  `VAR_COUNT_` int DEFAULT NULL,
  `SENTRY_PART_INST_COUNT_` int DEFAULT NULL,
  `LAST_AVAILABLE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_ENABLED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_DISABLED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_STARTED_TIME_` datetime(3) DEFAULT NULL,
  `LAST_SUSPENDED_TIME_` datetime(3) DEFAULT NULL,
  `COMPLETED_TIME_` datetime(3) DEFAULT NULL,
  `OCCURRED_TIME_` datetime(3) DEFAULT NULL,
  `TERMINATED_TIME_` datetime(3) DEFAULT NULL,
  `EXIT_TIME_` datetime(3) DEFAULT NULL,
  `ENDED_TIME_` datetime(3) DEFAULT NULL,
  `ENTRY_CRITERION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXIT_CRITERION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXTRA_VALUE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_PLAN_ITEM_CASE_DEF` (`CASE_DEF_ID_`),
  KEY `ACT_IDX_PLAN_ITEM_CASE_INST` (`CASE_INST_ID_`),
  KEY `ACT_IDX_PLAN_ITEM_STAGE_INST` (`STAGE_INST_ID_`),
  CONSTRAINT `ACT_FK_PLAN_ITEM_CASE_DEF` FOREIGN KEY (`CASE_DEF_ID_`) REFERENCES `act_cmmn_casedef` (`ID_`),
  CONSTRAINT `ACT_FK_PLAN_ITEM_CASE_INST` FOREIGN KEY (`CASE_INST_ID_`) REFERENCES `act_cmmn_ru_case_inst` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_cmmn_ru_sentry_part_inst`
--

DROP TABLE IF EXISTS `act_cmmn_ru_sentry_part_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_cmmn_ru_sentry_part_inst` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int NOT NULL,
  `CASE_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CASE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PLAN_ITEM_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ON_PART_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `IF_PART_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TIME_STAMP_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_SENTRY_CASE_DEF` (`CASE_DEF_ID_`),
  KEY `ACT_IDX_SENTRY_CASE_INST` (`CASE_INST_ID_`),
  KEY `ACT_IDX_SENTRY_PLAN_ITEM` (`PLAN_ITEM_INST_ID_`),
  CONSTRAINT `ACT_FK_SENTRY_CASE_DEF` FOREIGN KEY (`CASE_DEF_ID_`) REFERENCES `act_cmmn_casedef` (`ID_`),
  CONSTRAINT `ACT_FK_SENTRY_CASE_INST` FOREIGN KEY (`CASE_INST_ID_`) REFERENCES `act_cmmn_ru_case_inst` (`ID_`),
  CONSTRAINT `ACT_FK_SENTRY_PLAN_ITEM` FOREIGN KEY (`PLAN_ITEM_INST_ID_`) REFERENCES `act_cmmn_ru_plan_item_inst` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_co_content_item`
--

DROP TABLE IF EXISTS `act_co_content_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_co_content_item` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MIME_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTENT_STORE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTENT_STORE_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `FIELD_` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTENT_AVAILABLE_` bit(1) DEFAULT b'0',
  `CREATED_` timestamp(6) NULL DEFAULT NULL,
  `CREATED_BY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LAST_MODIFIED_` timestamp(6) NULL DEFAULT NULL,
  `LAST_MODIFIED_BY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTENT_SIZE_` bigint DEFAULT '0',
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `idx_contitem_taskid` (`TASK_ID_`),
  KEY `idx_contitem_procid` (`PROC_INST_ID_`),
  KEY `idx_contitem_scope` (`SCOPE_ID_`,`SCOPE_TYPE_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_co_databasechangelog`
--

DROP TABLE IF EXISTS `act_co_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_co_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_co_databasechangeloglock`
--

DROP TABLE IF EXISTS `act_co_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_co_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_databasechangelog`
--

DROP TABLE IF EXISTS `act_dmn_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_databasechangeloglock`
--

DROP TABLE IF EXISTS `act_dmn_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_decision_table`
--

DROP TABLE IF EXISTS `act_dmn_decision_table`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_decision_table` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_DEC_TBL_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_deployment`
--

DROP TABLE IF EXISTS `act_dmn_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_deployment` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_deployment_resource`
--

DROP TABLE IF EXISTS `act_dmn_deployment_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_deployment_resource` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_dmn_hi_decision_execution`
--

DROP TABLE IF EXISTS `act_dmn_hi_decision_execution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_dmn_hi_decision_execution` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DECISION_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `INSTANCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACTIVITY_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `FAILED_` bit(1) DEFAULT b'0',
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_JSON_` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_evt_log`
--

DROP TABLE IF EXISTS `act_evt_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_evt_log` (
  `LOG_NR_` bigint NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DATA_` longblob,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_PROCESSED_` tinyint DEFAULT '0',
  PRIMARY KEY (`LOG_NR_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_databasechangelog`
--

DROP TABLE IF EXISTS `act_fo_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_databasechangeloglock`
--

DROP TABLE IF EXISTS `act_fo_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_form_definition`
--

DROP TABLE IF EXISTS `act_fo_form_definition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_form_definition` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_FORM_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_form_deployment`
--

DROP TABLE IF EXISTS `act_fo_form_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_form_deployment` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_form_instance`
--

DROP TABLE IF EXISTS `act_fo_form_instance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_form_instance` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FORM_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TASK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUBMITTED_DATE_` datetime(3) DEFAULT NULL,
  `SUBMITTED_BY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `FORM_VALUES_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_fo_form_resource`
--

DROP TABLE IF EXISTS `act_fo_form_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_fo_form_resource` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ge_bytearray`
--

DROP TABLE IF EXISTS `act_ge_bytearray`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ge_bytearray` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BYTES_` longblob,
  `GENERATED_` tinyint DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_BYTEARR_DEPL` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ge_property`
--

DROP TABLE IF EXISTS `act_ge_property`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ge_property` (
  `NAME_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VALUE_` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  PRIMARY KEY (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_actinst`
--

DROP TABLE IF EXISTS `act_hi_actinst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_actinst` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_ACT_INST_START` (`START_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_END` (`END_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_PROCINST` (`PROC_INST_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_HI_ACT_INST_EXEC` (`EXECUTION_ID_`,`ACT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_attachment`
--

DROP TABLE IF EXISTS `act_hi_attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_attachment` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `URL_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTENT_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_comment`
--

DROP TABLE IF EXISTS `act_hi_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_comment` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACTION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `MESSAGE_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `FULL_MSG_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_detail`
--

DROP TABLE IF EXISTS `act_hi_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_detail` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VAR_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_DETAIL_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_ACT_INST` (`ACT_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_TIME` (`TIME_`),
  KEY `ACT_IDX_HI_DETAIL_NAME` (`NAME_`),
  KEY `ACT_IDX_HI_DETAIL_TASK_ID` (`TASK_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_entitylink`
--

DROP TABLE IF EXISTS `act_hi_entitylink`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_entitylink` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `LINK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_identitylink`
--

DROP TABLE IF EXISTS `act_hi_identitylink`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_identitylink` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `GROUP_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_TASK` (`TASK_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_procinst`
--

DROP TABLE IF EXISTS `act_hi_procinst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_procinst` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `END_ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUPER_PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `PROC_INST_ID_` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_PRO_INST_END` (`END_TIME_`),
  KEY `ACT_IDX_HI_PRO_I_BUSKEY` (`BUSINESS_KEY_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_taskinst`
--

DROP TABLE IF EXISTS `act_hi_taskinst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_taskinst` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PRIORITY_` int DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `FORM_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_INST_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_tsk_log`
--

DROP TABLE IF EXISTS `act_hi_tsk_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_tsk_log` (
  `ID_` bigint NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DATA_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_hi_varinst`
--

DROP TABLE IF EXISTS `act_hi_varinst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_hi_varinst` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VAR_TYPE_` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_PROCVAR_NAME_TYPE` (`NAME_`,`VAR_TYPE_`),
  KEY `ACT_IDX_HI_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_PROCVAR_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_PROCVAR_TASK_ID` (`TASK_ID_`),
  KEY `ACT_IDX_HI_PROCVAR_EXE` (`EXECUTION_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_bytearray`
--

DROP TABLE IF EXISTS `act_id_bytearray`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_bytearray` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_group`
--

DROP TABLE IF EXISTS `act_id_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_group` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_info`
--

DROP TABLE IF EXISTS `act_id_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_info` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `USER_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `VALUE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PASSWORD_` longblob,
  `PARENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_membership`
--

DROP TABLE IF EXISTS `act_id_membership`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_membership` (
  `USER_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `GROUP_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`USER_ID_`,`GROUP_ID_`),
  KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`),
  CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES `act_id_group` (`ID_`),
  CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `act_id_user` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_priv`
--

DROP TABLE IF EXISTS `act_id_priv`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_priv` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_PRIV_NAME` (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_priv_mapping`
--

DROP TABLE IF EXISTS `act_id_priv_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_priv_mapping` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `PRIV_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `GROUP_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_PRIV_MAPPING` (`PRIV_ID_`),
  KEY `ACT_IDX_PRIV_USER` (`USER_ID_`),
  KEY `ACT_IDX_PRIV_GROUP` (`GROUP_ID_`),
  CONSTRAINT `ACT_FK_PRIV_MAPPING` FOREIGN KEY (`PRIV_ID_`) REFERENCES `act_id_priv` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_property`
--

DROP TABLE IF EXISTS `act_id_property`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_property` (
  `NAME_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VALUE_` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  PRIMARY KEY (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_token`
--

DROP TABLE IF EXISTS `act_id_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_token` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TOKEN_VALUE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TOKEN_DATE_` timestamp(3) NULL DEFAULT NULL,
  `IP_ADDRESS_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `USER_AGENT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TOKEN_DATA_` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_id_user`
--

DROP TABLE IF EXISTS `act_id_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_id_user` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `FIRST_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LAST_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DISPLAY_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EMAIL_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PWD_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PICTURE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_procdef_info`
--

DROP TABLE IF EXISTS `act_procdef_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_procdef_info` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `INFO_JSON_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_IDX_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_INFO_JSON_BA` (`INFO_JSON_ID_`),
  CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_re_deployment`
--

DROP TABLE IF EXISTS `act_re_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_re_deployment` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ENGINE_VERSION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_re_model`
--

DROP TABLE IF EXISTS `act_re_model`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_re_model` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `META_INFO_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EDITOR_SOURCE_VALUE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_MODEL_SOURCE` (`EDITOR_SOURCE_VALUE_ID_`),
  KEY `ACT_FK_MODEL_SOURCE_EXTRA` (`EDITOR_SOURCE_EXTRA_VALUE_ID_`),
  KEY `ACT_FK_MODEL_DEPLOYMENT` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_re_procdef`
--

DROP TABLE IF EXISTS `act_re_procdef`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_re_procdef` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `VERSION_` int NOT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DGRM_RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HAS_START_FORM_KEY_` tinyint DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` tinyint DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `ENGINE_VERSION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DERIVED_VERSION_` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_PROCDEF` (`KEY_`,`VERSION_`,`DERIVED_VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_actinst`
--

DROP TABLE IF EXISTS `act_ru_actinst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_actinst` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_RU_ACTI_START` (`START_TIME_`),
  KEY `ACT_IDX_RU_ACTI_END` (`END_TIME_`),
  KEY `ACT_IDX_RU_ACTI_PROC` (`PROC_INST_ID_`),
  KEY `ACT_IDX_RU_ACTI_PROC_ACT` (`PROC_INST_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_RU_ACTI_EXEC` (`EXECUTION_ID_`),
  KEY `ACT_IDX_RU_ACTI_EXEC_ACT` (`EXECUTION_ID_`,`ACT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_deadletter_job`
--

DROP TABLE IF EXISTS `act_ru_deadletter_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_deadletter_job` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_DJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_DJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_DJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_DEADLETTER_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_DEADLETTER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_entitylink`
--

DROP TABLE IF EXISTS `act_ru_entitylink`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_entitylink` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LINK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_event_subscr`
--

DROP TABLE IF EXISTS `act_ru_event_subscr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_event_subscr` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `EVENT_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EVENT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACTIVITY_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONFIGURATION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EVENT_SUBSCR_CONFIG_` (`CONFIGURATION_`),
  KEY `ACT_FK_EVENT_EXEC` (`EXECUTION_ID_`),
  CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_execution`
--

DROP TABLE IF EXISTS `act_ru_execution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_execution` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUPER_EXEC_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ROOT_PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `IS_ACTIVE_` tinyint DEFAULT NULL,
  `IS_CONCURRENT_` tinyint DEFAULT NULL,
  `IS_SCOPE_` tinyint DEFAULT NULL,
  `IS_EVENT_SCOPE_` tinyint DEFAULT NULL,
  `IS_MI_ROOT_` tinyint DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `CACHED_ENT_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint DEFAULT NULL,
  `EVT_SUBSCR_COUNT_` int DEFAULT NULL,
  `TASK_COUNT_` int DEFAULT NULL,
  `JOB_COUNT_` int DEFAULT NULL,
  `TIMER_JOB_COUNT_` int DEFAULT NULL,
  `SUSP_JOB_COUNT_` int DEFAULT NULL,
  `DEADLETTER_JOB_COUNT_` int DEFAULT NULL,
  `VAR_COUNT_` int DEFAULT NULL,
  `ID_LINK_COUNT_` int DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`),
  KEY `ACT_IDC_EXEC_ROOT` (`ROOT_PROC_INST_ID_`),
  KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`),
  KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`),
  KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE,
  CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_history_job`
--

DROP TABLE IF EXISTS `act_ru_history_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_history_job` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ADV_HANDLER_CFG_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_identitylink`
--

DROP TABLE IF EXISTS `act_ru_identitylink`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_identitylink` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `GROUP_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_IDENT_LNK_GROUP` (`GROUP_ID_`),
  KEY `ACT_IDX_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_ATHRZ_PROCEDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_TSKASS_TASK` (`TASK_ID_`),
  KEY `ACT_FK_IDL_PROCINST` (`PROC_INST_ID_`),
  CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `act_ru_task` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_job`
--

DROP TABLE IF EXISTS `act_ru_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_job` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_JOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_JOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_JOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_suspended_job`
--

DROP TABLE IF EXISTS `act_ru_suspended_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_suspended_job` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_SJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_SJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_SJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_SUSPENDED_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_SUSPENDED_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_task`
--

DROP TABLE IF EXISTS `act_ru_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_task` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DELEGATION_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PRIORITY_` int DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  `FORM_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint DEFAULT NULL,
  `VAR_COUNT_` int DEFAULT NULL,
  `ID_LINK_COUNT_` int DEFAULT NULL,
  `SUB_TASK_COUNT_` int DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_TASK_CREATE` (`CREATE_TIME_`),
  KEY `ACT_IDX_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_TASK_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_TASK_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_TASK_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_timer_job`
--

DROP TABLE IF EXISTS `act_ru_timer_job`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_timer_job` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_TJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_TIMER_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_TIMER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `act_ru_variable`
--

DROP TABLE IF EXISTS `act_ru_variable`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `act_ru_variable` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_RU_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_RU_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_VAR_BYTEARRAY` (`BYTEARRAY_ID_`),
  KEY `ACT_IDX_VARIABLE_TASK_ID` (`TASK_ID_`),
  KEY `ACT_FK_VAR_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_VAR_PROCINST` (`PROC_INST_ID_`),
  CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_flow_def`
--

DROP TABLE IF EXISTS `biz_flow_def`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_flow_def` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流标识',
  `process_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流名称',
  `process_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工作流描述',
  `process_cate` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流类型。custom:自定义流程；sys:系统流程',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户Id',
  `in_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '输入参数信息',
  `flow_config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '流程配置',
  `deployee_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部署ID',
  `is_lock` tinyint NOT NULL COMMENT '是否锁定',
  `period` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'instant:即时运行；period:周期性运行',
  `time_start` datetime DEFAULT NULL COMMENT '有效时间开始时间',
  `time_end` datetime DEFAULT NULL COMMENT '有效时间结束时间',
  `call_cycle` int DEFAULT NULL COMMENT '调度周期',
  `cycle_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '周期单位(sec：秒；minute:分钟；hour:小时；day:天)',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_process_name` (`process_name`),
  UNIQUE KEY `uniq_process_type` (`process_type`),
  KEY `idx_deployee_id` (`deployee_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='流程定义表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_flow_def_his`
--

DROP TABLE IF EXISTS `biz_flow_def_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_flow_def_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流标识',
  `process_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流名称',
  `process_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工作流描述',
  `process_cate` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工作流类型。custom:自定义流程；sys:系统流程',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户Id',
  `in_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '输入参数信息',
  `flow_config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '流程配置',
  `deployee_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部署ID',
  `is_lock` tinyint NOT NULL COMMENT '是否锁定',
  `period` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'instant:即时运行；period:周期性运行',
  `time_start` datetime DEFAULT NULL COMMENT '有效时间开始时间',
  `time_end` datetime DEFAULT NULL COMMENT '有效时间结束时间',
  `call_cycle` int DEFAULT NULL COMMENT '调度周期',
  `cycle_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '周期单位(sec：秒；minute:分钟；hour:小时；day:天)',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_process_type` (`process_type`),
  KEY `idx_process_name` (`process_name`),
  KEY `idx_deployee_id` (`deployee_id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='流程定义历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_flow_inst`
--

DROP TABLE IF EXISTS `biz_flow_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_flow_inst` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `biz_order_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外部业务单编号',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例Id',
  `category` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分类：bizflow,业务流程引擎',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程类型',
  `process_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程名称',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户Id',
  `start_time` timestamp(3) NULL DEFAULT NULL COMMENT '流程提交时间',
  `end_time` timestamp(3) NULL DEFAULT NULL COMMENT '流程结束时间',
  `start_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程提交用户id',
  `process_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '提交流程参数',
  `node_config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '每个节点参数配置',
  `deployee_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部署ID',
  `period_task_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '周期性任务编号',
  `sucess` tinyint NOT NULL COMMENT '流程提交状态: 0.未提交,中间状态 1.成功 2.失败,中间状态,创建流程失败会删除  ',
  `run_status` int NOT NULL COMMENT '1.运行中  2.运行成功 3.运行失败  4.运行停止',
  `node_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '当前节点ID',
  `node_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '当前节点名称',
  `fail_detail` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '失败原因',
  `fail_task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '失败关联的任务ID',
  `flow_task_type` int DEFAULT '0' COMMENT '流程管理系统任务类型，0：系统任务 1.人工任务 2.混合任务',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_biz_order_code` (`biz_order_code`),
  UNIQUE KEY `uniq_proc_inst_id` (`proc_inst_id`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_update_at` (`update_at`)
) ENGINE=InnoDB AUTO_INCREMENT=1929 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='业务流程实例';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_flow_task`
--

DROP TABLE IF EXISTS `biz_flow_task`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_flow_task` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工作流标识',
  `task_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务标识',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_process_type` (`process_type`,`task_type`),
  KEY `idx_task_type` (`task_type`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='工作流-任务定义关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_period_inst`
--

DROP TABLE IF EXISTS `biz_period_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_period_inst` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `biz_order_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外部业务单编号',
  `category` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分类：bizflow,业务流程引擎',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程类型',
  `process_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程名称',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户Id',
  `start_time` datetime DEFAULT NULL COMMENT '流程提交时间',
  `start_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程提交用户id',
  `process_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '提交流程参数',
  `node_config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '每个节点参数配置',
  `first_start_tm` datetime DEFAULT NULL COMMENT '首次期望运行时间',
  `next_execute_tm` datetime DEFAULT NULL COMMENT '下一次期望执行时间',
  `next_execute_num` bigint DEFAULT NULL COMMENT '下一次执行次数',
  `last_execute_tm` datetime DEFAULT NULL COMMENT '上一次执行时间',
  `success_num` bigint DEFAULT NULL COMMENT '上一次成功执行次数(1,2,3)',
  `period_status` int DEFAULT NULL COMMENT '周期任务运行状态。1.运行中   2.运行完成   3.运行停止',
  `time_start` datetime DEFAULT NULL COMMENT '有效时间开始时间',
  `time_end` datetime DEFAULT NULL COMMENT '有效时间结束时间',
  `call_cycle` bigint DEFAULT NULL COMMENT '调度周期',
  `cycle_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '周期单位(sec：秒；minute:分钟；hour:小时；day:天）',
  `run_status` int DEFAULT NULL COMMENT '最近一次提交状态  0.待提交 1.提交成功 2.提交失败',
  `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_biz_code` (`biz_order_code`),
  KEY `idx_process_type` (`process_type`),
  KEY `idx_update_at` (`update_at`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='周期任务实例';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_period_inst_his`
--

DROP TABLE IF EXISTS `biz_period_inst_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_period_inst_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `biz_order_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外部业务单编号',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例ID',
  `category` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分类：bizflow,业务流程引擎',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程类型',
  `process_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程名称',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户Id',
  `start_time` datetime DEFAULT NULL COMMENT '流程提交时间',
  `start_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程提交用户id',
  `process_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '提交流程参数',
  `node_config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '每个节点参数配置',
  `first_start_tm` datetime DEFAULT NULL COMMENT '首次期望运行时间',
  `next_execute_tm` datetime DEFAULT NULL COMMENT '下一次期望执行时间',
  `next_execute_num` bigint DEFAULT NULL COMMENT '下一次执行次数',
  `last_execute_tm` datetime DEFAULT NULL COMMENT '上一次执行时间',
  `success_num` bigint DEFAULT NULL COMMENT '上一次成功调度次数(1,2,3)',
  `run_status` int DEFAULT NULL COMMENT '提交状态  0.待提交 1.提交成功 2.提交失败',
  `time_start` datetime DEFAULT NULL COMMENT '有效时间开始时间',
  `time_end` datetime DEFAULT NULL COMMENT '有效时间结束时间',
  `call_cycle` bigint DEFAULT NULL COMMENT '调度周期时长',
  `cycle_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '周期单位(sec：秒；minute:分钟；hour:小时；day:天）',
  `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_biz_code` (`biz_order_code`),
  KEY `idx_create_at` (`create_at`),
  KEY `idx_procInstId` (`proc_inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='周期任务历史实例';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_task_def`
--

DROP TABLE IF EXISTS `biz_task_def`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_task_def` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务标识',
  `task_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名称',
  `task_desc` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务描述',
  `task_cate` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务类型。custom:自定义任务；sys:系统任务',
  `interface_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务类型（http:Http接口,feign:Feigh接口）',
  `service_info` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务信息。包括：method,url。',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户Id',
  `in_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '输入参数信息',
  `out_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '输出参数信息',
  `is_lock` tinyint DEFAULT NULL COMMENT '是否锁定',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_task_type` (`task_type`),
  UNIQUE KEY `uniq_task_name` (`task_name`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='任务定义表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `biz_task_log`
--

DROP TABLE IF EXISTS `biz_task_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `biz_task_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联流程实例Id',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联任务id',
  `task_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联任务标识',
  `task_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联任务名称',
  `task_type_cate` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'sys' COMMENT '任务执行方式。sys:系统任务 ；manual:手工任务',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工作流ID(标识)',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户Id',
  `task_def_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程定义任务节点id',
  `task_node_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务节点名称',
  `in_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '任务调用输入参数',
  `out_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '任务调用输出参数',
  `format_out_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '格式化后输出参数',
  `expect_start_time` datetime DEFAULT NULL COMMENT '期望真正开始执行时间（定时任务)',
  `latest_start_tm` datetime DEFAULT NULL COMMENT '最近一次开始时间',
  `start_time` datetime DEFAULT NULL COMMENT '任务开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '最近一次任务结束时间',
  `request_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求接口地址',
  `spent` int DEFAULT NULL COMMENT '运行时长(ms)',
  `status` int DEFAULT NULL COMMENT '0.待运行；1.运行中  2.运行成功 3.运行失败  4.运行停止  5.系统错误',
  `fail_detail` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '失败原因',
  `run_total` int DEFAULT NULL COMMENT '调用接口次数',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_task_id` (`task_id`),
  KEY `idx_proc_inst_id` (`proc_inst_id`),
  KEY `idx_start_time` (`start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=4546 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='任务日志';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_channel_definition`
--

DROP TABLE IF EXISTS `flw_channel_definition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_channel_definition` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_CHANNEL_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_ev_databasechangelog`
--

DROP TABLE IF EXISTS `flw_ev_databasechangelog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_ev_databasechangelog` (
  `ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_ev_databasechangeloglock`
--

DROP TABLE IF EXISTS `flw_ev_databasechangeloglock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_ev_databasechangeloglock` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_event_definition`
--

DROP TABLE IF EXISTS `flw_event_definition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_event_definition` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_EVENT_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_event_deployment`
--

DROP TABLE IF EXISTS `flw_event_deployment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_event_deployment` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_event_resource`
--

DROP TABLE IF EXISTS `flw_event_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_event_resource` (
  `ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_ru_batch`
--

DROP TABLE IF EXISTS `flw_ru_batch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_ru_batch` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `SEARCH_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SEARCH_KEY2_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) NOT NULL,
  `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  `STATUS_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `BATCH_DOC_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flw_ru_batch_part`
--

DROP TABLE IF EXISTS `flw_ru_batch_part`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flw_ru_batch_part` (
  `ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `BATCH_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `SCOPE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SEARCH_KEY_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `SEARCH_KEY2_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) NOT NULL,
  `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  `STATUS_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `RESULT_DOC_ID_` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `FLW_IDX_BATCH_PART` (`BATCH_ID_`),
  CONSTRAINT `FLW_FK_BATCH_PART_PARENT` FOREIGN KEY (`BATCH_ID_`) REFERENCES `flw_ru_batch` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_proc_callback`
--

DROP TABLE IF EXISTS `uav_proc_callback`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_proc_callback` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `msg_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分配消息编号，唯一标识',
  `biz_order_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '外部业务单编号',
  `proc_task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务Id',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例Id',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '回调任务创建时间',
  `notice_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息类型：callback:回调消息；email：邮件消息；sms：短信；web：站内信息',
  `process_status` int DEFAULT NULL COMMENT '消息产生时流程状态(1.审批中 2.被驳回 3.已拒绝  4.已通过)。回调业务系统消息时以流程最新状态为准。',
  `msg_model` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '回调通知内容，json字符串表示',
  `expect_start_tm` timestamp NULL DEFAULT NULL COMMENT '希望执行时间，调用程序设置，为空则立马执行。',
  `last_execute_tm` timestamp NULL DEFAULT NULL COMMENT '上次执行完成时时间',
  `spent` int DEFAULT NULL COMMENT '发送耗费时间ms',
  `expire_tm` timestamp NULL DEFAULT NULL COMMENT '超时时间，超过这个时间失败则不再重试',
  `success` int DEFAULT NULL COMMENT '是否成功(0.成功  1.失败）',
  `in_queue` int DEFAULT NULL COMMENT '是否在调度队列中（0，未 1.在调度队列中）',
  `retries` int DEFAULT NULL COMMENT '发送次数',
  `result_desc` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执行结果描述',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `msg_code` (`msg_code`)
) ENGINE=InnoDB AUTO_INCREMENT=5072 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_proc_cfg`
--

DROP TABLE IF EXISTS `uav_proc_cfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_proc_cfg` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程类型编号（唯一）',
  `process_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程类型名称',
  `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程描述',
  `description_fanti` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程繁体中文描述',
  `description_en` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程英文描述',
  `logo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程图标',
  `back_ground_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程背景图标',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程备注',
  `call_back_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程回调地址',
  `is_show` int DEFAULT NULL COMMENT '是否对外显示(1.显示 0.不显示）',
  `is_lock` int DEFAULT '0' COMMENT '是否锁定0.不锁定； 1.锁定',
  `sort_index` int DEFAULT NULL COMMENT '排序标识，默认为10(从小到大排序 1，2，3）',
  `belong_to` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程分类（front:前台流程,admin：后台流程)',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `process_type` (`process_type`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_proc_def`
--

DROP TABLE IF EXISTS `uav_proc_def`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_proc_def` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `process_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程定义编号',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程类型(与tenat_id组成唯一标识)',
  `process_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程名称',
  `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id，流程归属租户',
  `logo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程图标',
  `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程描述',
  `description_fanti` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程繁体中文描述',
  `description_en` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程英文描述',
  `is_show` int DEFAULT NULL COMMENT '是否对外显示(1.显示 0.不显示）',
  `is_lock` int DEFAULT '0' COMMENT '是否锁定0.不锁定； 1.锁定',
  `sort_index` int DEFAULT NULL COMMENT '排序标识，默认为10(从小到大排序 1，2，3）',
  `belong_to` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程归属（front:前台流程,admin：后台流程)',
  `node_content_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分配临时节点编号，每次修改分配一次',
  `node_content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '节点内容',
  `deployee_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部署id(部署id)',
  `status` int DEFAULT '0' COMMENT '状态（0.未部署 1.等待拒绝历史记录 2.等待部署  3.已部署）',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `tenant_processType` (`process_type`,`tenant_id`),
  UNIQUE KEY `process_code` (`process_code`)
) ENGINE=InnoDB AUTO_INCREMENT=306 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_proc_def_his`
--

DROP TABLE IF EXISTS `uav_proc_def_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_proc_def_his` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `process_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程定义编号',
  `process_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程名称',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程类型(与tenat_id组成唯一标识)',
  `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id，流程归属租户',
  `logo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程图标',
  `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程描述',
  `description_fanti` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程繁体中文描述',
  `description_en` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程英文描述',
  `is_show` int DEFAULT NULL COMMENT '是否对外显示(1.显示 0.不显示）',
  `is_lock` int DEFAULT '0' COMMENT '是否锁定0.不锁定； 1.锁定',
  `sort_index` int DEFAULT NULL COMMENT '排序标识，默认为10(从小到大排序 1，2，3）',
  `belong_to` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程归属（front:前台流程,admin：后台流程)',
  `node_content_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分配临时节点编号，每次修改分配一次',
  `node_content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '节点内容',
  `deployee_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部署id(部署id)',
  `status` int DEFAULT NULL COMMENT '状态（0.未部署 1.等待拒绝历史记录 2.等待部署  3.已部署）',
  `create_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者账号id',
  `modify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改者账号id',
  `update_at` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_proc_inst`
--

DROP TABLE IF EXISTS `uav_proc_inst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_proc_inst` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `biz_order_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '外部业务单编号',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例Id',
  `category` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'approval' COMMENT '分类,approval:审批；taskorder:工单;默认值approval',
  `process_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程类型',
  `process_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程标题（名称）',
  `start_time` timestamp NULL DEFAULT NULL COMMENT '流程提交时间',
  `user_category` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程分类(f:前台用户; b:后台运营用户）',
  `start_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程提交用户id',
  `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id',
  `process_param` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '提交流程参数',
  `node_assignees` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程节点选择审批人情况',
  `sucess` int DEFAULT NULL COMMENT '流程提交状态: 0.未提交,中间状态 1.成功 2.失败,中间状态,创建流程失败会删除  ',
  `process_status` int DEFAULT NULL COMMENT '1.审批中 2.驳回 3.拒绝  4.已通过',
  `reject_total` int DEFAULT NULL COMMENT '驳回总次数',
  `host` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程主机地址',
  `detail_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '获取流程详情信息地址',
  `call_back_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '自定义回调地址，不为空时回调以此地址为准',
  `update_at` timestamp NULL DEFAULT NULL,
  `create_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `biz_order_code` (`biz_order_code`),
  UNIQUE KEY `proc_inst_id` (`proc_inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5438 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_comment`
--

DROP TABLE IF EXISTS `uav_task_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_comment` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_order_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务工单编号',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例ID',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '注释用户单位id',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '注释用户id',
  `comment_time` datetime DEFAULT NULL COMMENT '注释时间',
  `comment_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '类型：event（事件）comment（备注）',
  `comment_action` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '注释动作',
  `message` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '注释内容',
  `full_msg` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '附件信息',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_task_order_code` (`task_order_code`),
  KEY `idx_proc_inst_id` (`proc_inst_id`),
  KEY `idx_comment_time` (`comment_time`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='任务工单注释表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_dispatch`
--

DROP TABLE IF EXISTS `uav_task_dispatch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_dispatch` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `task_order_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '作业编号',
  `start_unit_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '发起任务，租户id(公司id)',
  `start_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '发起人用户id',
  `task_type_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务类型编号',
  `task_name_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '对应任务名称标识',
  `task_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名称',
  `accept_unit_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接收单位',
  `accept_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接收用户',
  `task_start_time` datetime NOT NULL COMMENT '任务下发时间',
  `task_complete_time` datetime DEFAULT NULL COMMENT '任务完成时间',
  `address` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务点位',
  `due_time` datetime DEFAULT NULL COMMENT '计划完成时间',
  `file` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '上传图片（附件）',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `status` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '状态。wait_deal:待执行； wait_audit:待终审  pass:完成；reject：拒绝 ；cancel:撤销',
  `proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例ID',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_order_code` (`task_order_code`),
  UNIQUE KEY `uniq_proc_inst_id` (`proc_inst_id`),
  KEY `idx_accept_unit_id` (`accept_unit_id`),
  KEY `idx_task_name_code` (`start_user_id`,`task_name`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='任务派发表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_duty_user`
--

DROP TABLE IF EXISTS `uav_task_duty_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_duty_user` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户ID',
  `duty_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '值班用户id',
  `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新者',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者',
  `update_at` datetime NOT NULL COMMENT '修改时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_tenant_id` (`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=133 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='接口人配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_mission`
--

DROP TABLE IF EXISTS `uav_task_mission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_mission` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户id',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `mission_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '作业id',
  `task_order_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工单作业编号',
  `mission_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业类型(empty 全部;1 常规作业;2 快速作业;4 定时作业母版)',
  `mission_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业名称',
  `mission_time` datetime DEFAULT NULL COMMENT '作业时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime NOT NULL COMMENT '更新时间',
  `create_at` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_task_mission` (`mission_id`,`task_order_code`),
  UNIQUE KEY `uniq_mission_id` (`mission_id`),
  KEY `idx_task` (`task_order_code`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='作业任务关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_name_map`
--

DROP TABLE IF EXISTS `uav_task_name_map`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_name_map` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '发起任务租户id(公司id)',
  `task_name_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名编号',
  `task_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务名称,1级公司下唯一',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_name` (`tenant_id`,`task_name`),
  UNIQUE KEY `uniq_code` (`task_name_code`)
) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='任务名表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_task_type`
--

DROP TABLE IF EXISTS `uav_task_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_task_type` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id',
  `task_type_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务类型编号',
  `task_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务类型',
  `remark` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '备注',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户id',
  `lock_status` tinyint NOT NULL COMMENT '是否锁定.0.启用 1.锁定',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_task_type_code` (`task_type_code`),
  UNIQUE KEY `uniq_task_type` (`tenant_id`,`task_type`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='任务类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_process'
--

--
-- Dumping routines for database 'uav_process'
--

--
-- Current Database: `uav_user`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_user` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_user`;

--
-- Table structure for table `flyer_info`
--

DROP TABLE IF EXISTS `flyer_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flyer_info` (
  `id` bigint NOT NULL COMMENT '主键id',
  `flyer_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '执照编号',
  `flyer_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '飞手姓名',
  `id_card` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证号',
  `email` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `tel` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系方式',
  `sign_date` date DEFAULT NULL COMMENT '签发日期',
  `effective_date` date DEFAULT NULL COMMENT '有效日期',
  `id_card_date` date DEFAULT NULL COMMENT '身份证有效期限',
  `enforcement_certificate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执法证号',
  `level` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执照等级',
  `state` int DEFAULT '0' COMMENT '执照状态,0:待验证，1、已通过，2、未通过',
  `no_pass_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '不通过原因',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `flyer_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执照正面照',
  `flyer2_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执照反面照',
  `sfz_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证正面照',
  `sfz2_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证反面照',
  `zfz_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执法证照照片',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像照',
  `flag` int DEFAULT '0' COMMENT '飞手状态，0：正常，1、注销',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='飞手信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `illegal_info`
--

DROP TABLE IF EXISTS `illegal_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `illegal_info` (
  `id` bigint NOT NULL COMMENT '违规信息主键id',
  `flyer_id` bigint DEFAULT NULL COMMENT '飞手信息主键id',
  `illegal_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '违章编号',
  `illegal_date` datetime DEFAULT NULL COMMENT '违章时间',
  `illegal_place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '违规地点',
  `illegal_Type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '违规类型',
  `illegal_penalty` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '违规处罚',
  `state` int DEFAULT NULL COMMENT '违规状态，0：未处理，1：已处理',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `deal_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '手动处理描述',
  `illegal_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '违规事件',
  `imgf` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图片地址1',
  `imgs` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图片地址2',
  `imgt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图片地址3',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='飞手违规记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_account`
--

DROP TABLE IF EXISTS `sys_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_account` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '账号id，一个用户可有多种登陆方式',
  `user_id` int DEFAULT NULL COMMENT '用户id',
  `user_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户密码',
  `salt` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '随机加密盐',
  `type` smallint DEFAULT NULL COMMENT '用户账号类型0:账号密码型，1:手机验证码，2:邮箱登陆型',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除：0:正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `INDEX_account_user_account` (`user_account`) USING BTREE,
  KEY `INDEX_account_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2646 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_action_api`
--

DROP TABLE IF EXISTS `sys_action_api`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_action_api` (
  `action_id` int NOT NULL COMMENT '按钮id',
  `api_id` int NOT NULL COMMENT '接口id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`action_id`,`api_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dynamic`
--

DROP TABLE IF EXISTS `sys_dynamic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dynamic` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `title` varchar(100) NOT NULL COMMENT '标题',
  `type` int NOT NULL COMMENT '内容形式 0: 正文   1: PDF',
  `content` longtext COMMENT '正文',
  `pdf` varchar(100) DEFAULT NULL COMMENT 'pdf路径',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(100) DEFAULT NULL COMMENT '更新人',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除 0 否  1 是',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='凌云动态';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_dynamic_user_mapping`
--

DROP TABLE IF EXISTS `sys_dynamic_user_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_dynamic_user_mapping` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `name` varchar(100) DEFAULT NULL COMMENT '用户名',
  `telephone` varchar(100) DEFAULT NULL COMMENT '手机号',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(128) DEFAULT NULL COMMENT '创建用户',
  `update_by` varchar(128) DEFAULT NULL COMMENT '更新用户',
  `is_del` bit(1) DEFAULT b'0' COMMENT '0 未删  1 已删',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='凌云动态用户关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_feedback`
--

DROP TABLE IF EXISTS `sys_feedback`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_feedback` (
  `id` bigint NOT NULL COMMENT '反馈信息ID',
  `platform_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台类型(中移凌云，运营平台，开放平台)',
  `platform_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台应用id',
  `type_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '反馈类型编码',
  `feedback_desc` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '反馈描述',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '手机号',
  `resource_link` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '图片链接',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '反馈用户id',
  `create_by_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '返回用户姓名',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '反馈时间',
  `email` varchar(254) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮箱',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `INDEX_FEEDBACK_PLATFORM_ID` (`platform_id`) USING BTREE,
  KEY `INDEX_FEEDBACK_TYPE_CODE` (`type_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_gateway_access_log`
--

DROP TABLE IF EXISTS `sys_gateway_access_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_gateway_access_log` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户id',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求ip地址',
  `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法',
  `service_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微服务名称',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求路径',
  `client_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户端id',
  `user_agent` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户客户端agent',
  `request_time` timestamp NULL DEFAULT NULL COMMENT '请求时间',
  `response_time` timestamp NULL DEFAULT NULL COMMENT '响应时间',
  `cost_time` int DEFAULT NULL COMMENT '执行消耗时间',
  `http_status` int DEFAULT NULL COMMENT '请求状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1252236 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='请求日志';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_group_resource_mapping`
--

DROP TABLE IF EXISTS `sys_group_resource_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_group_resource_mapping` (
  `id` bigint NOT NULL COMMENT '资源组与资源的映射id',
  `resource_group_id` int NOT NULL COMMENT '资源组id',
  `resource_id` int NOT NULL COMMENT '资源id',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_group_resource_group` (`resource_group_id`,`resource_id`) USING BTREE,
  KEY `idx_group_resource_resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='资源组与资源的映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org`
--

DROP TABLE IF EXISTS `sys_org`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `pid` int DEFAULT NULL COMMENT '父级id',
  `root_id` int DEFAULT NULL COMMENT '最上级的公司id',
  `level` int DEFAULT '1' COMMENT '公司所在层级，公司从1开始累加，机构也从1开始累加',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '名称',
  `type` smallint DEFAULT NULL COMMENT '机构类型，0:公司，1:机构',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '机构描述',
  `company_id` int DEFAULT NULL COMMENT '所属公司id，如果是公司，则为空',
  `unified_credit_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '统一信用代码',
  `unified_credit_img` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '统一信用图片',
  `system_logo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '公司默认系统logo',
  `langs` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司支持的国际化语言',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否禁用，0:未禁用，1禁用',
  `is_del` bit(1) DEFAULT b'0' COMMENT '0:为正常，1:删除',
  `valid_start_date` date DEFAULT '2019-01-01' COMMENT '有效开始日期',
  `valid_end_date` date DEFAULT '9999-12-31' COMMENT '有效结束日期',
  `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联项目名',
  `project_associates` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目申请人',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `is_industry_app` bit(1) DEFAULT b'0' COMMENT '是否是行业应用0：否，1是',
  `nature` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'NORMAL' COMMENT '公司性质，普通公司NORMAL，行业公司INDUSTRY，演示公司 DEMO',
  `gis_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '地理位置信息',
  `province` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '省',
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '市',
  `district` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '区',
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '详细地址',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_org_valid_time` (`is_frozen`,`valid_end_date`,`is_del`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=525 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org_attr`
--

DROP TABLE IF EXISTS `sys_org_attr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org_attr` (
  `id` bigint NOT NULL COMMENT '语言id',
  `type` smallint DEFAULT '0' COMMENT '多语言，类型，0:一级系统名',
  `org_id` bigint DEFAULT NULL COMMENT '公司机构id',
  `lang` varchar(32) DEFAULT NULL COMMENT '语言',
  `value` varchar(2000) DEFAULT NULL COMMENT '语言值',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) DEFAULT NULL COMMENT '创建用户',
  PRIMARY KEY (`id`),
  KEY `idx_org_attr_org_id` (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='公司机构多语言版本';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org_config`
--

DROP TABLE IF EXISTS `sys_org_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org_config` (
  `id` bigint NOT NULL COMMENT '公司配置id',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '配置编码，MapConfig,...',
  `config_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '配置值',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_config_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='公司配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org_group_mapping`
--

DROP TABLE IF EXISTS `sys_org_group_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org_group_mapping` (
  `id` bigint NOT NULL COMMENT '主键',
  `company_id` bigint NOT NULL COMMENT '公司id',
  `resource_group_id` bigint NOT NULL COMMENT '资源组id',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`),
  KEY `idx_org_group_mapping` (`company_id`,`resource_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='公司与资源组的映射关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_org_role`
--

DROP TABLE IF EXISTS `sys_org_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_org_role` (
  `org_id` int NOT NULL COMMENT '机构id',
  `role_id` int NOT NULL COMMENT '角色id',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`org_id`,`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_quota_config`
--

DROP TABLE IF EXISTS `sys_quota_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_quota_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '公司ID',
  `quota_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '配额类型（与词典中保持一致：）',
  `quota_total` bigint NOT NULL COMMENT '配额总量（第一次初始化时设置为100）',
  `quota_child_total` bigint DEFAULT NULL COMMENT '分配给孩子的配额',
  `quota_use` bigint DEFAULT NULL COMMENT '已使用配额',
  `create_at` timestamp NOT NULL COMMENT '创建时间',
  `update_at` timestamp NOT NULL COMMENT '更新时间',
  `update_by` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '最近一次修改者ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `company_id` (`company_id`,`quota_type`)
) ENGINE=InnoDB AUTO_INCREMENT=5427 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_quota_his`
--

DROP TABLE IF EXISTS `sys_quota_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_quota_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `company_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '租户ID',
  `quota_type` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '类型',
  `quota_before_total` bigint NOT NULL COMMENT '配额总量（第一次初始化时设置为100）',
  `quota_after_total` bigint NOT NULL COMMENT '已使用配额',
  `create_at` timestamp NOT NULL COMMENT '创建时间',
  `create_by` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '最近一次修改者ID',
  PRIMARY KEY (`id`),
  KEY `company_id` (`company_id`,`quota_type`)
) ENGINE=InnoDB AUTO_INCREMENT=984 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_quota_template`
--

DROP TABLE IF EXISTS `sys_quota_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_quota_template` (
  `id` bigint NOT NULL COMMENT '主键',
  `quota_template_code` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '配额模板编码',
  `quota_template_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '配额模板名称',
  `quota_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模板配置',
  `is_del` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='公司配额模板表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource`
--

DROP TABLE IF EXISTS `sys_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源标识，菜单类型以 MENU_ 开头，按钮类型以 ACTION_ 开头，接口类型以 API_ 开头',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源名称',
  `icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源图标，针对菜单',
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源描述',
  `type` smallint DEFAULT NULL COMMENT '资源类型，0:菜单，1:按钮',
  `path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源路径',
  `pid` int DEFAULT NULL COMMENT '菜单拥有上级菜单id，按钮的上级id表示菜单的按钮',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `service_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务的id',
  `platform_id` bigint DEFAULT NULL COMMENT '平台服务的的id',
  `order` int DEFAULT NULL COMMENT '展示顺序，值越小，越在前',
  `level` int DEFAULT '1' COMMENT '菜单层级',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1012 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='系统资源表，包括菜单（MENU），按钮（ACTION），接口（API）';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_api`
--

DROP TABLE IF EXISTS `sys_resource_api`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_api` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'api编码，以API_开头',
  `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口名称',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口描述',
  `service_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '服务id',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口路径',
  `request_method` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求方法。POST,GET,DELETE 等',
  `is_open` bit(1) DEFAULT b'0' COMMENT '是否公开，0:内部接口，1:公开接口，可不做权限校验',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0:正常，1:删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4458 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_attr`
--

DROP TABLE IF EXISTS `sys_resource_attr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_attr` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `platform_id` bigint DEFAULT NULL COMMENT '平台id',
  `p_id` int DEFAULT NULL COMMENT '父级资源id',
  `code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码',
  `lang` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '语言标识',
  `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '显示名称',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_dic_item` (`code`,`lang`) COMMENT '语言项唯一标识'
) ENGINE=InnoDB AUTO_INCREMENT=2596 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='字典各语言的属性';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_group`
--

DROP TABLE IF EXISTS `sys_resource_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_group` (
  `id` bigint NOT NULL COMMENT '权限组id',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '权限组编码',
  `name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '资源组名称，多语言',
  `pid` bigint DEFAULT NULL COMMENT '上级id',
  `depends_on` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '依赖的组集合',
  `is_industry_frozen` bit(1) DEFAULT b'0' COMMENT '行业应用是否禁用',
  `is_industry_radio` bit(1) DEFAULT b'0' COMMENT '行业应用是否单选',
  `is_default_check` bit(1) DEFAULT b'0' COMMENT '是否默认选中',
  `is_show` bit(1) DEFAULT b'1' COMMENT '是否显示',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT '1' COMMENT '创建用户id',
  `update_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_resource_group_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='权限组';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_resource_group_template`
--

DROP TABLE IF EXISTS `sys_resource_group_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_resource_group_template` (
  `id` bigint NOT NULL COMMENT '模板id',
  `name` text NOT NULL COMMENT '模板名称格式为{"zh_CN":"","zh_TW":"","en_US":""}',
  `scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'ALL' COMMENT '模板应用范围，GROUP_TEMPLATE_SCOPE_ALL：所有都能使用，GROUP_TEMPLATE_SCOPE_COMPANY：公司使用，GROUP_TEMPLATE_SCOPE_ROLE：角色使用',
  `code` varchar(255) DEFAULT NULL COMMENT '权限模板编码，可为空',
  `group_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '资源组id集合，格式2,3,5,6',
  `is_default` bit(1) DEFAULT b'0' COMMENT '是否是默认模板，默认模板不能删除',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '1' COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '1' COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限组模板';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role`
--

DROP TABLE IF EXISTS `sys_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色标志符',
  `desc` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色描述',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  `show_descendant` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否显示子孙公司数据',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否锁定,0:正常，1:锁定',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志：0:正常，1删除',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `UK_sys_role_company_id_code` (`code`,`company_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role_default`
--

DROP TABLE IF EXISTS `sys_role_default`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role_default` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL COMMENT '角色id',
  `default_type` smallint DEFAULT NULL COMMENT '默认的类型，0:表示游客',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='默认的角色比如游客默认角色';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role_group_mapping`
--

DROP TABLE IF EXISTS `sys_role_group_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role_group_mapping` (
  `id` bigint NOT NULL COMMENT '角色资源组映射id',
  `role_id` bigint NOT NULL COMMENT '角色id',
  `resource_group_id` bigint NOT NULL COMMENT '资源组id',
  `create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建的用户id，oms管理用户id',
  PRIMARY KEY (`id`),
  KEY `idx_role_group` (`role_id`,`resource_group_id`),
  KEY `idx_role_group_group_id` (`resource_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色与资源组映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_role_resource`
--

DROP TABLE IF EXISTS `sys_role_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_role_resource` (
  `role_id` int NOT NULL COMMENT '角色id',
  `resource_id` int NOT NULL COMMENT '资源id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`role_id`,`resource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='仅保存角色和菜单还有角色和按钮的关联关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_solution`
--

DROP TABLE IF EXISTS `sys_solution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_solution` (
  `id` bigint NOT NULL COMMENT '解决方案ID',
  `solution_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '解决方案类型',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '手机号',
  `email` varchar(254) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '反馈时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除 0 未删除  1 删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='解决方案表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_subject_config`
--

DROP TABLE IF EXISTS `sys_subject_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_subject_config` (
  `id` bigint NOT NULL COMMENT '公司配置id',
  `subject_type` int DEFAULT NULL COMMENT '主题类型，0：个人，1：公司',
  `subject_id` bigint DEFAULT NULL COMMENT '主体id，个人id，或者公司id',
  `config_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '配置类型',
  `config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '配置编码，单个主体唯一',
  `config_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '配置值',
  `desc` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否被删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_config_compx_id` (`config_type`,`subject_type`,`subject_id`,`config_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='主题配置表，可用于公司，个人的配置，进配置后拥有该属性';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_supervise_company_code`
--

DROP TABLE IF EXISTS `sys_supervise_company_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_supervise_company_code` (
  `id` bigint NOT NULL COMMENT '主键id',
  `company_id` bigint NOT NULL COMMENT '公司id',
  `temp_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '公司临时编码',
  `expire_time` datetime NOT NULL DEFAULT '2999-12-30 23:59:59' COMMENT '编码过期时间',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_temp_code` (`temp_code`) USING BTREE,
  KEY `idx_code_compant_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='组织编码表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_supervise_user_index`
--

DROP TABLE IF EXISTS `sys_supervise_user_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_supervise_user_index` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='监管用户认证编号表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_supervise_user_mapping`
--

DROP TABLE IF EXISTS `sys_supervise_user_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_supervise_user_mapping` (
  `id` bigint NOT NULL COMMENT 'id',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `company_id` bigint NOT NULL COMMENT '公司id',
  `certification_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '认证状态',
  `certification_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '认证编码',
  `certification_time` datetime DEFAULT NULL COMMENT '认证时间',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户状态',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户',
  `update_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_suav_user_company_id` (`user_id`,`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='c端用户的用户与公司';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_tower_group`
--

DROP TABLE IF EXISTS `sys_tower_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_tower_group` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `group_type` int NOT NULL COMMENT '分组类型 0: 质检组  1: 维修组',
  `group_name` varchar(255) NOT NULL COMMENT '分组名',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除 0 未删除  1已删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(128) DEFAULT NULL COMMENT '创建用户',
  `update_by` varchar(128) DEFAULT NULL COMMENT '更新用户',
  `company_id` int DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='铁塔用户分组表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_tower_user_mapping`
--

DROP TABLE IF EXISTS `sys_tower_user_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_tower_user_mapping` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int NOT NULL COMMENT '用户id',
  `name` varchar(255) NOT NULL COMMENT '用户名',
  `telephone` varchar(255) NOT NULL COMMENT '手机号',
  `company_id` int NOT NULL COMMENT '公司id',
  `status` varchar(255) NOT NULL COMMENT '用户状态',
  `group` varchar(255) DEFAULT NULL COMMENT '分组',
  `province` varchar(255) NOT NULL COMMENT '省名',
  `city` varchar(255) NOT NULL COMMENT '市名',
  `area` varchar(255) NOT NULL COMMENT '区名',
  `start_time` datetime DEFAULT NULL COMMENT '权限起始时间',
  `end_time` datetime DEFAULT NULL COMMENT '权限结束时间',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除 0 未删除  1已删除',
  `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` varchar(128) DEFAULT NULL COMMENT '创建用户',
  `update_by` varchar(128) DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=290 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='铁塔用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user`
--

DROP TABLE IF EXISTS `sys_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `is_system_admin` bit(1) DEFAULT b'0' COMMENT '是否是系统管理员，拥有所有权限1:是，0:否',
  `is_company_admin` bit(1) DEFAULT b'0' COMMENT '公司管理员，创建公司，初始化管理员0:否，1:是',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称',
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户账号',
  `account_md5` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户账号MD5',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户手机号',
  `telephone_md5` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户手机号MD5',
  `email` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户邮箱',
  `email_md5` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户邮箱MD5',
  `avatar` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '用户头像地址',
  `org_id` int DEFAULT NULL COMMENT '用户所属机构id,如果是系统管理员，则机构为空',
  `company_id` int DEFAULT NULL COMMENT '公司id，如果 是系统管理员，公司id为空',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志，0:正常，1:删除',
  `is_frozen` bit(1) DEFAULT b'0' COMMENT '是否冻结，0:正常，1:冻结',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1509 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_flyer`
--

DROP TABLE IF EXISTS `sys_user_flyer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_flyer` (
  `user_id` int NOT NULL COMMENT '用户id',
  `identity_id` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证id',
  `identity_img_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证正面地址',
  `identity_img_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证反面地址',
  `flyer_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行执照编码',
  `verify_status` smallint DEFAULT NULL COMMENT '飞手审核状态，0:申请中，1：审核通过，2:审核未通过',
  `verify_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞手审核说明，未通过原因 ',
  `pilot_license_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行执照正面',
  `pilot_license_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行执照反面',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='飞手用户信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_login`
--

DROP TABLE IF EXISTS `sys_user_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_login` (
  `user_id` int NOT NULL COMMENT '用户id',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登陆id',
  `last_login_time` timestamp NULL DEFAULT NULL COMMENT '最后登陆时间',
  `last_update_pwd_time` datetime DEFAULT NULL COMMENT '最后更新密码时间',
  `need_send_email` tinyint DEFAULT '0' COMMENT '是否需要发送邮件通知密码即将过期 0.正常 1.即将过期未发送通知 2即将过期已通知 3.已过期未发送通知 4.已过期已发送通知',
  `need_send_sms` tinyint DEFAULT '0' COMMENT '是否需要发送短信通知密码即将过期0.正常 1.即将过期未发送通知 2即将过期已通知 3.已过期未发送通知 4.已过期已发送通知',
  `his_pwd` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储最近5次密码',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户最后登陆信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_real_name`
--

DROP TABLE IF EXISTS `sys_user_real_name`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_real_name` (
  `user_id` int NOT NULL COMMENT '用户id',
  `real_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户真实姓名',
  `identity_id` varchar(0) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份编码',
  `identity_type` smallint DEFAULT '0' COMMENT '身份类别，0:身份证，1:护照...',
  `identity_img_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证件正面照',
  `identity_img_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '身份证件反面照',
  `status` smallint DEFAULT '0' COMMENT '身份认证状态，',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户实名认证表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_resource`
--

DROP TABLE IF EXISTS `sys_user_resource`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_resource` (
  `user_id` int NOT NULL COMMENT '用户id',
  `resource_id` int NOT NULL COMMENT '资源id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`,`resource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='保存了用户与菜单，以及用户与按钮的关系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_user_role`
--

DROP TABLE IF EXISTS `sys_user_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user_role` (
  `user_id` int NOT NULL COMMENT '用户id',
  `role_id` int NOT NULL COMMENT '角色id',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`user_id`,`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sys_weak_password`
--

DROP TABLE IF EXISTS `sys_weak_password`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_weak_password` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '弱密码',
  `encode_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '加密后的密码',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `UK_weak_password_password` (`password`) USING BTREE,
  UNIQUE KEY `UK_weak_password_encoder_passwprd` (`encode_password`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10618 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_test`
--

DROP TABLE IF EXISTS `uav_test`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_test` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `count` bigint DEFAULT NULL,
  `score` float DEFAULT NULL,
  `time` timestamp NULL DEFAULT NULL,
  `type` smallint DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_user'
--

--
-- Dumping routines for database 'uav_user'
--

--
-- Current Database: `uav_video_streams`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_video_streams` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_video_streams`;

--
-- Table structure for table `uav_video_records_info`
--

DROP TABLE IF EXISTS `uav_video_records_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_video_records_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `stream_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '视频流ID',
  `record_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'TS切片文件名',
  `start_time` datetime(3) NOT NULL COMMENT 'TS切片开始时间',
  `end_time` datetime(3) NOT NULL COMMENT 'TS切片结束时间',
  PRIMARY KEY (`id`),
  KEY `idx_stream_id` (`stream_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='视频流TS切片信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_video_streams_info`
--

DROP TABLE IF EXISTS `uav_video_streams_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_video_streams_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `stream_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '视频流ID',
  `device_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设配(载荷)ID',
  `stream_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '视频流名称',
  `token` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '鉴权Token',
  `established_time` datetime(3) NOT NULL COMMENT '视频流通道创建时间',
  `ai_tasks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI任务类型',
  `transcode` tinyint DEFAULT NULL COMMENT '是否转码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_stream_index` (`stream_id`) COMMENT 'stream_id 的唯一性'
) ENGINE=InnoDB AUTO_INCREMENT=198 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='视频流信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_video_streams'
--

--
-- Dumping routines for database 'uav_video_streams'
--

--
-- Current Database: `uav_waypoint`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `uav_waypoint` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `uav_waypoint`;

--
-- Table structure for table `air_line_info`
--

DROP TABLE IF EXISTS `air_line_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_line_info` (
  `id` bigint NOT NULL,
  `line_name` varchar(255) NOT NULL COMMENT '航线名称',
  `source_type` int unsigned DEFAULT NULL COMMENT '航线来源',
  `import_time` datetime DEFAULT NULL COMMENT '为KML导入时记录导入的时间',
  `import_user_id` bigint DEFAULT NULL COMMENT '为KML导入时记录导入userId',
  `import_user_name` varchar(255) DEFAULT NULL COMMENT '为KML导入时记录导入者姓名',
  `line_properties` text COMMENT '系统航线的航距设置、航线角度、最大坡度角等属性',
  `strap_buffer` text COMMENT '带状区域底图',
  `area_array` text COMMENT '当为区域航线时区域的坐标',
  `shape_type` int DEFAULT NULL COMMENT '航线形态类型',
  `connection_type` tinyint unsigned DEFAULT '0' COMMENT '航点连接类型（0 普通，1 平滑）',
  `enable_auto_3d_route_plan` tinyint unsigned DEFAULT '0' COMMENT '是否启用三维航线自动规划（0 关闭，1 启用）',
  `completion_action` varchar(1024) DEFAULT NULL COMMENT '航线完成动作',
  `remarks` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
  `org_id` int DEFAULT NULL COMMENT '公司ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '更新人ID',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `air_zone_id` varchar(128) DEFAULT NULL,
  `air_zone` varchar(128) DEFAULT NULL COMMENT '飞行区域',
  `air_zone_lat` decimal(20,7) DEFAULT NULL COMMENT '区域中心点纬度',
  `air_zone_lng` decimal(20,7) DEFAULT NULL COMMENT '区域中心点经度',
  `air_space_id` bigint DEFAULT NULL COMMENT '空域ID',
  `air_space` varchar(40) DEFAULT NULL COMMENT '飞行空域',
  `flyer_name` varchar(128) DEFAULT NULL COMMENT '飞手姓名',
  `flyer_op_time` datetime DEFAULT NULL COMMENT '飞手飞行时间',
  `fly_uav_type` varchar(128) DEFAULT NULL COMMENT '飞手飞行器类型',
  `length` decimal(10,2) DEFAULT NULL COMMENT '路径长度',
  `height_type` int DEFAULT NULL COMMENT '高度类型',
  `height` decimal(3,0) DEFAULT NULL COMMENT '飞行高度',
  `cruising_speed` decimal(3,1) DEFAULT NULL COMMENT '巡航速度',
  `planned_fly_duration` decimal(10,2) DEFAULT NULL COMMENT '预计飞行时间',
  `point_num` int DEFAULT NULL COMMENT '航点数',
  `point_basic_info_mode` int DEFAULT NULL COMMENT '航线基础信息模式',
  `origin_coordinate_type` int DEFAULT NULL COMMENT '原始坐标类型',
  `area` decimal(10,2) DEFAULT NULL COMMENT '区域面积',
  `hangar_model_id` varchar(50) DEFAULT NULL COMMENT '机库机型号ID',
  `hangar_model` varchar(50) DEFAULT NULL COMMENT '机库型号',
  `dev_category` int DEFAULT NULL COMMENT '设备种类',
  `uav_model_id` varchar(50) DEFAULT NULL COMMENT '无人机型号ID',
  `uav_model` varchar(100) DEFAULT NULL COMMENT '无人机型号',
  `load_models` text COMMENT '载荷型号列表',
  `step` int NOT NULL COMMENT '航线创建步数',
  `deleted` int unsigned DEFAULT '0' COMMENT '0保留,1假删除',
  `conn_lost_plan` int DEFAULT '3' COMMENT '断网措施 1: 返航，2:悬停，3：完成剩余航线',
  `reset_camera` int DEFAULT '0' COMMENT '每次航点复位云台， 0 不复位，1 复位',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航线规划基本信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `air_point_info`
--

DROP TABLE IF EXISTS `air_point_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `air_point_info` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sort_number` int DEFAULT NULL COMMENT '航点飞行顺序',
  `air_point_type` int DEFAULT NULL COMMENT '航点类型:1起飞点,2飞行点,3.降落点(终点)',
  `height` decimal(5,1) DEFAULT NULL COMMENT '高度',
  `speed` decimal(3,1) DEFAULT NULL COMMENT '速度',
  `point_image` varchar(255) DEFAULT NULL COMMENT '航点图片',
  `lat` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT 'GCJ-02经度',
  `wlat` decimal(20,7) DEFAULT NULL COMMENT 'WGS84纬度',
  `wlng` decimal(20,7) DEFAULT NULL COMMENT 'WGS84经度',
  `air_line_id` bigint DEFAULT NULL COMMENT '关联的航线id',
  `action_list` text COMMENT '航点动作列表',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_id` bigint DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `modify_id` bigint DEFAULT NULL COMMENT '修改人id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1323836071943243132 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='航点信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_simulation`
--

DROP TABLE IF EXISTS `uav_simulation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_simulation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sim_id` int NOT NULL,
  `type` varchar(100) DEFAULT NULL,
  `target_epsg_code` int DEFAULT NULL,
  `service_type` varchar(100) DEFAULT NULL,
  `layers` text,
  `service_address` varchar(300) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `user_id` varchar(255) DEFAULT NULL COMMENT '用户id',
  `center` varchar(400) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `status` int DEFAULT '0' COMMENT '0未完成；1已完成',
  `station_id` int DEFAULT NULL COMMENT '设计院工参基站id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_station_detail`
--

DROP TABLE IF EXISTS `uav_station_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_station_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `station_id` int DEFAULT NULL COMMENT '工参id',
  `base_station_id` int DEFAULT NULL COMMENT '每个基站id',
  `base_station_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '基站名称',
  `lat` decimal(20,7) DEFAULT NULL COMMENT '纬度',
  `lng` decimal(20,7) DEFAULT NULL COMMENT '经度',
  `direction` int DEFAULT NULL COMMENT '方向角',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='基站详细信息子表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'uav_waypoint'
--

--
-- Dumping routines for database 'uav_waypoint'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-08-19 15:34:20
