-- MySQL dump 10.13  Distrib 8.0.36, for Linux (x86_64)
--
-- Host: 144.7.97.70    Database: cmii
-- ------------------------------------------------------
-- Server version	8.1.0

/*!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 */;


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

USE `cmii_sky_converge`;

--
-- Table structure for table `admin_demand_industry_type`
--

DROP TABLE IF EXISTS `admin_demand_industry_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_demand_industry_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type_name` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT '行业便签类型名称',
  `type_path` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '行业大屏路径。通用行业大屏：/general-screen',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`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 `admin_demand_org`
--

DROP TABLE IF EXISTS `admin_demand_org`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_demand_org` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `org_id` bigint NOT NULL COMMENT '所属管理组织ID',
  `name` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '需求端组织名称',
  `platform_name` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台显示名称',
  `logo` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织Logo',
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '需求端组织编码',
  `description` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `contact_person` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人',
  `contact_phone` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系电话',
  `industry_type` bigint DEFAULT '1' COMMENT '行业类型',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态：0-禁用，1-启用',
  `screen_config` text COLLATE utf8mb4_bin COMMENT '大屏配置信息',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  `enable_push` tinyint(1) DEFAULT '0' COMMENT '是否自动推送',
  `map_center` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织地图定位中心',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_demand_org_pk` (`org_id`,`code`),
  KEY `admin_demand_org_code_index` (`code`),
  KEY `admin_demand_org_status_index` (`status`),
  CONSTRAINT `admin_demand_org_org_fk` FOREIGN KEY (`org_id`) REFERENCES `admin_organization` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='需求端组织表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admin_demand_user_org`
--

DROP TABLE IF EXISTS `admin_demand_user_org`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_demand_user_org` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `demand_org_id` bigint NOT NULL COMMENT '需求组织ID',
  `role` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户在组织中的角色',
  `position` varchar(20) COLLATE utf8mb4_bin DEFAULT '' COMMENT '用户岗位',
  `is_default` tinyint(1) DEFAULT '0' COMMENT '是否默认组织(0:否, 1:是)',
  `join_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '加入组织时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '软删除标记(0:正常, 1:删除)',
  PRIMARY KEY (`id`),
  KEY `idx_default_org` (`user_id`,`is_default`),
  KEY `idx_demand_org_id` (`demand_org_id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_user_org` (`user_id`,`demand_org_id`)
) ENGINE=InnoDB AUTO_INCREMENT=121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户与需求组织关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admin_org_user`
--

DROP TABLE IF EXISTS `admin_org_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_org_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `org_id` bigint NOT NULL COMMENT '组织 ID',
  `user_id` bigint NOT NULL COMMENT '用户 ID',
  `user_type_id` bigint DEFAULT NULL COMMENT '用户类型ID（用于限制登录端）',
  `default_org` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为默认显示组织',
  `role` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '组织角色',
  `create_time` datetime DEFAULT (now()) COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_org_user_pk` (`org_id`,`user_id`),
  KEY `admin_org_user_role_index` (`role`)
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='组织用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admin_organization`
--

DROP TABLE IF EXISTS `admin_organization`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_organization` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '组织名称',
  `platform_name` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台显示名称',
  `logo` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织logo',
  `bind_code` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织绑定码',
  `file_expire_days` int DEFAULT '0' COMMENT '组织存储空间文件过期天数，<=0时不清理',
  `total_storage` bigint DEFAULT '0' COMMENT '组织总存储空间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_admin_organization_pk` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10031 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统组织';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admin_user`
--

DROP TABLE IF EXISTS `admin_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `phone` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户昵称',
  `password` varchar(155) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '密码',
  `avatar` varchar(155) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `password_expire_time` datetime DEFAULT NULL COMMENT '密码过期时间',
  `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_user_pk` (`phone`)
) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统用户';
/*!40101 SET character_set_client = @saved_cs_client */;


insert into admin_user (phone, name, password, password_expire_time, deleted)
values ('4A41D1D00E7E933684262977B4A84610', '2D0331B6AA1AD72EEE3EDDA852737D22', '5771a7060988f2718e4df310946c08d9',  NOW() + INTERVAL 3 MONTH,FALSE);
--
-- Table structure for table `admin_user_type`
--

DROP TABLE IF EXISTS `admin_user_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_user_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type_code` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT '用户类型编码',
  `type_name` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT '用户类型名称',
  `description` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `sort_order` int DEFAULT '0' COMMENT '排序',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_user_type_pk` (`type_code`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admin_user_type_rel`
--

DROP TABLE IF EXISTS `admin_user_type_rel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_user_type_rel` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `user_type_id` bigint NOT NULL COMMENT '用户类型ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_user_type_rel_pk` (`user_id`,`user_type_id`),
  KEY `admin_user_type_rel_type_index` (`user_type_id`),
  CONSTRAINT `admin_user_type_rel_type_fk` FOREIGN KEY (`user_type_id`) REFERENCES `admin_user_type` (`id`),
  CONSTRAINT `admin_user_type_rel_user_fk` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户类型关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_chat_conversation`
--

DROP TABLE IF EXISTS `ai_chat_conversation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_chat_conversation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `conversation_id` varchar(64) NOT NULL COMMENT '会话编号',
  `conversation_title` varchar(128) DEFAULT NULL COMMENT '会话标题',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态[0禁用1启用]',
  `org_id` bigint DEFAULT NULL COMMENT '所属组织id',
  `project_id` bigint DEFAULT NULL COMMENT '所属项目id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int DEFAULT '0' COMMENT '删除标识[0未删除1已删除]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1960625901138980866 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会话历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_chat_conversation_history`
--

DROP TABLE IF EXISTS `ai_chat_conversation_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_chat_conversation_history` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `conversation_id` varchar(64) NOT NULL COMMENT '会话编号',
  `message` json NOT NULL COMMENT '会话内容JSON格式',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态[0禁用1启用]',
  `org_id` bigint DEFAULT NULL COMMENT '所属组织id',
  `project_id` bigint DEFAULT NULL COMMENT '所属项目id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int DEFAULT '0' COMMENT '删除标识[0未删除1已删除]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1961366206997164034 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会话历史表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_detection_config`
--

DROP TABLE IF EXISTS `ai_detection_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_detection_config` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `is_display_prompt` tinyint(1) DEFAULT NULL COMMENT '是否开启画面边缘提示',
  `display_prompt_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '画面边缘提示描述',
  `is_audio_prompt` tinyint(1) DEFAULT NULL COMMENT '是否开启音频提示',
  `audio_prompt_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '音频提示描述',
  `detection_interval_time` int DEFAULT NULL COMMENT '检测间隔时间，范围[1,10]整数',
  `interval_time_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '检测间隔时间描述',
  `project_id` bigint DEFAULT NULL COMMENT '项目id',
  `org_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=235 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='ai检测设置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_model_field`
--

DROP TABLE IF EXISTS `ai_model_field`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_model_field` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `model_id` bigint NOT NULL COMMENT '模型 ID',
  `field_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字段名称',
  `field_label` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '显示名称',
  `local_field` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '本地统一字段',
  `field_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NUMBER' COMMENT '字段类型，NUMBER：数字，STRING：字符串，IMG:图片字段',
  `field_desc` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字段描述',
  `required` tinyint(1) DEFAULT '1' COMMENT '是否必须，默认 1',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='AI识别结果字段配置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_model_info`
--

DROP TABLE IF EXISTS `ai_model_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_model_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `ai_key` varchar(80) COLLATE utf8mb4_bin NOT NULL COMMENT 'AI标识，系统内唯一标识',
  `provider_code` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '供应商编码',
  `model_code` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型编码 - 调用时发送给AI',
  `model_name` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型名称 - AI供应商提供，发送给AI',
  `direction_type` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '识别类型，暂时只支持 COUNT:计数，ACCUMULATION:累计，LAAD：低空探测，PLAIN：仅识别、无业务',
  `display_name` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT 'AI名称，主要提供给前端显示',
  `description` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI描述',
  `prompt` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI模型参数',
  `call_count` bigint DEFAULT '0' COMMENT '调用次数',
  `call_type` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用类型，支持类型：MQ，HTTP（HTTPS），默认为 MQ',
  `call_url` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用地址，使用 HTTP(HTTPS)方式时，需要提供调用地址供 AI 方调用',
  `callback_url` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调地址，让使用 HTTP(HTTPS)方式时，需要提供回调地址供 AI 方上报数据',
  `ai_icon` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI图标',
  `formatter` text COLLATE utf8mb4_bin COMMENT '消息格式化脚本',
  `formatter_code` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '前端映射代码',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `model_type_code` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI模型类型编号',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ai_model_info_ai_key_IDX` (`ai_key`),
  KEY `uniq_model_code` (`model_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1093 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='AI模型信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_model_info_copy1`
--

DROP TABLE IF EXISTS `ai_model_info_copy1`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_model_info_copy1` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `ai_key` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI标识，系统内唯一标识',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '供应商编码',
  `model_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型编码 - 调用时发送给AI',
  `model_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型名称 - AI供应商提供，发送给AI',
  `direction_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '识别类型，暂时只支持 COUNT:计数，ACCUMULATION:累计，LAAD：低空探测，PLAIN：仅识别、无业务',
  `display_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI名称，主要提供给前端显示',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI描述',
  `prompt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI模型参数',
  `call_count` bigint DEFAULT '0' COMMENT '调用次数',
  `call_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用类型，支持类型：MQ，HTTP（HTTPS），默认为 MQ',
  `call_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用地址，使用 HTTP(HTTPS)方式时，需要提供调用地址供 AI 方调用',
  `callback_url` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '回调地址，让使用 HTTP(HTTPS)方式时，需要提供回调地址供 AI 方上报数据',
  `ai_icon` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI图标',
  `formatter` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '消息格式化脚本',
  `formatter_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '前端映射代码',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `model_type_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI模型类型编号',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ai_model_info_ai_key_IDX` (`ai_key`),
  KEY `uniq_model_code` (`model_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1092 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='AI模型信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_model_type`
--

DROP TABLE IF EXISTS `ai_model_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_model_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type_code` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '类型编码',
  `type_name` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '类型名称',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `ai_model_type_code` (`type_code`),
  KEY `ai_model_type_name` (`type_name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='AI类型';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ai_result`
--

DROP TABLE IF EXISTS `ai_result`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ai_result` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ai_result_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '编号',
  `model_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模型 ID',
  `drone_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '无人机SN',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务id',
  `task_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NUMBER' COMMENT '任务类型',
  `result` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '识别结果',
  `detection_time` datetime NOT NULL COMMENT '无人机识别到结果的东八区时间',
  `type` int DEFAULT NULL COMMENT '人工处理或确认结果，如1:有效、0:无效、2:其他结果',
  `remark` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '人工处理备注',
  `flight_image_info_id` bigint unsigned NOT NULL COMMENT '关联flight_image_info表的id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `status` tinyint DEFAULT '1' COMMENT '状态 1：未推送 2：待办结 3：已办结 4：已退回',
  `requirement_id` bigint DEFAULT NULL COMMENT '需求表ID',
  `plan_execute_code` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '计划执行情况编号',
  `push_time` datetime DEFAULT NULL COMMENT '推送时间',
  `push_type` tinyint DEFAULT NULL COMMENT '推送类型 1：二级需求单位 2：运管服单位',
  `push_unit_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '推送单位ID；目前运管服只有一个默认为1',
  `receive_rel_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '接收方内部关联ID',
  `finish_time` datetime DEFAULT NULL COMMENT '办结时间',
  `is_top` tinyint(1) DEFAULT '0' COMMENT '是否置顶',
  `top_time` datetime DEFAULT NULL COMMENT '置顶时间',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`),
  KEY `ai_result_status_IDX` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13399 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='AI识别结果';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `clue_order`
--

DROP TABLE IF EXISTS `clue_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clue_order` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `clue_id` bigint NOT NULL COMMENT '线索ID',
  `order_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '工单编号',
  `order_type` tinyint NOT NULL COMMENT '工单类型 1：内部工单 2：运管服工单',
  `handler_user` bigint DEFAULT NULL COMMENT '内部工单处理人ID',
  `handler_label` bigint DEFAULT NULL,
  `category` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '运管服工单一级分类',
  `sub_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '运管服工单二级分类',
  `status` tinyint NOT NULL COMMENT '工单状态 1：待接单 2：处理中 3：已完成',
  `create_user` bigint NOT NULL COMMENT '派单人ID',
  `create_time` datetime NOT NULL COMMENT '派单时间',
  `handle_time` datetime DEFAULT NULL COMMENT '内部工单接单时间',
  `complete_time` datetime DEFAULT NULL COMMENT '内部工单完成时间',
  `requirement_id` bigint DEFAULT NULL COMMENT '需求表ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `clue_order_category`
--

DROP TABLE IF EXISTS `clue_order_category`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clue_order_category` (
  `category_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '一级分类ID',
  `category_name` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '一级分类名称',
  `sub_category_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '二级分类ID',
  `sub_category_name` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '二级分类名称',
  `remote_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '对应派单接口类型ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `clue_order_result`
--

DROP TABLE IF EXISTS `clue_order_result`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clue_order_result` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `order_id` bigint NOT NULL COMMENT '线索工单ID',
  `image_id` varchar(36) COLLATE utf8mb4_bin NOT NULL COMMENT '线索处理结果图片ID',
  `remark` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `clue_order_result_file`
--

DROP TABLE IF EXISTS `clue_order_result_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `clue_order_result_file` (
  `id` varchar(36) COLLATE utf8mb4_bin NOT NULL,
  `object_name` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '文件名',
  `bucket_name` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '存储桶名',
  `object_path` varchar(256) COLLATE utf8mb4_bin NOT NULL COMMENT '文件存储路径',
  `upload_user` bigint NOT NULL COMMENT '上传用户ID',
  `upload_time` datetime NOT NULL COMMENT '上传时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `construction_site_data_mapping`
--

DROP TABLE IF EXISTS `construction_site_data_mapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `construction_site_data_mapping` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `project_id` bigint NOT NULL COMMENT '工地项目ID（三级项目）',
  `data_type` tinyint NOT NULL COMMENT '数据类型：0-广角照片，1-变焦照片，2-红外照片，3-可见光照片，4-AI检测照片，5-视频，6-全景照片',
  `drone_sn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '无人机序列号（drone_sn，关联device_drone_info表获取无人机名称）',
  `data_id` bigint NOT NULL COMMENT '数据ID（对应flight_image_info表的主键）',
  `data_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '数据名称（冗余字段，便于查询）',
  `org_id` bigint NOT NULL COMMENT '组织ID（数据权限隔离）',
  `creator` bigint DEFAULT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `idx_project_id` (`project_id`),
  KEY `idx_data_type` (`data_type`),
  KEY `idx_org_id` (`org_id`),
  KEY `idx_data_id` (`data_id`),
  KEY `idx_drone_sn` (`drone_sn`)
) ENGINE=InnoDB AUTO_INCREMENT=1249 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工地数据关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `construction_site_import_log`
--

DROP TABLE IF EXISTS `construction_site_import_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `construction_site_import_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `batch_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '批次号',
  `org_id` bigint NOT NULL COMMENT '组织ID',
  `import_user` bigint NOT NULL COMMENT '导入人ID',
  `total_count` int DEFAULT '0' COMMENT '总数量',
  `success_count` int DEFAULT '0' COMMENT '成功数量',
  `fail_count` int DEFAULT '0' COMMENT '失败数量',
  `fail_file_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '失败数据文件下载地址',
  `import_status` tinyint DEFAULT '0' COMMENT '导入状态：0-进行中，1-完成，2-失败',
  `error_message` text COLLATE utf8mb4_unicode_ci COMMENT '错误信息',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `idx_batch_no` (`batch_no`),
  KEY `idx_org_id` (`org_id`),
  KEY `idx_import_user` (`import_user`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工地导入记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `construction_site_project`
--

DROP TABLE IF EXISTS `construction_site_project`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `construction_site_project` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `project_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '项目编号（全局唯一）',
  `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '项目名称',
  `project_level` tinyint NOT NULL DEFAULT '3' COMMENT '项目层级：1-一级项目，2-二级项目，3-三级项目',
  `parent_id` bigint DEFAULT NULL COMMENT '父项目ID（一级项目为空，二级项目指向一级项目，三级项目指向二级项目）',
  `project_status` tinyint DEFAULT '1' COMMENT '项目状态：0-完工，1-在建（仅三级项目有效）',
  `jurisdiction_area` text COLLATE utf8mb4_unicode_ci COMMENT '管辖范围区域（GeoJSON格式，仅三级项目有值）',
  `jurisdiction_wkt` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '管辖范围区域（wkt格式，仅三级项目有值）',
  `area_color` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '#1890ff' COMMENT '区域颜色（仅三级项目有效）',
  `construction_unit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '建设单位（参建单位）',
  `org_id` bigint NOT NULL COMMENT '组织ID（数据权限隔离）',
  `creator` bigint NOT NULL COMMENT '创建人ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识（逻辑删除）',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_org_project_code` (`org_id`,`project_code`),
  KEY `idx_org_id` (`org_id`),
  KEY `idx_parent_id` (`parent_id`),
  KEY `idx_project_level` (`project_level`),
  KEY `idx_create_time` (`create_time`),
  KEY `idx_construction_unit` (`construction_unit`)
) ENGINE=InnoDB AUTO_INCREMENT=750 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工地项目表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_dock_info`
--

DROP TABLE IF EXISTS `device_dock_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_dock_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备SN',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '机库名称',
  `manufacturer` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '生产厂家',
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '机库型号',
  `online_status` tinyint(1) DEFAULT '0' COMMENT '在线状态:0:在线；1:离线',
  `auto_stream` tinyint(1) DEFAULT '1' COMMENT '是否自动开启视频流:0:不开启；1:开启',
  `project_id` bigint DEFAULT NULL COMMENT '分配的项目',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `bind_type` tinyint(1) DEFAULT NULL COMMENT '绑定类型 1：新建无人机绑定 2：已建无人机绑定 3：不绑定',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `xt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '预留扩展',
  `sn_unique` bigint DEFAULT '0' COMMENT '和sn组合区别唯一校验，数据未删除时为0，删除后为id',
  `power_on_time` datetime DEFAULT NULL COMMENT '机库开机时间',
  `offline_gps` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '机库离线位置信息',
  PRIMARY KEY (`id`),
  UNIQUE KEY `dock_sn_unique` (`sn`,`sn_unique`) USING BTREE COMMENT '''机库sn唯一索引'''
) ENGINE=InnoDB AUTO_INCREMENT=10238 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='机库信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_dock_video_info`
--

DROP TABLE IF EXISTS `device_dock_video_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_dock_video_info` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '视频流ID',
  `dock_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '机库sn',
  `video_index` int NOT NULL COMMENT '摄像头位置顺序对应序号',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '摄像头名称',
  `mode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流模式:MANUAL 手动,AUTO自动',
  `push_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '推流地址（在手动必填，在自动实时获取）',
  `pull_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '拉流地址（在手动必填，在自动实时获取）',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='机库摄像头信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_drone_dock`
--

DROP TABLE IF EXISTS `device_drone_dock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_drone_dock` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `drone_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机sn',
  `dock_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '机库sn',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `extra` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '扩展字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `drone_dock_uniqe` (`drone_sn`,`dock_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2027198017286647811 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机机库关联表;';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_drone_info`
--

DROP TABLE IF EXISTS `device_drone_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_drone_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备 SN',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `manufacturer` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '厂家',
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机型号',
  `online_status` tinyint(1) DEFAULT '0' COMMENT '在线状态:0:在线；1:离线',
  `hub_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联网方式哈勃终端',
  `rc_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联网方式遥控器sn',
  `aviator_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联网方式飞行家APPsn',
  `project_id` bigint DEFAULT NULL COMMENT '分配的项目id',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `xt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '预留扩展',
  `sn_unique` bigint DEFAULT '0' COMMENT '和sn组合区别唯一校验，数据未删除时为0，删除后为id',
  `power_on_time` datetime DEFAULT NULL COMMENT '无人机开机时间',
  `offline_gps` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '无人机离线位置信息',
  PRIMARY KEY (`id`),
  UNIQUE KEY `drone_sn_uniqe` (`sn`,`sn_unique`) USING BTREE COMMENT '''无人机sn唯一索引'''
) ENGINE=InnoDB AUTO_INCREMENT=10392 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_log_manager`
--

DROP TABLE IF EXISTS `device_log_manager`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_log_manager` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `file_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件在Storage里面的id',
  `boot_index` int NOT NULL COMMENT '文件索引',
  `device_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '设备序列号',
  `module` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '日志设备类型，0-飞行器，3-机场',
  `device_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '设备类型：DOCK/DRONE',
  `log_start_time` datetime NOT NULL COMMENT '日志开始时间',
  `log_end_time` datetime NOT NULL COMMENT '日志结束时间',
  `upload_finish_time` datetime DEFAULT NULL COMMENT '日志上传完成时间',
  `log_size` bigint DEFAULT NULL COMMENT '日志文件大小（B）',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '日志文件名',
  `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '日志上传状态',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='设备日志文件管理';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_payload_info`
--

DROP TABLE IF EXISTS `device_payload_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_payload_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '载荷ID',
  `drone_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机sn',
  `payload_index` int NOT NULL COMMENT '载荷位置,0=FRONT_LEFT,1=FRONT_RIGHT,2=TOP,7=FPV',
  `payload_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '载荷类型:(Camera:摄像头、Megaphone:喊话器、GasDetector:气体检测仪)',
  `payload_sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '载荷sn',
  `payload_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '载荷名称',
  `manufacturer` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '厂家',
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '型号',
  `video_mode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '视频流模式:MANUAL 手动,AUTO自动',
  `push_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '推流地址（在手动必填，在自动实时获取）',
  `pull_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '拉流地址（在手动必填，在自动实时获取）',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=602 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='载荷信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `device_stream`
--

DROP TABLE IF EXISTS `device_stream`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_stream` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `stream_type` varchar(12) DEFAULT NULL COMMENT '流分类',
  `device_sn` varchar(100) DEFAULT NULL COMMENT '设备SN',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
  `remark` varchar(64) DEFAULT NULL COMMENT '备注',
  `stream_id` varchar(64) DEFAULT NULL COMMENT '视频流ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_device_sn` (`device_sn`),
  KEY `idx_stream_id` (`stream_id`),
  KEY `idx_device_sn_pid` (`device_sn`,`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6912 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='设备流信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `drone_line_info`
--

DROP TABLE IF EXISTS `drone_line_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `drone_line_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `multi_flight_item_id` bigint DEFAULT NULL COMMENT '多机飞行任务管理任务id',
  `drone_id` bigint DEFAULT NULL COMMENT '无人机id',
  `wayline_id` bigint DEFAULT NULL COMMENT '飞行航线id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机航线信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fence_area`
--

DROP TABLE IF EXISTS `fence_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fence_area` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `org_id` bigint NOT NULL COMMENT '组织ID',
  `fence_name` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工作区名称',
  `fence_type` int DEFAULT NULL COMMENT '工作区类型  1--AI工作区',
  `state` int DEFAULT NULL COMMENT '启用状态 0--禁用 1--启用',
  `ref_latitude` double(32,6) NOT NULL COMMENT '参考点纬度',
  `ref_longitude` double(32,6) NOT NULL COMMENT '参考点经度',
  `points` text COLLATE utf8mb4_bin NOT NULL COMMENT '工作区范围',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  `color_code` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '围栏颜色色号',
  PRIMARY KEY (`id`),
  KEY `fence_area_fence_name_index` (`fence_name`),
  KEY `fence_area_org_id_index` (`org_id`)
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工作区主表（电子围栏）';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fence_work_segment`
--

DROP TABLE IF EXISTS `fence_work_segment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fence_work_segment` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `fence_id` bigint NOT NULL COMMENT '工作区id',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `work_type` int NOT NULL DEFAULT '1' COMMENT '类型 1--全天 2--时间段',
  `start_time` time NOT NULL COMMENT '开始时间',
  `end_time` time NOT NULL COMMENT '结束时间',
  `ai_keys` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'ai模型列表',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `fence_work_segment_fence_id_index` (`fence_id`)
) ENGINE=InnoDB AUTO_INCREMENT=141 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工作区工作段';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `firmware`
--

DROP TABLE IF EXISTS `firmware`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `firmware` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '固件id',
  `model` varchar(150) NOT NULL COMMENT '固件型号',
  `product_version` varchar(25) DEFAULT NULL COMMENT '固件版本',
  `file_name` varchar(150) NOT NULL COMMENT '固件文件名称',
  `file_id` varchar(50) NOT NULL DEFAULT '' COMMENT '固件文件ID',
  `md5` varchar(60) DEFAULT NULL COMMENT '固件文件MD5',
  `type` tinyint(1) DEFAULT '1' COMMENT '设备基本类型，0为无人机，1为机库',
  `file_size` bigint DEFAULT '0' COMMENT '固件文件大小',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='固件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_image`
--

DROP TABLE IF EXISTS `flight_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_image` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `drone_sn` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '无人机sn',
  `filename` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '文件名',
  `size` bigint DEFAULT NULL COMMENT '文件大小',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `start_time` datetime DEFAULT NULL COMMENT '视频开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '视频结束时间',
  `pinned` tinyint(1) DEFAULT '0',
  `sort` int DEFAULT NULL COMMENT '排序',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `parent_id` bigint DEFAULT '0' COMMENT '父ID',
  `path` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '路径',
  `org_id` bigint DEFAULT NULL,
  `deleted` bigint DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13563 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='飞行影像表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_image_graffiti`
--

DROP TABLE IF EXISTS `flight_image_graffiti`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_image_graffiti` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `image_info_id` bigint DEFAULT NULL COMMENT '照片信息ID',
  `color` varchar(30) DEFAULT NULL COMMENT '颜色',
  `label_name` varchar(30) DEFAULT NULL COMMENT '标签名称',
  `type` tinyint(1) DEFAULT '1' COMMENT '标签类型,1-矩形，2-圆形等',
  `data` text COMMENT '标注坐标数据',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `creator_id` bigint DEFAULT NULL COMMENT '创建者ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`),
  KEY `flight_image_graffiti_image_info_id_IDX` (`image_info_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8mb3 COMMENT='照片标注信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_image_info`
--

DROP TABLE IF EXISTS `flight_image_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_image_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `drone_sn` varchar(200) DEFAULT NULL COMMENT '无人机sn',
  `filename` varchar(1000) DEFAULT NULL COMMENT '文件名',
  `object_id` varchar(1000) DEFAULT NULL COMMENT '文件ID',
  `flight_image_id` bigint DEFAULT NULL COMMENT '影像文件夹ID',
  `size` bigint DEFAULT NULL COMMENT '文件大小',
  `type` varchar(20) DEFAULT NULL COMMENT '文件类型',
  `file_type` int DEFAULT NULL COMMENT '文件类型 (0-广角照片、1-变焦照片、2-红外照片、3-可见光照片、4-AI检测照片、5-视频)',
  `media_type` tinyint DEFAULT '0' COMMENT '媒体类型 0-照片 1-视频',
  `is_load` tinyint(1) DEFAULT '0' COMMENT '是否在地图上加载, 0 不加载, 1 加载',
  `is_show` tinyint(1) DEFAULT '1' COMMENT '是否显示在地图上, 0 不显示, 1 显示',
  `extra` text COMMENT '额外信息，type 类型为图片时，存放经纬度和位置信息，为视频时存放视频开始时间和结束时间',
  `created_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '照片或视频实际创建时间',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `thumbnail` varchar(200) DEFAULT NULL COMMENT '缩略图',
  `org_id` bigint DEFAULT NULL COMMENT '组织ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`),
  KEY `idx_flight_image_id` (`flight_image_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15802 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='影像信息表';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection  = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`k8s_admin`@`%`*/ /*!50003 TRIGGER `after_flight_image_info_update` AFTER UPDATE ON `flight_image_info` FOR EACH ROW BEGIN
    -- 检查文件名是否变更（重命名）
    IF NEW.filename <> OLD.filename THEN
        UPDATE flight_image 
        SET update_time = NOW()
        WHERE id = NEW.flight_image_id;
    END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `flight_record`
--

DROP TABLE IF EXISTS `flight_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_record` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `drone_sn` varchar(200) DEFAULT NULL COMMENT '无人机sn',
  `drone_name` varchar(1000) DEFAULT NULL COMMENT '无人机名称',
  `image_count` bigint DEFAULT NULL COMMENT '影像张数',
  `total_count` bigint DEFAULT '0' COMMENT '影像总张数',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态 0-进行中 1-已完成',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `duration` bigint DEFAULT '0' COMMENT '视频时长',
  `total_distance` bigint DEFAULT NULL COMMENT '飞行距离',
  `flight_image_id` bigint DEFAULT NULL COMMENT '影像文件夹ID',
  `extra` text COMMENT '开始及结束经纬度信息',
  `video_id` varchar(32) DEFAULT NULL COMMENT '录制视频ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  `org_id` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_flight_image_id` (`flight_image_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13547 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='飞行记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_record_video`
--

DROP TABLE IF EXISTS `flight_record_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_record_video` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `flight_record_id` bigint NOT NULL COMMENT '飞行记录ID',
  `flight_video_id` bigint NOT NULL COMMENT '回放视频 ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11975 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='飞行记录回放视频关联表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_record_way_line`
--

DROP TABLE IF EXISTS `flight_record_way_line`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_record_way_line` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `flight_record_id` bigint NOT NULL COMMENT '飞行记录ID',
  `way_line_id` bigint NOT NULL COMMENT '航线ID',
  `flight_id` varchar(20) DEFAULT NULL COMMENT ' 任务ID',
  `project_id` bigint NOT NULL COMMENT '项目ID',
  `his_way_line_ver` varchar(50) DEFAULT NULL COMMENT '历史航线版本',
  `status` tinyint(1) DEFAULT NULL COMMENT '航线执行状态 0-未执行 1-已执行',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3077 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='飞行记录关联航线表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `flight_video`
--

DROP TABLE IF EXISTS `flight_video`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `flight_video` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `drone_sn` varchar(200) DEFAULT NULL COMMENT '无人机sn',
  `stream` varchar(100) DEFAULT NULL COMMENT '流名称',
  `filename` varchar(1000) DEFAULT NULL COMMENT '文件名',
  `type` int DEFAULT '0' COMMENT '视频类型 0-无人机回放视频 1-AI检测视频',
  `object_id` varchar(1000) DEFAULT NULL COMMENT '文件ID',
  `size` bigint DEFAULT NULL COMMENT '文件大小',
  `start_time` datetime DEFAULT NULL COMMENT '视频开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '视频结束时间',
  `video_time` bigint DEFAULT NULL COMMENT '视频时长',
  `extra` varchar(200) DEFAULT NULL COMMENT '扩展字段',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `org_id` bigint DEFAULT NULL COMMENT '组织ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12098 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='影像回放视频表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_model_info`
--

DROP TABLE IF EXISTS `gis_model_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_model_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模型名称',
  `type` int DEFAULT NULL COMMENT '模型类型， 2：二维，3：三维',
  `format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模型格式',
  `size` bigint DEFAULT NULL COMMENT '模型文件大小',
  `bucket_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '桶名称',
  `file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '对象路径',
  `expansion` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '二维模型的边界',
  `published` tinyint NOT NULL DEFAULT '0' COMMENT '发布状态',
  `display` tinyint NOT NULL DEFAULT '1' COMMENT '是否显示',
  `org_id` bigint DEFAULT NULL COMMENT '组织 ID',
  `project_id` bigint DEFAULT NULL COMMENT '项目 ID',
  `sort` tinyint DEFAULT NULL COMMENT '排序',
  `storage_type` int DEFAULT '1' COMMENT '存储类型， 1：原始上传文件，2：复制分享文件复制',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  `status` tinyint DEFAULT '0' COMMENT '模型重建状态,0:导入成功 1:重建成功 2:重建中 3:等待中 4:重建失败 5:已取消',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=178 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='地理模型信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gis_model_rebuild`
--

DROP TABLE IF EXISTS `gis_model_rebuild`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gis_model_rebuild` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `gis_id` bigint NOT NULL COMMENT 'gis ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模型类型',
  `total` bigint DEFAULT NULL COMMENT '照片数量',
  `photo_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '重建照片信息',
  `rebuild_rate` bigint DEFAULT '0' COMMENT '重建比例',
  `resolution` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分辨率和速度 medium、high、ultra',
  `simple_ratio` double(10,2) DEFAULT '0.20' COMMENT '模型简化率 ',
  `task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务id',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='gis模型重建信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `label`
--

DROP TABLE IF EXISTS `label`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `label` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `label_name` varchar(20) COLLATE utf8mb4_bin NOT NULL,
  `demand_org_id` bigint NOT NULL,
  `deleted` tinyint NOT NULL DEFAULT '0',
  `create_user` bigint NOT NULL,
  `create_time` datetime NOT NULL,
  `update_user` bigint DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `label_user`
--

DROP TABLE IF EXISTS `label_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `label_user` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `label_id` bigint NOT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mq_log`
--

DROP TABLE IF EXISTS `mq_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mq_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `topic` varchar(200) DEFAULT NULL COMMENT '主题',
  `message` varchar(1000) DEFAULT NULL COMMENT '消息体',
  `error_msg` varchar(1000) DEFAULT NULL COMMENT '异常消息',
  `type` varchar(32) DEFAULT NULL COMMENT '消息类型',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='mq日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_send`
--

DROP TABLE IF EXISTS `msg_send`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_send` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `msg_tpl_id` bigint NOT NULL COMMENT '模板Id',
  `level` varchar(10) NOT NULL COMMENT '层级：org-组织级，project-项目级，user-用户级',
  `tpl_type` varchar(12) NOT NULL COMMENT '模板类型：sms-短信，webmsg-站内信，email-邮件',
  `receiver_id` bigint NOT NULL COMMENT '接收方Id，与level关联，orgId或projectId或userId',
  `msg_title` varchar(200) DEFAULT NULL COMMENT '标题（模板标题）',
  `msg_content` text NOT NULL COMMENT '消息内容',
  `remark` varchar(256) DEFAULT NULL COMMENT '消息备注',
  `deleted` tinyint NOT NULL COMMENT '删除标志：0-存在，1-删除',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通知公告表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_send_user`
--

DROP TABLE IF EXISTS `msg_send_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_send_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `msg_tpl_id` bigint NOT NULL COMMENT '模板Id',
  `msg_id` bigint NOT NULL COMMENT '消息Id',
  `level` varchar(10) NOT NULL COMMENT '层级：org-组织级，project-项目级，user-用户级',
  `tpl_type` varchar(12) NOT NULL COMMENT '模板类型：sms-短信，webmsg-站内信，email-邮件',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `title` varchar(128) DEFAULT NULL COMMENT '消息标题',
  `content` text NOT NULL COMMENT '消息内容',
  `emergency` tinyint DEFAULT NULL COMMENT '紧急消息：0-普通消息，1-紧急消息',
  `send_status` tinyint DEFAULT NULL COMMENT '是否发送，1-发送，0-未发送',
  `read_status` tinyint(1) NOT NULL COMMENT '是否已读：1-已读，0-未读',
  `read_time` datetime DEFAULT NULL COMMENT '用户查看时间',
  `deleted` tinyint NOT NULL COMMENT '删除标志：0-存在，1-删除',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通知公告-推送-用户表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `msg_template`
--

DROP TABLE IF EXISTS `msg_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `msg_template` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `level` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '层级：org-组织级，project-项目级，user-用户级',
  `tpl_type` varchar(12) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '模板类型：sms-短信，webmsg-站内信，email-邮件',
  `tpl_name` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '模板名称',
  `tpl_title` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '模板标题',
  `tpl_content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '模板内容',
  `lang_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '语言类型：US-英文，CN-中文',
  `notice_type` varchar(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT 'sys' COMMENT '通知类型：sys-系统通知，biz-业务通知',
  `emergency` tinyint DEFAULT '1' COMMENT '紧急消息：0-普通消息，1-紧急消息',
  `remark` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '模版备注',
  `deleted` tinyint NOT NULL COMMENT '删除标志：0-存在，1-删除',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通知公告模板表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `multi_flight_item`
--

DROP TABLE IF EXISTS `multi_flight_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `multi_flight_item` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务名称',
  `project_id` bigint DEFAULT NULL COMMENT '项目id',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint DEFAULT NULL COMMENT '删除标志：0-存在，1-删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='多机飞行任务表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `operation_log`
--

DROP TABLE IF EXISTS `operation_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operation_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `drone_sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备SN',
  `gateway_sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '网关SN',
  `device_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备类型：无人机，机库',
  `code` int DEFAULT NULL COMMENT '日志编码：0为操作通用成功，其余问题日志编码按实际业务产生，不固定',
  `type` int DEFAULT NULL COMMENT '日志信息类型：如HMS告警日志',
  `source` int DEFAULT NULL COMMENT '来源，例：地面站，机库，蜂窝网',
  `log_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '具体业务消息',
  `log_time` bigint DEFAULT NULL COMMENT '时间戳',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=283 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='单机监视日志信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `password_history`
--

DROP TABLE IF EXISTS `password_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_history` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `phone` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户昵称',
  `password` varchar(155) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '密码',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  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 `plan_execute_his`
--

DROP TABLE IF EXISTS `plan_execute_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `plan_execute_his` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `plan_execute_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '计划执行编号',
  `plan_id` bigint NOT NULL COMMENT '计划ID',
  `execute_time` datetime NOT NULL COMMENT '执行时间',
  `state` int unsigned NOT NULL COMMENT '执行状态 1:执行中，2:完成，3:部分执行，4:失败',
  `dock_sn` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '机场SN',
  `drone_sn` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机sn',
  `flight_record_id` bigint DEFAULT NULL COMMENT '飞行记录 ID',
  `pic_number` int unsigned DEFAULT NULL COMMENT '影像数量',
  `reason` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '原因',
  `order_id` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'order_id',
  `requirement_id` bigint DEFAULT NULL COMMENT '需求表ID',
  PRIMARY KEY (`id`),
  KEY `fk_execute_plan_id` (`plan_id` DESC),
  KEY `idx_execute_time` (`execute_time` DESC),
  KEY `idx_flight_record_id` (`flight_record_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2370 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='计划执行情况';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `plan_info`
--

DROP TABLE IF EXISTS `plan_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `plan_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `requirement_id` bigint DEFAULT NULL COMMENT '需求表ID',
  `name` varchar(30) COLLATE utf8mb4_bin NOT NULL COMMENT '计划名称',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `type` tinyint unsigned NOT NULL COMMENT '计划策略 1:立即执行 2:单次执行 3:重复执行',
  `once_time` datetime DEFAULT NULL COMMENT '立即执行/单次执行的预计执行时间',
  `start_time` date DEFAULT NULL COMMENT '计划开始日期',
  `end_time` date DEFAULT NULL COMMENT '计划结束日期',
  `execute_time` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '执行时间',
  `repeat_frequency` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '重复频率',
  `line_id` bigint NOT NULL COMMENT '航线 ID',
  `version_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '航线版本 ID',
  `dock_sn` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '机场 SN',
  `drone_sn` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机 SN',
  `return_height` double unsigned DEFAULT NULL COMMENT '返航高度',
  `ai_models` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'AI模型',
  `enabled` tinyint NOT NULL DEFAULT '1' COMMENT '是否启用',
  `task_num` int DEFAULT NULL COMMENT '任务总次数',
  `last_execute_time` datetime DEFAULT NULL COMMENT '最后执行时间',
  `finished` tinyint NOT NULL DEFAULT '0' COMMENT '是否已完成',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `idx_plan_create_time` (`create_time` DESC),
  KEY `idx_plan_end_time` (`end_time`),
  KEY `idx_plan_start_time` (`start_time`)
) ENGINE=InnoDB AUTO_INCREMENT=470 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='飞行计划';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `plan_repeat_info`
--

DROP TABLE IF EXISTS `plan_repeat_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `plan_repeat_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `plan_id` bigint NOT NULL COMMENT '计划ID',
  `weekday` tinyint unsigned NOT NULL COMMENT '执行时间 1:周一 2:周二 3:周三 4:周四 5:周五 6:周六 7:周天',
  `execute_time` time NOT NULL COMMENT '执行时间',
  `type` int DEFAULT '1' COMMENT '日期类型 --1:day of week,2:day of mouth',
  PRIMARY KEY (`id`),
  KEY `fk_repeat_plan_id` (`plan_id` DESC),
  KEY `idx_repeat_week` (`weekday`)
) ENGINE=InnoDB AUTO_INCREMENT=2029391405917593603 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='计划重复信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `platform_info`
--

DROP TABLE IF EXISTS `platform_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `platform_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `platform_name` varchar(150) COLLATE utf8mb4_bin NOT NULL COMMENT '应用名称',
  `org_id` bigint NOT NULL COMMENT '归属组织',
  `project_ids` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目列表',
  `client_id` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用id',
  `client_secret` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用密钥',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_platform_info_client` (`client_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='三方应用信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `poi_info`
--

DROP TABLE IF EXISTS `poi_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `poi_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `poi_type` bigint DEFAULT NULL COMMENT 'poi类型  poi_type的id',
  `poi_name` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'POI名称',
  `is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
  `poi_latitude` double NOT NULL COMMENT '标注纬度',
  `poi_longitude` double NOT NULL COMMENT '标注经度',
  `ref_address` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '参考地点（前端传递，没传不存）',
  `remark` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注信息',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `poi_info_poi_name_index` (`poi_name`),
  KEY `poi_info_poi_type_index` (`poi_type`)
) ENGINE=InnoDB AUTO_INCREMENT=1635 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='poi地图标注';
/*!40101 SET character_set_client = @saved_cs_client */;

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

DROP TABLE IF EXISTS `poi_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `poi_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type_name` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT '类型名称',
  `poi_icon` varchar(150) COLLATE utf8mb4_bin NOT NULL COMMENT '类型图标',
  `bucket` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图标存放桶',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`),
  KEY `poi_type_org_id_index` (`org_id`),
  KEY `poi_type_type_name_index` (`type_name`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='poi标注类型';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `project_ai_model_info`
--

DROP TABLE IF EXISTS `project_ai_model_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `project_ai_model_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `project_id` bigint NOT NULL COMMENT '项目 ID',
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模型类型',
  `model_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模型名称',
  `sort` int NOT NULL COMMENT '排序字段',
  `extra` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型扩展信息，比如阈值等',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6301 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目已添加模型信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `project_device_ai_setting`
--

DROP TABLE IF EXISTS `project_device_ai_setting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `project_device_ai_setting` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `project_id` bigint NOT NULL COMMENT '项目 ID',
  `sn` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备SN',
  `model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '模型',
  `extra` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模型扩展信息，比如阈值等',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目设备AI模型扩展参数';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `project_info`
--

DROP TABLE IF EXISTS `project_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `project_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `project_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '项目名称',
  `creator` bigint DEFAULT NULL COMMENT '创建人id',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `center_longitude` double(32,6) DEFAULT NULL COMMENT '中心点经度',
  `center_latitude` double(32,6) DEFAULT NULL COMMENT '中心点纬度',
  `zoom` int DEFAULT NULL COMMENT '地图放大倍数',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10127 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目管理表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `project_member`
--

DROP TABLE IF EXISTS `project_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `project_member` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '用户id',
  `user_permission` int NOT NULL COMMENT '0:可管理，1:可编辑，2：可查看',
  `project_id` bigint DEFAULT NULL COMMENT '项目id',
  `org_id` bigint DEFAULT NULL COMMENT '项目组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10496 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目关联的成员表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `requirement`
--

DROP TABLE IF EXISTS `requirement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `requirement` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `requirement_number` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '需求编号',
  `requirement_name` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '需求名称',
  `requirement_type` tinyint NOT NULL COMMENT '需求类型 1：常规需求 2：紧急需求',
  `task_strategy` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务策略，常规需求属性，immediately: 立即 single: 单次定时, repeat: 重复定时',
  `execute_time` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '常规需求属性，单次定时任务执行时间',
  `execute_start_time` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '常规需求属性，重复定时任务开始执行日期',
  `execute_end_time` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '常规需求属性，重复定时任务截止执行日期',
  `repeat_frequency` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '常规需求属性，重复定时任务执行频率，多个以“,”分隔',
  `task_area_desc` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '常规需求任务区域描述',
  `task_area` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '紧急需求属性，任务执行区域',
  `longitude` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '紧急需求属性，任务执行区域经度',
  `latitude` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '紧急需求属性，任务执行区域纬度',
  `detection_target` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '''AI检测目标，多个目标以“,”分隔',
  `remark` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注信息',
  `contact_person` varchar(155) COLLATE utf8mb4_bin NOT NULL COMMENT '需求联系人',
  `contact_mobile` varchar(155) COLLATE utf8mb4_bin NOT NULL COMMENT '需求联系人电话',
  `affiliated_unit` bigint NOT NULL COMMENT '需求归属单位',
  `status` tinyint NOT NULL COMMENT '需求状态，1：待受理 2：已受理 3：已完成 4：已退回',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `org_id` bigint DEFAULT NULL,
  `alert_notice_realtime` tinyint DEFAULT '0' COMMENT '是否需要实时通知预警事件 0：否 1：是',
  `airline_points` text COLLATE utf8mb4_bin COMMENT '航点坐标集',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_requirement_number` (`requirement_number`)
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `requirement_process`
--

DROP TABLE IF EXISTS `requirement_process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `requirement_process` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `requirement_id` bigint NOT NULL COMMENT '需求ID',
  `operate_type` varchar(10) COLLATE utf8mb4_bin NOT NULL COMMENT '操作类型，create：需求创建 modify：需求修改 accept：需求受理 complete：需求完成 back：需求退回',
  `operate_user` bigint NOT NULL COMMENT '操作用户ID',
  `operate_time` datetime NOT NULL COMMENT '操作时间',
  `back_reason` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '退回原因',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=266 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `requirement_regular_task_area`
--

DROP TABLE IF EXISTS `requirement_regular_task_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `requirement_regular_task_area` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `requirement_id` bigint NOT NULL COMMENT '需求ID',
  `area_id` bigint NOT NULL COMMENT '任务区域ID',
  `area_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务区域名称',
  `detection_target` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'AI检测目标，多个目标以“,”分隔',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `speaker_his_info`
--

DROP TABLE IF EXISTS `speaker_his_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `speaker_his_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `drone_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机sn',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件名',
  `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '文本内容',
  `type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文字类型：HIS-最近历史喊话，SET-常用喊话设置',
  `md5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件内容的MD5校验和，用作唯一标识',
  `sort` int DEFAULT NULL COMMENT '排序字段',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `org_id` bigint DEFAULT NULL COMMENT '组织ID',
  `deleted` tinyint NOT NULL COMMENT '删除标识',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='无人机喊话历史信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage_object`
--

DROP TABLE IF EXISTS `storage_object`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `storage_object` (
  `id` varchar(32) NOT NULL COMMENT '文件UUID',
  `drone_sn` varchar(150) NOT NULL COMMENT '设备sn',
  `object_name` varchar(1000) NOT NULL COMMENT '文件名',
  `type` int DEFAULT '0' COMMENT '文件类型 0--图片，1--视频，2--gis，3--日志，4--其他',
  `object_size` bigint DEFAULT '0' COMMENT '大小，默认 单位为byte字节',
  `object_format` varchar(10) DEFAULT NULL COMMENT '格式',
  `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称',
  `object_path` varchar(1000) DEFAULT NULL COMMENT '对象路径 日期/项目/类型/对象ID.对象类型 20201104/234234/234/2234.jpg',
  `object_md5` varchar(255) DEFAULT NULL COMMENT '文件md5',
  `thumbnail_path` varchar(255) DEFAULT NULL COMMENT '缩略图路径',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `extra` varchar(1000) DEFAULT NULL COMMENT '扩展 备注/时长 测试/150s',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sn` (`drone_sn`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='文件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage_object_device`
--

DROP TABLE IF EXISTS `storage_object_device`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `storage_object_device` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `object_id` varchar(150) NOT NULL COMMENT '文件ID',
  `drone_model` varchar(150) DEFAULT NULL COMMENT '拍摄的无人机型号',
  `payload_model` varchar(150) DEFAULT NULL COMMENT '拍摄的载荷型号',
  `is_original` tinyint(1) DEFAULT '0' COMMENT '是否为原图 1 是',
  `flight_id` varchar(100) DEFAULT NULL COMMENT '任务ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `object_id` (`object_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2197 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='文件额外设备信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage_object_media`
--

DROP TABLE IF EXISTS `storage_object_media`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `storage_object_media` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `object_id` varchar(150) NOT NULL COMMENT '文件ID',
  `absolute_altitude` double DEFAULT NULL COMMENT '拍摄绝对高度',
  `create_time` datetime DEFAULT NULL COMMENT '媒体拍摄时间',
  `gimbal_yaw_degree` double DEFAULT NULL COMMENT '云台偏航角',
  `latitude` double DEFAULT NULL COMMENT '拍摄经度',
  `longitude` double DEFAULT NULL COMMENT '拍摄纬度',
  `relative_altitude` double DEFAULT NULL COMMENT '拍摄相对高度',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `object_id` (`object_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15831 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='文件额外元信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage_object_tus`
--

DROP TABLE IF EXISTS `storage_object_tus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `storage_object_tus` (
  `id` varchar(32) NOT NULL COMMENT '文件UUID',
  `drone_sn` varchar(150) DEFAULT NULL COMMENT '设备sn',
  `object_name` varchar(1000) NOT NULL COMMENT '文件名',
  `object_size` mediumtext COMMENT '大小，默认 单位为byte字节',
  `offset_size` mediumtext COMMENT '已上传文件大小，默认 单位为byte字节',
  `object_format` varchar(10) DEFAULT NULL COMMENT '格式',
  `temp_path` varchar(1000) DEFAULT NULL COMMENT '临时对象路径 日期/类型/对象ID.对象类型 20201104/234/22374.jpg',
  `final_path` varchar(1000) DEFAULT NULL COMMENT '对象路径 日期/项目/类型/对象ID.对象类型 20201104/234234/234/2234.jpg',
  `temp_path_prefix` varchar(1000) DEFAULT NULL COMMENT '临时对象路径前缀 20201104/234/',
  `status` tinyint(1) DEFAULT '0' COMMENT '上传状态 0：上传中 1：上传成功 2：上传失败 3：取消上传',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `extra` varchar(1000) DEFAULT NULL COMMENT '扩展 时长 150s',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sn` (`drone_sn`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='tus文件信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage_object_type`
--

DROP TABLE IF EXISTS `storage_object_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `storage_object_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '业务类型',
  `max_size` int NOT NULL COMMENT '最大文件大小',
  `type_limit` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '文件类型限制',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='文件类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Temporary view structure for view `storage_space_view`
--

DROP TABLE IF EXISTS `storage_space_view`;
/*!50001 DROP VIEW IF EXISTS `storage_space_view`*/;
SET @saved_cs_client     = @@character_set_client;
/*!50503 SET character_set_client = utf8mb4 */;
/*!50001 CREATE VIEW `storage_space_view` AS SELECT 
 1 AS `org_id`,
 1 AS `project_id`,
 1 AS `total_size`,
 1 AS `type`*/;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `sur_speaker_record`
--

DROP TABLE IF EXISTS `sur_speaker_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sur_speaker_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(255) DEFAULT NULL COMMENT '录音记录名称',
  `type` varchar(50) DEFAULT 'pcm' COMMENT '录音记录类型(pcm:default=音频pcm格式文件)',
  `file_name` varchar(255) DEFAULT NULL COMMENT '录音文件名称',
  `object_id` varchar(255) DEFAULT NULL COMMENT '录音文件id',
  `duration` int DEFAULT NULL COMMENT '录音时长',
  `project_id` bigint DEFAULT NULL COMMENT '分配项目',
  `org_id` bigint DEFAULT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除标识',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='说话人录音记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `surveillance_log`
--

DROP TABLE IF EXISTS `surveillance_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `surveillance_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '日志ID',
  `drone_id` bigint DEFAULT NULL COMMENT '无人机ID',
  `dock_id` bigint DEFAULT NULL COMMENT '机库ID或网关ID',
  `org_id` bigint NOT NULL COMMENT '组织ID',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `user_id` bigint DEFAULT NULL COMMENT '用户ID',
  `log_module` varchar(50) NOT NULL COMMENT '日志模块 surveillance',
  `log_mark` varchar(20) NOT NULL COMMENT '日志标记',
  `data` text COMMENT '日志数据(JSON格式)',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1246 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='飞行监视日志表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `third_device_stream`
--

DROP TABLE IF EXISTS `third_device_stream`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `third_device_stream` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `device_sn` varchar(50) DEFAULT NULL COMMENT '设备sn',
  `device_name` varchar(50) DEFAULT NULL COMMENT '设备名称',
  `status` tinyint(1) DEFAULT '0' COMMENT '视频流状态:1 有视频流,0 无视频流',
  `mode` varchar(10) DEFAULT NULL COMMENT '视频流模式:MANUAL 手动,AUTO自动',
  `push_url` varchar(1000) DEFAULT NULL COMMENT '推流地址（在手动必填，在自动实时获取）',
  `pull_url` varchar(1000) DEFAULT NULL COMMENT '拉流地址（在手动必填，在自动实时获取）',
  `project_id` bigint DEFAULT NULL COMMENT '项目ID',
  `org_id` bigint DEFAULT NULL COMMENT '组织ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `deleted` bigint DEFAULT '0' COMMENT '删除标识：非0 删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='三方设备流信息表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `way_line`
--

DROP TABLE IF EXISTS `way_line`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `way_line` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `version_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '版本号,新建和更新的时候变更,使用uuid',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '航线名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `drone_model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机型号',
  `payload_models` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '载荷型号和位置信息列表',
  `way_line_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '航线属性参数',
  `one_way_line` mediumtext COLLATE utf8mb4_bin NOT NULL COMMENT '一条航线信息',
  `kmz_file_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件id, 存储管理返回的',
  `kmz_file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件在minio的路径',
  `kmz_file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件名',
  `deleted` tinyint NOT NULL COMMENT '删除标识',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `template_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板类型',
  `start_point` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '航线的首点',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1559 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `way_line_ai`
--

DROP TABLE IF EXISTS `way_line_ai`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `way_line_ai` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `way_line_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '航线ID(历史ID）',
  `ai_enable` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'AI检测开关状态',
  `ai_segments` text COLLATE utf8mb4_bin COMMENT 'AI检测航段',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1458 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='航线AI配置信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `way_line_history`
--

DROP TABLE IF EXISTS `way_line_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `way_line_history` (
  `version_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '版本号,新建和更新的时候变更,使用uuid',
  `source_id` bigint NOT NULL COMMENT '源航线id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '航线名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '描述',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `drone_model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机型号',
  `payload_models` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '载荷型号和位置信息列表',
  `way_line_params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '航线属性参数',
  `one_way_line` mediumtext COLLATE utf8mb4_bin NOT NULL COMMENT '一条航线信息',
  `kmz_file_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件id, 存储管理返回的',
  `kmz_file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件在minio的路径',
  `kmz_file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件名',
  `deleted` tinyint NOT NULL COMMENT '删除标识',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `template_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板类型',
  `start_point` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '航线的首点',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `way_line_photo`
--

DROP TABLE IF EXISTS `way_line_photo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `way_line_photo` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `way_line_id` bigint NOT NULL COMMENT '航线ID',
  `version_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '航线版本ID',
  `template_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '航线类型',
  `flight_id` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT ' 任务ID',
  `mapping_param` text COLLATE utf8mb4_bin COMMENT '航线正射/斜射参数',
  `collection_time` datetime DEFAULT NULL COMMENT '照片采集时间',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' 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 `way_line_top_sort`
--

DROP TABLE IF EXISTS `way_line_top_sort`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `way_line_top_sort` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `way_line_id` bigint NOT NULL COMMENT '航线id',
  `project_id` bigint NOT NULL COMMENT '项目id',
  `org_id` bigint NOT NULL COMMENT '组织id',
  `drone_id` bigint DEFAULT NULL COMMENT '无人机id',
  `sorted` bigint NOT NULL COMMENT '排序字段',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1606 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin 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 COMMENT='弱密码表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `work_order_info`
--

DROP TABLE IF EXISTS `work_order_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `work_order_info` (
  `id` bigint NOT NULL COMMENT '工单 ID',
  `name` varchar(30) COLLATE utf8mb4_bin NOT NULL COMMENT '工单需求名称',
  `priority` tinyint unsigned NOT NULL COMMENT '紧急程度：1-紧急 2-高 3-中 4-低',
  `order_type` tinyint unsigned NOT NULL COMMENT '任务策略：1-立即 2-定时 3-重复定时',
  `task_type` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '任务类型：0-拍照 1-视频 2-全景 3-正射 4-三维间',
  `repeat_frequency` tinyint unsigned DEFAULT NULL COMMENT '重复频率：1-日 2-周 3-月（orderType=3时必填）期',
  `days` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '重复执行日期• 周：1-7（周一至周日• 月：日期(1-31) 或 "周次,星期"（如"2,3"表示第2周周期',
  `execute_time` char(150) COLLATE utf8mb4_bin NOT NULL COMMENT '执行时间',
  `start_time` date NOT NULL COMMENT '开始日期',
  `end_time` date DEFAULT NULL COMMENT '结束日期',
  `execute_org_name` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '运营单位名称',
  `ai_type_list` text COLLATE utf8mb4_bin COMMENT '算法选择列表',
  `detection` text COLLATE utf8mb4_bin COMMENT '检测内容描述',
  `remark` text COLLATE utf8mb4_bin COMMENT '工单备注',
  `mark_info` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '航点信息(JSON字符)',
  `type` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '地理类型：Point/LineString/Polygon',
  `geo_data` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '区域信息(GeoJSON格式)',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '工单状态：1-未接单 /2-未开始 /3-进行中/4- 已完成/-1-退回',
  `plan_id` bigint DEFAULT NULL COMMENT '计划ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
  `source` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_plan_id` (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工单需求';
/*!40101 SET character_set_client = @saved_cs_client */;


-- Dump completed on 2026-03-05 15:05:57
