From 2db1aa88e8ab53096a936163d686b90d8e056a99 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Wed, 21 Aug 2024 23:18:33 +0800
Subject: [PATCH] 国土对接返回信息加密

---
 sql/cloud_sample.sql |   60 +++++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/sql/cloud_sample.sql b/sql/cloud_sample.sql
index 993aabd..ef864d9 100644
--- a/sql/cloud_sample.sql
+++ b/sql/cloud_sample.sql
@@ -46,7 +46,7 @@
   `file_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The file_id in the logs_file table.',
   `start_time` bigint NOT NULL COMMENT 'The file start time reported by the dock.',
   `end_time` bigint NOT NULL COMMENT 'The file end time reported by the dock.',
-  `size` int NOT NULL COMMENT 'The file size reported by the dock.',
+  `size` bigint NOT NULL COMMENT 'The file size reported by the dock.',
   `device_sn` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The sn of the device.',
   `domain` int NOT NULL COMMENT 'This parameter corresponds to the domain in the device dictionary table.',
   `create_time` bigint NOT NULL,
@@ -66,7 +66,7 @@
   `device_sn` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'dock, drone, remote control',
   `device_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'undefined' COMMENT 'model of the device. This parameter corresponds to the device name in the device dictionary table.',
   `user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT 'The account used when the device was bound.',
-  `nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT 'custom name of the device',
+  `nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'custom name of the device',
   `workspace_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT 'The workspace to which the current device belongs.',
   `device_type` int NOT NULL DEFAULT '-1' COMMENT 'This parameter corresponds to the device type in the device dictionary table.',
   `sub_type` int NOT NULL DEFAULT '-1' COMMENT 'This parameter corresponds to the sub type in the device dictionary table.',
@@ -127,7 +127,15 @@
 	(15,1,90742,0,'L1',NULL),
 	(16,2,56,0,'DJI Smart Controller','Remote control for M300'),
 	(17,2,119,0,'DJI RC Plus','Remote control for M30'),
-	(18,3,1,0,'DJI Dock','');
+	(18,3,1,0,'DJI Dock',''),
+	(19,0,77,0,'Mavic 3E',NULL),
+	(20,0,77,1,'Mavic 3T',NULL),
+	(21,1,66,0,'Mavic 3E Camera',NULL),
+	(22,1,67,0,'Mavic 3T Camera',NULL),
+	(23,2,144,0,'DJI RC Pro','Remote control for Mavic 3E/T and Mavic 3M'),
+	(24,0,77,2,'Mavic 3M',NULL),
+	(25,1,68,0,'Mavic 3M Camera',NULL),
+	(26,0,89,0,'Matrice 350 RTK',NULL);
 
 /*!40000 ALTER TABLE `manage_device_dictionary` ENABLE KEYS */;
 UNLOCK TABLES;
@@ -143,12 +151,13 @@
   `firmware_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'uuid',
   `file_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'undefined' COMMENT 'The file name of the firmware package, including the file suffix',
   `firmware_version` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'It needs to be formatted according to the official firmware version. 00.00.0000',
-  `file_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The download address for the firmware package.',
+  `object_key` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'The object key of the firmware package in the bucket.',
   `file_size` int NOT NULL COMMENT 'The size of the firmware package.',
   `file_md5` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The md5 of the firmware package.',
-  `device_name` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'model of the device. This parameter corresponds to the device name in the device dictionary table.',
+  `workspace_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
   `release_note` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The release note of the firmware package.',
   `release_date` bigint NOT NULL COMMENT 'The release date of the firmware package.',
+  `user_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'The name of the creator.',
   `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Availability of the firmware package. 1: available; 0: unavailable',
   `create_time` bigint NOT NULL,
   `update_time` bigint NOT NULL,
@@ -156,15 +165,6 @@
   UNIQUE KEY `UNIQUE_firmware_id` (`firmware_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Firmware file information';
 
-LOCK TABLES `manage_device_firmware` WRITE;
-/*!40000 ALTER TABLE `manage_device_firmware` DISABLE KEYS */;
-
-INSERT INTO `manage_device_firmware` (`id`, `firmware_id`, `file_name`, `firmware_version`, `file_url`, `file_size`, `file_md5`, `device_name`, `release_note`, `release_date`, `status`, `create_time`, `update_time`)
-VALUES
-	(1,'1','Matrice_M30_Series_UAV_V04.01.00.20_Only_For_Pilot.zip','04.01.0020','https://terra-sz-hc1pro-cloudapi.oss-cn-shenzhen.aliyuncs.com/c0af9fe0d7eb4f35a8fe5b695e4d0b96/docker/Matrice_M30_Series_UAV_V04.01.00.20_Only_For_Pilot.zip',605830726,'601630a5c753cd6665974cc8fd791bf5','Matrice 30','release note',1663232356810,1,1663232356810,1663232356810);
-
-/*!40000 ALTER TABLE `manage_device_firmware` ENABLE KEYS */;
-UNLOCK TABLES;
 
 
 # manage_device_hms
@@ -227,11 +227,28 @@
   `payload_index` smallint NOT NULL COMMENT 'The location of the payload on the device.',
   `device_sn` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'Which device the current payload belongs to.',
   `payload_desc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
+  `control_source` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
   `create_time` bigint NOT NULL,
   `update_time` bigint NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `payload_sn_UNIQUE` (`payload_sn`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='The payload information of the device.';
+
+
+
+# manage_firmware_model
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `manage_firmware_model`;
+
+CREATE TABLE `manage_firmware_model` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+  `firmware_id` varchar(64) NOT NULL,
+  `device_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'model of the device. This parameter corresponds to the device name in the device dictionary table.',
+  `create_time` bigint NOT NULL,
+  `update_time` bigint NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
 
 
 
@@ -431,15 +448,24 @@
   `file_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The wayline file used for this job.',
   `dock_sn` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'Which dock executes the job.',
   `workspace_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'Which workspace the current job belongs to.',
-  `bid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The bid used to execute the job, and the subsequent progress of the job is reported using this bid.',
-  `type` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The type of the job. Available: wayline.',
+  `task_type` int NOT NULL,
+  `wayline_type` int NOT NULL COMMENT 'The template type of the wayline.',
+  `execute_time` bigint DEFAULT NULL COMMENT 'actual begin time',
+  `completed_time` bigint DEFAULT NULL COMMENT 'actual end time',
   `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'The name of the creator.',
+  `begin_time` bigint NOT NULL COMMENT 'planned begin time',
+  `end_time` bigint DEFAULT NULL COMMENT 'planned end time',
+  `error_code` int DEFAULT NULL,
+  `status` int NOT NULL COMMENT '1: pending; 2: in progress; 3: success; 4: cancel; 5: failed',
+  `rth_altitude` int NOT NULL COMMENT 'return to home altitude. min: 20m; max: 500m',
+  `out_of_control` int NOT NULL COMMENT 'out of control action. 0: go home; 1: hover; 2: landing;',
+  `media_count` int NOT NULL DEFAULT '0',
   `create_time` bigint NOT NULL,
   `update_time` bigint NOT NULL,
+  `parent_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `job_id_UNIQUE` (`job_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Wayline mission information of the dock.';
-
 
 
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

--
Gitblit v1.9.3