-- MySQL dump 10.13  Distrib 8.0.37, for Linux (x86_64)
--
-- Host: localhost    Database: cmii_material_warehouse
-- ------------------------------------------------------
-- Server version	8.0.37

/*!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.002703', MASTER_LOG_POS=336207296;


--
-- 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=1111 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消费者编码',
  `business` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '业务',
  `purpose` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用途',
  `contact_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人名称',
  `contact_phone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人电话',
  `mqtt_user` varchar(100) CHARACTER SET utf8mb4 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`
--

DROP TABLE IF EXISTS `bridge_device`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_device` (
  `id` bigint NOT NULL COMMENT 'id',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备提供方编码',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备提供方名称',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备在提供方系统的唯一id',
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备名称',
  `device_longitude` double DEFAULT NULL COMMENT '设备经度',
  `device_latitude` double DEFAULT NULL COMMENT '设备纬度',
  `device_altitude` float DEFAULT NULL COMMENT '设备海拔高度',
  `device_local_altitude` double DEFAULT NULL COMMENT '设备所在地面海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `work_state` int DEFAULT '0' COMMENT '设备工作状态 -1：离线，0:未工作,1：工作中,2:设备异常',
  `extension` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展信息',
  `function` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '功能能力',
  `pid` bigint DEFAULT NULL COMMENT '针对察打一体设备，非察打设备子设备，一律为null，是察打子设备，表示上级察打设备的id',
  `level` int DEFAULT '0' COMMENT '设备的等级，0：表示主设备，1：表示子设备，主要针对察打一体设备',
  `source` int DEFAULT NULL COMMENT '来源(0: 系统添加  1: bridge同步)',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `device_height` float DEFAULT NULL COMMENT '设备对地高度',
  `ping_time` datetime DEFAULT NULL COMMENT 'ping时间',
  PRIMARY KEY (`id`),
  KEY `idx_device_pid` (`pid`,`is_del`),
  KEY `idx_device_compId` (`provider_code`,`device_type`,`device_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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备提供方编码;每类设备接入平台时，由平台统一分配',
  `device_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备id;每台设备接入时，需提供该设备ID',
  `device_name` varchar(255) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 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_mqtt_info`
--

DROP TABLE IF EXISTS `bridge_device_mqtt_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_device_mqtt_info` (
  `id` bigint NOT NULL COMMENT '序列',
  `provider_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '设备提供商id',
  `device_type` int DEFAULT NULL COMMENT '设备类型;0、5G-A基站，1、合作无人机，2、监管无人机，3、RemoteID无人机，4、雷达设备，5、频谱设备，6、光电设备，7、反制设备，8、诱骗设备，9、干扰设备，10、指挥车，11、察打一体，999、其他设备',
  `mqtt_user` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT账号名',
  `mqtt_password` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT密码',
  `topic` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT的topic;设备的topic 为：\r\n设备本身参数数据的Topic,bridge/{provider_code}/device/${device_type}/{deviceId},\r\n设备实时数据的Topic，bridge/{provider_code}/device_data/${device_type}/{deviceId}',
  `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='设备topic相关信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bridge_device_pool`
--

DROP TABLE IF EXISTS `bridge_device_pool`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_device_pool` (
  `id` bigint NOT NULL COMMENT 'id',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备提供方编码',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备提供方名称',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备在提供方系统的唯一id',
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备名称',
  `device_longitude` double DEFAULT NULL COMMENT '设备经度',
  `device_latitude` double DEFAULT NULL COMMENT '设备纬度',
  `device_altitude` float DEFAULT NULL COMMENT '设备海拔高度',
  `device_local_altitude` double DEFAULT NULL COMMENT '设备所在地面海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `work_state` int DEFAULT '0' COMMENT '设备工作状态 0:未工作,1：工作中,2:设备异常',
  `extension` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展信息',
  `function` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '功能能力',
  `pid` bigint DEFAULT NULL COMMENT '针对察打一体设备，非察打设备子设备，一律为null，是察打子设备，表示上级察打设备的id',
  `level` int DEFAULT '0' COMMENT '设备的等级，0：表示主设备，1：表示子设备，主要针对察打一体设备',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `device_height` float DEFAULT NULL COMMENT '设备对地高度',
  PRIMARY KEY (`id`),
  KEY `idx_device_id_index` (`provider_code`,`device_id`,`device_type`),
  KEY `idx_device_pid` (`pid`,`is_del`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='bridge同步的设备信息，未添加至设备监管员的设备列表';
/*!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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '提供方名称',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '提供商编码',
  `mqtt_user` varchar(100) CHARACTER SET utf8mb4 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_statistic`
--

DROP TABLE IF EXISTS `bridge_statistic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bridge_statistic` (
  `id` bigint NOT NULL COMMENT 'id',
  `topic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '数据的来源或去处',
  `point` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '统计指标点',
  `dimension` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '统计维度，deviceId/objectId...',
  `dimension_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '统计维度值：{deviceId}/{objectId}',
  `count` bigint DEFAULT NULL COMMENT '总数',
  `success_delay` bigint DEFAULT NULL COMMENT '总延迟',
  `min_delay` bigint DEFAULT NULL COMMENT '最低延迟',
  `max_delay` bigint DEFAULT NULL COMMENT '最大延迟',
  `success_count` bigint DEFAULT NULL COMMENT '成功总数，发布有成功与失败，订阅只有成功',
  `failure_count` bigint DEFAULT NULL COMMENT '失败总数',
  `time` datetime(6) DEFAULT NULL COMMENT '统计时间',
  PRIMARY KEY (`id`),
  KEY `idx_statistic_comp_id` (`topic`,`point`,`dimension`,`dimension_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='bridge统计表';
/*!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_bin 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机唯一识别码',
  `imei` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'imei',
  `sn` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'sn',
  `imsi` varchar(100) CHARACTER SET utf8mb4 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 AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='epc验证表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `external_uav_detect_data`
--

DROP TABLE IF EXISTS `external_uav_detect_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `external_uav_detect_data` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `type` varchar(100) NOT NULL COMMENT '数据类型：detect-轨迹；nofly-预警")',
  `param` json DEFAULT NULL COMMENT '参数体',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  PRIMARY KEY (`id`),
  KEY `idx_external_uav_detect_data_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='无人机轨迹预测历史表';
/*!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=194 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=483 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 AUTO_INCREMENT=25 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=61 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=296 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=298 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=892 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=386 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` mediumtext 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=3842 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=596 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=23 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '法人姓名',
  `fnumber` varchar(128) CHARACTER SET utf8mb4 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=31 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=48 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 `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) COLLATE utf8mb4_bin NOT NULL COMMENT '告警ID',
  `camera_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头ID',
  `thumbnail_file_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '缩略图文件ID',
  `alarm_time` datetime DEFAULT NULL COMMENT '告警时间',
  `ai_type` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '目标类型：bird、drone',
  `bird` int DEFAULT NULL COMMENT '探测目标数量',
  `drone` int DEFAULT NULL COMMENT '探测目标数量',
  `file_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件ID',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除,0:否，1:是',
  `company_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`)
) 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_defense_zone`
--

DROP TABLE IF EXISTS `regulator_defense_zone`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_defense_zone` (
  `id` bigint NOT NULL COMMENT '主键id',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '防区名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '核心区域',
  `is_fusion` bit(1) DEFAULT NULL COMMENT '是否融和',
  `upper_height` decimal(10,0) DEFAULT NULL COMMENT '防区最高高度',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0：未删除，1:删除',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `handling_area` text COLLATE utf8mb4_bin COMMENT '处置区域',
  `warning_area` text COLLATE utf8mb4_bin COMMENT '预警区域',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `extension` text COLLATE utf8mb4_bin COMMENT '防区扩展字段',
  `guard_mode` int DEFAULT '0' COMMENT '值守模式（0-人工值守，1-无人值守）',
  `ground_altitude` double 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 `regulator_defense_zone_choose`
--

DROP TABLE IF EXISTS `regulator_defense_zone_choose`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_defense_zone_choose` (
  `id` bigint NOT NULL COMMENT '主键',
  `defense_zone_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '防区id集合',
  `regulator_id` bigint NOT 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 `regulator_defense_zone_device_mapping`
--

DROP TABLE IF EXISTS `regulator_defense_zone_device_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_defense_zone_device_mapping` (
  `id` bigint NOT NULL COMMENT '主键id',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `device_id` bigint NOT NULL COMMENT '设备主键id，',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `induce_type` int DEFAULT NULL COMMENT '诱骗类型(0-方向诱骗，1-角度诱骗,2-轨迹诱骗，3-位置诱骗,4-模式诱骗，5-导航屏蔽, 6-停止诱骗)',
  `induce_direction` int DEFAULT NULL COMMENT '诱骗策略参数（0-正北、1-正东、2-正南、3-正西、4-东北、5-东南、6-西南、7-西北）',
  `interfere_mode` int DEFAULT NULL COMMENT '干扰模式(1-驱离模式、2-迫降模式)',
  `frequency` text COLLATE utf8mb4_bin COMMENT '频段设置（0-1.5G，1-2.4G, 2-5.8G, 3-840M）',
  `induce_angle` int DEFAULT NULL COMMENT '诱骗角度(0-360)',
  `induce_track_type` int DEFAULT NULL COMMENT '诱骗轨迹类型，0-原地盘旋',
  `location_induce_type` int DEFAULT NULL COMMENT '位置诱骗类型(0-迫降)',
  `induce_latitude` double DEFAULT NULL COMMENT '诱骗纬度',
  `induce_longitude` double DEFAULT NULL COMMENT '诱骗经度',
  `mode_induce_type` int DEFAULT NULL COMMENT '模式诱骗类型(1-向外驱离、2-向内拉近)',
  `interfere_time` int DEFAULT NULL COMMENT '干扰时长(10-300)',
  PRIMARY KEY (`id`),
  KEY `idx_defense_zone_id` (`defense_zone_id`) COMMENT '防区id索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='防区与设备id的映射表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_defense_zone_mapping`
--

DROP TABLE IF EXISTS `regulator_defense_zone_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_defense_zone_mapping` (
  `id` bigint NOT NULL COMMENT '主键',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `regulator_id` bigint NOT NULL COMMENT '监管员id',
  `is_owner` bit(1) DEFAULT b'0' COMMENT '是否是防区创建者，0：否，1：是',
  `permission` int DEFAULT NULL COMMENT '1:查看，2：修改，4：控制，8：控制',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_rdz_mapping` (`defense_zone_id`,`regulator_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='监管员防区授权表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_defense_zone_strategy`
--

DROP TABLE IF EXISTS `regulator_defense_zone_strategy`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_defense_zone_strategy` (
  `id` bigint NOT NULL COMMENT '主键id',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `defense_type` int DEFAULT NULL COMMENT '防区类型（0：核心区，1：处置区，2：预警区）',
  `sms_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '闯入短信通知：接收人',
  `notice_time` int DEFAULT '10' COMMENT '系统提示音(1-10000)',
  `device_ids` text COLLATE utf8mb4_bin COMMENT '无人值守设备id集合',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='防区策略表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `regulator_detection_configure_info`
--

DROP TABLE IF EXISTS `regulator_detection_configure_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_detection_configure_info` (
  `id` bigint NOT NULL COMMENT '主键id',
  `ref_lat` decimal(20,7) DEFAULT NULL COMMENT '参考点02纬度',
  `ref_lng` decimal(20,7) DEFAULT NULL COMMENT '参考点02经度',
  `ref_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '参考点84纬度',
  `ref_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '参考点84经度',
  `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 '更新时间',
  `deleted` bit(1) DEFAULT b'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 `regulator_detection_statistic`
--

DROP TABLE IF EXISTS `regulator_detection_statistic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_detection_statistic` (
  `id` bigint NOT NULL COMMENT '主键id',
  `device_comp_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备组合id',
  `provider_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '提供商编码',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `device_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '设备id',
  `dimension` int DEFAULT NULL COMMENT '统计纬度，0：全部，1：年，2：月，3：周，4：日',
  `dimension_value` int DEFAULT NULL COMMENT '统计纬度值',
  `total` int DEFAULT NULL COMMENT '统计值',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_device_comp_id` (`device_comp_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 `regulator_detection_track`
--

DROP TABLE IF EXISTS `regulator_detection_track`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_detection_track` (
  `id` bigint NOT NULL COMMENT '主键id',
  `device_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备id',
  `provider_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '提供商编码',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `track_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT 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_0900_ai_ci 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_radiomap`
--

DROP TABLE IF EXISTS `regulator_radiomap`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_radiomap` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `create_at` date DEFAULT NULL COMMENT '创建时间',
  `Longitude` double DEFAULT NULL COMMENT '经度',
  `Latitude` double DEFAULT NULL COMMENT '纬度',
  `height` double DEFAULT NULL COMMENT '高度',
  `value` double DEFAULT NULL COMMENT 'RSRP信号值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70197 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='Radiomap数据';
/*!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 `regulator_warning_instance`
--

DROP TABLE IF EXISTS `regulator_warning_instance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `regulator_warning_instance` (
  `id` bigint NOT NULL COMMENT '监管警情表',
  `regulator_defense_zone_id` bigint DEFAULT NULL COMMENT '监管防区id',
  `uav_model` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发现无人机型号',
  `uav_sn` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发现无人机SN',
  `uav_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机地址',
  `identity` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '产品唯一识别码',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `pilot_lon` double DEFAULT NULL COMMENT '飞手经度',
  `pilot_lat` double DEFAULT NULL COMMENT '飞手纬度',
  `pilot_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞手地址',
  `height` double DEFAULT NULL COMMENT '高度',
  `telephone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '通知手机号',
  `is_del` int NOT NULL DEFAULT '0' COMMENT '用户是否被删除，0：否，1：删除',
  `send_flag` int DEFAULT NULL COMMENT '是否发送成功，0失败，1:成功',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户',
  PRIMARY KEY (`id`),
  KEY `idx_warning_instance_createBy` (`create_by`) /*!80000 INVISIBLE */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin 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) CHARACTER SET utf8mb4 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) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分类',
  `type_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '类型编号',
  `type_name` varchar(255) 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 `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_bin DEFAULT NULL COMMENT '无人机唯一产品识别码',
  `verify_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '校验码',
  `code_type` int DEFAULT NULL COMMENT '识别码类型 0: 识别码  1: 序列号',
  `imei` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '国际移动设备识别码',
  `imsi` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '国际移动用户识别码',
  `sn` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '终端设备号',
  `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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品类别',
  `product_type` varchar(100) CHARACTER SET utf8mb4 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: --)',
  `failed_type` int DEFAULT NULL COMMENT '失败原因(0: SIM卡号错误  1: SN错误  2: 都错)',
  `device_cert_status` int DEFAULT NULL COMMENT '设备证书状态(0: 未激活  1: 激活 2: 失败)',
  `device_sim_status` int DEFAULT NULL COMMENT '设备SIM状态(0: 未激活  1: 激活 2: 失败)',
  `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: 删除',
  `online_at` datetime DEFAULT NULL COMMENT '最近激活时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='无人机注册表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `uav_sec_alarm_event`
--

DROP TABLE IF EXISTS `uav_sec_alarm_event`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `uav_sec_alarm_event` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警ID',
  `alarm_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警类型',
  `alarm_object` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警对象',
  `alarm_content` varchar(200) NOT NULL COMMENT '告警内容【指令名称、对象名称】',
  `alarm_start_time` timestamp(3) NOT NULL COMMENT '告警时间',
  `alarm_state` int NOT NULL DEFAULT '0' COMMENT '告警状态: 0进行中，1已解除',
  `report_time` timestamp(3) NULL DEFAULT NULL COMMENT '上报时间',
  `wrong_report` int NOT NULL DEFAULT '0' COMMENT '处理结果: 0否，1是',
  `alarm_end_time` timestamp(3) NULL DEFAULT NULL COMMENT '告警结束时间',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_id` (`alarm_id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_type` (`alarm_type`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_object` (`alarm_object`) 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 `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 AUTO_INCREMENT=7 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=8061319 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=2359059 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: `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 '是否是数据(探测目标)',
  `provider_code` varchar(100) DEFAULT NULL COMMENT '提供商编号',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  PRIMARY KEY (`id`),
  KEY `username_idx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=168 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=176 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: `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=15 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=84999 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=1315 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=3990 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=5063 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=26 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=135599 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=35957 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'
--


/*!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 2025-03-17 17:25:43
