use uav_alarm;
CREATE TABLE `uav_sec_alarm` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '安全告警配置列表',
  `notice_way` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '通知方式列表',
  `notice_object` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '通知对象列表',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_uav_sec_alarm_alarm_type` (`alarm_type`) USING BTREE,
  KEY `idx_uav_sec_alarm_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='安全告警配置表';
use uav_alarm;
CREATE TABLE `uav_sec_alarm_event` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警ID',
  `alarm_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警类型',
  `alarm_object` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警对象',
  `alarm_content` varchar(200) NOT NULL COMMENT '告警内容【指令名称、对象名称】',
  `alarm_start_time` timestamp(3) NOT NULL COMMENT '告警时间',
  `alarm_state` int NOT NULL DEFAULT '0' COMMENT '告警状态: 0进行中，1已解除',
  `cmd_state` int DEFAULT NULL COMMENT '处置情况: 0处置中，1已处置',
  `report_time` timestamp(3) NULL DEFAULT NULL COMMENT '上报时间',
  `handle_state` int DEFAULT NULL COMMENT '处理结果: 0未上报，1上报，2误报，-1忽略，-2处置',
  `alarm_end_time` timestamp(3) NULL DEFAULT NULL COMMENT '告警结束时间',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
  `company_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属公司/机构',
  `def_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建用户',
  `def_date` timestamp(3) NOT NULL COMMENT '创建时间',
  `upd_usr_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '修改用户',
  `upd_date` timestamp(3) NOT NULL COMMENT '更新时间',
  `admin_handle_state` int NOT NULL DEFAULT '0' COMMENT 'oms处理: 0未解除，1已解除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_id` (`alarm_id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_object` (`alarm_object`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_company_id` (`company_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='安全告警事件表';
use uav_emergency;
CREATE TABLE `duty` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `leader` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '领导',
  `workers` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '成员',
  `task` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '对接事宜',
  `duty_date` date DEFAULT NULL COMMENT '值班日期',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志  0 未删除  1 删除',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` datetime DEFAULT NULL COMMENT '编辑时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='排班表';
use uav_emergency;
CREATE TABLE `duty_count` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '人员id',
  `year` int DEFAULT NULL COMMENT '年',
  `quarter` int DEFAULT NULL COMMENT '季度',
  `duty_id` int NOT NULL COMMENT '关联排班表',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='统计表';
use uav_emergency;
CREATE TABLE `duty_detail` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `duty_id` int NOT NULL COMMENT '关联排班表',
  `area` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '值班地点',
  `work` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '日报',
  `file` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '附件',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志  0 未删除  1 删除',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` datetime DEFAULT NULL COMMENT '编辑时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  `file_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '附件名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='日报表';
use uav_emergency;
CREATE TABLE `em_event` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '事件名称',
  `type` int NOT NULL COMMENT '事件类型(0: 地震、1: 山火、2: 洪涝、3: 泥石流)',
  `time` datetime NOT NULL COMMENT '发生时间',
  `leader_id` int DEFAULT NULL COMMENT '负责人ID',
  `leader` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '负责人',
  `phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '手机号',
  `year` int DEFAULT NULL COMMENT '年份',
  `status` int NOT NULL COMMENT '事件状态(0: 未完成，1: 处理中，2: 已完成)',
  `area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '地点',
  `records` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '关联飞行记录',
  `point` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '经纬度',
  `desc` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '事件描述',
  `files` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '附件',
  `company_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司id',
  `source` int DEFAULT '0' COMMENT '来源0:系统 1:手机',
  `is_del` bit(1) DEFAULT b'0' COMMENT '删除标志  0 未删除  1 删除',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `update_at` datetime DEFAULT NULL COMMENT '编辑时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  `spoint` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '救援点',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='应急事件管理';
use uav_emergency;
CREATE TABLE `emergency_plane_status` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uas_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机ID',
  `company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户ID',
  `station_sn` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站编号',
  `mission_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业ID',
  `mission_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '作业名称',
  `scene_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '场景名称',
  `plane_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机名称',
  `plane_model` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机类型',
  `start_job_time` datetime DEFAULT NULL COMMENT '开始作业时间',
  `stop_job_time` datetime DEFAULT NULL COMMENT '停止作业时间',
  `status` tinyint DEFAULT NULL COMMENT '当前状态。 0.已开启  1.已关闭',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_uas_id` (`uas_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='无人机通信作业状态';
use uav_industrial_portfolio;
CREATE TABLE `bridge_device` (
  `id` bigint NOT NULL COMMENT 'id',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方编码',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方名称',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备在提供方系统的唯一id',
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备名称',
  `device_longitude` double DEFAULT NULL COMMENT '设备经度',
  `device_latitude` double DEFAULT NULL COMMENT '设备纬度',
  `device_altitude` float DEFAULT NULL COMMENT '设备海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `work_state` int DEFAULT '0' COMMENT '设备工作状态 -1：离线，0:未工作,1：工作中,2:设备异常',
  `extension` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展信息',
  `function` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '功能能力',
  `source` int DEFAULT NULL COMMENT '来源(0: 系统添加  1: bridge同步)',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `ping_time` datetime DEFAULT NULL COMMENT 'ping时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备维护表';
use uav_industrial_portfolio;
CREATE TABLE `civil_military_alarm_his` (
  `id` bigint NOT NULL COMMENT '告警id',
  `aerocraft_type` int DEFAULT NULL COMMENT '飞行器类型，0：云平台无人机，1：基站探测到的飞行器',
  `aerocraft_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行器id',
  `area_type` int DEFAULT NULL COMMENT '告警的区域类型，0：规划区域告警，1：基站探测区域告警',
  `order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '飞行编号，仅无人机使用',
  `radar_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '基站雷达id，基站告警使用',
  `target_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '探测到的目标类型',
  `event` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '入侵事件，闯入：INTRUDE',
  `status` int DEFAULT NULL COMMENT '告警状态：0：告警中，1:告警结束',
  `company_id` bigint DEFAULT NULL COMMENT '公司id',
  `begin_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `end_type` int DEFAULT NULL COMMENT '结束类型，0：自动结束，1：手动结束',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id，如果是触发则为空',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='通感告警历史记录';
use uav_industrial_portfolio;
CREATE TABLE `violation_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `label` int DEFAULT NULL COMMENT '1 发现垃圾， 2 违停占用 ，3 人员入侵',
  `address` varchar(254) DEFAULT NULL COMMENT '记录地址,用户输入',
  `dealt` int DEFAULT '0' COMMENT '是否处理 0 为处理,1 已处理,null 是没有处理',
  `image_file_id` varchar(255) DEFAULT NULL COMMENT '视频截图文件id',
  `latitude02` double DEFAULT NULL COMMENT '截图的纬度02',
  `longitude02` double DEFAULT NULL COMMENT '截图的经度02',
  `altitude` double DEFAULT NULL COMMENT '截图的海拔高度',
  `latitude84` double DEFAULT NULL COMMENT '截图的纬度84',
  `longitude84` double DEFAULT NULL COMMENT '截图的经度84',
  `company_id` int NOT NULL COMMENT '公司id',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '0 未删除 1 删除',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='违规记录表';
use uav_lifecycle;
CREATE TABLE `bridge_device` (
  `id` bigint NOT NULL COMMENT 'id',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方编码',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方名称',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备在提供方系统的唯一id',
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备名称',
  `device_longitude` double DEFAULT NULL COMMENT '设备经度',
  `device_latitude` double DEFAULT NULL COMMENT '设备纬度',
  `device_altitude` float DEFAULT NULL COMMENT '设备海拔高度',
  `device_local_altitude` double DEFAULT NULL COMMENT '设备所在地面海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `work_state` int DEFAULT '0' COMMENT '设备工作状态 -1：离线，0:未工作,1：工作中,2:设备异常',
  `extension` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展信息',
  `function` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '功能能力',
  `pid` bigint DEFAULT NULL COMMENT '针对察打一体设备，非察打设备子设备，一律为null，是察打子设备，表示上级察打设备的id',
  `level` int DEFAULT '0' COMMENT '设备的等级，0：表示主设备，1：表示子设备，主要针对察打一体设备',
  `source` int DEFAULT NULL COMMENT '来源(0: 系统添加  1: bridge同步)',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `device_height` float DEFAULT NULL COMMENT '设备对地高度',
  `ping_time` datetime DEFAULT NULL COMMENT 'ping时间',
  PRIMARY KEY (`id`),
  KEY `idx_device_pid` (`pid`,`is_del`),
  KEY `idx_device_compId` (`provider_code`,`device_type`,`device_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备维护表';
use uav_lifecycle;
CREATE TABLE `bridge_device_mqtt_info` (
  `id` bigint NOT NULL COMMENT '序列',
  `provider_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '设备提供商id',
  `device_type` int DEFAULT NULL COMMENT '设备类型;0、5G-A基站，1、合作无人机，2、监管无人机，3、RemoteID无人机，4、雷达设备，5、频谱设备，6、光电设备，7、反制设备，8、诱骗设备，9、干扰设备，10、指挥车，11、察打一体，999、其他设备',
  `mqtt_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT账号名',
  `mqtt_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT密码',
  `topic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'MQTT的topic;设备的topic 为：\r\n设备本身参数数据的Topic,bridge/{provider_code}/device/${device_type}/{deviceId},\r\n设备实时数据的Topic，bridge/{provider_code}/device_data/${device_type}/{deviceId}',
  `create_by` bigint DEFAULT NULL COMMENT '创建人',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint DEFAULT NULL COMMENT '更新人',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备topic相关信息';
use uav_lifecycle;
CREATE TABLE `bridge_device_pool` (
  `id` bigint NOT NULL COMMENT 'id',
  `provider_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方编码',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备提供方名称',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备在提供方系统的唯一id',
  `device_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备名称',
  `device_longitude` double DEFAULT NULL COMMENT '设备经度',
  `device_latitude` double DEFAULT NULL COMMENT '设备纬度',
  `device_altitude` float DEFAULT NULL COMMENT '设备海拔高度',
  `device_local_altitude` double DEFAULT NULL COMMENT '设备所在地面海拔高度',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `work_state` int DEFAULT '0' COMMENT '设备工作状态 0:未工作,1：工作中,2:设备异常',
  `extension` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '扩展信息',
  `function` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '功能能力',
  `pid` bigint DEFAULT NULL COMMENT '针对察打一体设备，非察打设备子设备，一律为null，是察打子设备，表示上级察打设备的id',
  `level` int DEFAULT '0' COMMENT '设备的等级，0：表示主设备，1：表示子设备，主要针对察打一体设备',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除',
  `create_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `device_height` float DEFAULT NULL COMMENT '设备对地高度',
  PRIMARY KEY (`id`),
  KEY `idx_device_id_index` (`provider_code`,`device_id`,`device_type`),
  KEY `idx_device_pid` (`pid`,`is_del`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='bridge同步的设备信息，未添加至设备监管员的设备列表';
use uav_lifecycle;
CREATE TABLE `epc_auth` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `uav_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '无人机唯一识别码',
  `imei` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'imei',
  `sn` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'sn',
  `imsi` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'imsi',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `is_delete` bit(1) DEFAULT b'0' COMMENT '0 未删除  1 已删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='epc验证表';
use uav_lifecycle;
CREATE TABLE `photoelectric_alarm` (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警ID',
  `camera_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头ID',
  `thumbnail_file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '缩略图文件ID',
  `alarm_time` datetime DEFAULT NULL COMMENT '告警时间',
  `ai_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '目标类型：bird、drone',
  `bird` int DEFAULT NULL COMMENT '探测目标数量',
  `drone` int DEFAULT NULL COMMENT '探测目标数量',
  `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件ID',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除,0:否，1:是',
  `company_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '公司ID',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='摄像头告警表';
use uav_lifecycle;
CREATE TABLE `regulator_defense_zone` (
  `id` bigint NOT NULL COMMENT '主键id',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '防区名称',
  `area_range` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '核心区域',
  `is_fusion` bit(1) DEFAULT NULL COMMENT '是否融和',
  `upper_height` decimal(10,0) DEFAULT NULL COMMENT '防区最高高度',
  `is_del` bit(1) DEFAULT b'0' COMMENT '是否删除，0：未删除，1:删除',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  `handling_area` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '处置区域',
  `warning_area` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '预警区域',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `guard_mode` int DEFAULT '0' COMMENT '值守模式（0-人工值守，1-无人值守）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='防区';
use uav_lifecycle;
CREATE TABLE `regulator_defense_zone_choose` (
  `id` bigint NOT NULL COMMENT '主键',
  `defense_zone_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '防区id集合',
  `regulator_id` bigint NOT NULL COMMENT '监管员id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户防区选择映射表';
use uav_lifecycle;
CREATE TABLE `regulator_defense_zone_device_mapping` (
  `id` bigint NOT NULL COMMENT '主键id',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `device_id` bigint NOT NULL COMMENT '设备主键id，',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `induce_type` int DEFAULT NULL COMMENT '诱骗类型(0-方向诱骗，1-角度诱骗,2-轨迹诱骗，3-位置诱骗,4-模式诱骗，5-导航屏蔽, 6-停止诱骗)',
  `induce_direction` int DEFAULT NULL COMMENT '诱骗策略参数（0-正北、1-正东、2-正南、3-正西、4-东北、5-东南、6-西南、7-西北）',
  `interfere_mode` int DEFAULT NULL COMMENT '干扰模式(1-驱离模式、2-迫降模式)',
  `frequency` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '频段设置（0-1.5G，1-2.4G, 2-5.8G, 3-840M）',
  `induce_angle` int DEFAULT NULL COMMENT '诱骗角度(0-360)',
  `induce_track_type` int DEFAULT NULL COMMENT '诱骗轨迹类型，0-原地盘旋',
  `location_induce_type` int DEFAULT NULL COMMENT '位置诱骗类型(0-迫降)',
  `induce_latitude` double DEFAULT NULL COMMENT '诱骗纬度',
  `induce_longitude` double DEFAULT NULL COMMENT '诱骗经度',
  `mode_induce_type` int DEFAULT NULL COMMENT '模式诱骗类型(1-向外驱离、2-向内拉近)',
  `interfere_time` int DEFAULT NULL COMMENT '干扰时长(10-300)',
  PRIMARY KEY (`id`),
  KEY `idx_defense_zone_id` (`defense_zone_id`) COMMENT '防区id索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='防区与设备id的映射表';
use uav_lifecycle;
CREATE TABLE `regulator_defense_zone_mapping` (
  `id` bigint NOT NULL COMMENT '主键',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `regulator_id` bigint NOT NULL COMMENT '监管员id',
  `is_owner` bit(1) DEFAULT b'0' COMMENT '是否是防区创建者，0：否，1：是',
  `permission` int DEFAULT NULL COMMENT '1:查看，2：修改，4：控制，8：控制',
  `create_at` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建用户id',
  `update_at` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '更新用户id',
  PRIMARY KEY (`id`),
  KEY `idx_rdz_mapping` (`defense_zone_id`,`regulator_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='监管员防区授权表';
use uav_lifecycle;
CREATE TABLE `regulator_defense_zone_strategy` (
  `id` bigint NOT NULL COMMENT '主键id',
  `defense_zone_id` bigint NOT NULL COMMENT '防区id',
  `create_at` datetime(6) NOT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户id',
  `defense_type` int DEFAULT NULL COMMENT '防区类型（0：核心区，1：处置区，2：预警区）',
  `sms_notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '闯入短信通知：接收人',
  `notice_time` int DEFAULT '10' COMMENT '系统提示音(1-10000)',
  `device_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '无人值守设备id集合',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='防区策略表';
use uav_lifecycle;
CREATE TABLE `regulator_detection_configure_info` (
  `id` bigint NOT NULL COMMENT '主键id',
  `ref_lat` decimal(20,7) DEFAULT NULL COMMENT '参考点02纬度',
  `ref_lng` decimal(20,7) DEFAULT NULL COMMENT '参考点02经度',
  `ref_wgs_lat` decimal(20,7) DEFAULT NULL COMMENT '参考点84纬度',
  `ref_wgs_lng` decimal(20,7) DEFAULT NULL COMMENT '参考点84经度',
  `configs` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '配置',
  `keep_duration` bigint DEFAULT NULL COMMENT '保存时间',
  `suppression_num` int DEFAULT NULL COMMENT '压制点数',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modify_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='参考点等信息的配置';
use uav_lifecycle;
CREATE TABLE `regulator_detection_statistic` (
  `id` bigint NOT NULL COMMENT '主键id',
  `device_comp_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备组合id',
  `provider_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '提供商编码',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `device_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '设备id',
  `dimension` int DEFAULT NULL COMMENT '统计纬度，0：全部，1：年，2：月，3：周，4：日',
  `dimension_value` int DEFAULT NULL COMMENT '统计纬度值',
  `total` int DEFAULT NULL COMMENT '统计值',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_device_comp_id` (`device_comp_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='设备探测统计表';
use uav_lifecycle;
CREATE TABLE `regulator_detection_track` (
  `id` bigint NOT NULL COMMENT '主键id',
  `device_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备id',
  `provider_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '提供商编码',
  `device_type` int DEFAULT NULL COMMENT '设备类型',
  `track_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '目标id',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  `update_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='设备探测统计表';
use uav_lifecycle;
CREATE TABLE `regulator_radiomap` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `create_at` date DEFAULT NULL COMMENT '创建时间',
  `Longitude` double DEFAULT NULL COMMENT '经度',
  `Latitude` double DEFAULT NULL COMMENT '纬度',
  `height` double DEFAULT NULL COMMENT '高度',
  `value` double DEFAULT NULL COMMENT 'RSRP信号值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70197 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='Radiomap数据';
use uav_lifecycle;
CREATE TABLE `uav_sec_alarm_event` (
  `id` bigint NOT NULL COMMENT '自增ID',
  `alarm_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警ID',
  `alarm_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警类型',
  `alarm_object` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '告警对象',
  `alarm_content` varchar(200) NOT NULL COMMENT '告警内容【指令名称、对象名称】',
  `alarm_start_time` timestamp(3) NOT NULL COMMENT '告警时间',
  `alarm_state` int NOT NULL DEFAULT '0' COMMENT '告警状态: 0进行中，1已解除',
  `report_time` timestamp(3) NULL DEFAULT NULL COMMENT '上报时间',
  `wrong_report` int NOT NULL DEFAULT '0' COMMENT '处理结果: 0否，1是',
  `alarm_end_time` timestamp(3) NULL DEFAULT NULL COMMENT '告警结束时间',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '删除标志，1为删除，0为未删除',
  `upd_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_id` (`alarm_id`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_type` (`alarm_type`) USING BTREE,
  KEY `idx_uav_sec_alarm_event_object` (`alarm_object`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='安全告警事件表';
use uav_lifecycle;
CREATE TABLE `warn_item_his` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `warn_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '告警唯一标识',
  `uas_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '无人机识别码（或探测目标id',
  `id_type` tinyint DEFAULT NULL COMMENT '无人机的id类型,1、三方平台 2、监管无人机 3、RemoteID  4.探测轨迹',
  `cooperate` tinyint NOT NULL COMMENT '是否为合作类 1.合作； 0.非合作',
  `provider_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '设备来源厂家编号',
  `device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '数据来源设备id（设备方定义id)',
  `device_type` int DEFAULT NULL COMMENT '来源设备类型(0、5G-A基站，（5ga） 1、雷达设备，(radar)2、频谱设备， (spec)3、光电设备，(oe)4、反制设备,（cm）5、诱骗设备，(dec)6、干扰设备，(ifr) 7、指挥车，(cv)8、察打一体， (isrs)999、其他设备(other))',
  `event` tinyint NOT NULL COMMENT '告警类型(1 偏航预警；2 闯入管制区；3 闯入临时空域；4.非合飞行）',
  `warn_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警特征值(uasId、event、refcode等产生）',
  `warning_content` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '告警信息,主要是存放各种告警说明',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` tinyint NOT NULL COMMENT '告警状态：0：告警中，1:告警结束',
  `longitude84` double DEFAULT NULL COMMENT '产生告警时经度(WGS-84)',
  `latitude84` double DEFAULT NULL COMMENT '产生告警时纬度(WGS-84)',
  `height` double DEFAULT NULL COMMENT '产生告警时高度',
  `altitude` double DEFAULT NULL COMMENT '拔高度，单位米',
  `speed` double DEFAULT NULL COMMENT '产生告警时的地速度',
  `end_type` tinyint DEFAULT NULL COMMENT '结束类型，0：自动结束，1：手动结束',
  `ref_area_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域编号； event为3时：飞行活动编号',
  `ref_area_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'event为2，3时：首次产生告警时关联空域名称.只存第一个空域名称',
  `uav_update_time` datetime DEFAULT NULL COMMENT '无人机信息更新时间(以下为告警最新对应无人机信息)',
  `uav_lng` double DEFAULT NULL COMMENT '最近1次告警时无人机经度',
  `uav_lat` double DEFAULT NULL COMMENT '最近1次告警时无人机纬度',
  `uav_height` double DEFAULT NULL COMMENT '最近1次告警时无人机高度',
  `uav_altitude` double DEFAULT NULL COMMENT '最近1次告警时无人机的拔高度，单位米',
  `uav_speed` double DEFAULT NULL COMMENT '最近1次告警时无人机地速度',
  `is_deal` tinyint DEFAULT NULL COMMENT '是否已经处置。 0.未处置 1.已处置',
  `update_at` datetime DEFAULT NULL COMMENT '修改时间',
  `create_at` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `idx_uas_id_event` (`uas_id`,`event`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_warn_key` (`warn_key`,`status`),
  KEY `idx_end_time` (`end_time`),
  KEY `idx_warn_code` (`warn_code`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2359059 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='告警历史记录';
use uav_mission;
CREATE TABLE `drone_info` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `uav_name` varchar(100) NOT NULL COMMENT '无人机名称',
  `uav_code` varchar(20) NOT NULL COMMENT '无人机编号',
  `link_id` varchar(36) NOT NULL COMMENT '多机飞行任务id',
  `create_id` varchar(100) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  `sorted` int NOT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=491 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='多机任务-无人机信息';
use uav_mission;
CREATE TABLE `police_case_action` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键自增id',
  `uas_id` varchar(254) DEFAULT NULL COMMENT '无人机id',
  `action` varchar(32) DEFAULT NULL COMMENT '操作指令',
  `action_time` datetime DEFAULT NULL COMMENT '操作时间',
  `action_detail` varchar(254) DEFAULT NULL COMMENT '操作指令详情，补充信息',
  `police_case_code` varchar(64) DEFAULT NULL COMMENT '警情编号',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`id`),
  KEY `idx_uas_id` (`uas_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='警情信息操作记录表';
use uav_mission;
CREATE TABLE `smart_link_mission` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id,自增',
  `mission_name` varchar(100) NOT NULL COMMENT '作业名称',
  `user_id` varchar(100) NOT NULL COMMENT '用户Id',
  `company_id` varchar(100) NOT NULL COMMENT '公司Id',
  `create_id` varchar(100) DEFAULT NULL COMMENT '创建人',
  `update_id` varchar(100) DEFAULT NULL COMMENT '更新人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` int(1) unsigned zerofill DEFAULT '0' COMMENT '0保留,1假删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='智能网联作业信息关联表';
