/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 80031
Source Host           : localhost:3306
Source Database       : piaoliufuzi

Target Server Type    : MYSQL
Target Server Version : 80031
File Encoding         : 65001

Date: 2022-10-29 11:05:42
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for serial_number_table
-- ----------------------------
DROP TABLE IF EXISTS `serial_number_table`;
CREATE TABLE `serial_number_table` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ability` varchar(50) DEFAULT NULL,
  `serialnumber` smallint DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of serial_number_table
-- ----------------------------
INSERT INTO `serial_number_table` VALUES ('1', 'datavictory', '0');
INSERT INTO `serial_number_table` VALUES ('2', 'datanosupport', '0');
INSERT INTO `serial_number_table` VALUES ('3', 'dataerror', '0');
INSERT INTO `serial_number_table` VALUES ('4', 'datatime', '0');
INSERT INTO `serial_number_table` VALUES ('5', 'setcycle', '0');
INSERT INTO `serial_number_table` VALUES ('6', 'requestrestart', '0');
INSERT INTO `serial_number_table` VALUES ('7', 'setsensor', '0');
INSERT INTO `serial_number_table` VALUES ('8', 'setvideo', '0');
INSERT INTO `serial_number_table` VALUES ('9', 'requestdata', '0');
INSERT INTO `serial_number_table` VALUES ('10', 'setcamera', '0');
INSERT INTO `serial_number_table` VALUES ('11', 'plfz_requestupgrade', '0');
INSERT INTO `serial_number_table` VALUES ('12', 'plfz_requestselfdestruction', '0');
INSERT INTO `serial_number_table` VALUES ('13', 'plfz_setmode', '0');
INSERT INTO `serial_number_table` VALUES ('14', 'plfz_datavictory', '3');
INSERT INTO `serial_number_table` VALUES ('15', 'plfz_datanosupport', '2');
INSERT INTO `serial_number_table` VALUES ('16', 'plfz_dataerror', '0');
INSERT INTO `serial_number_table` VALUES ('17', 'plfz_datatime', '0');
INSERT INTO `serial_number_table` VALUES ('18', 'plfz_setcycle', '0');
INSERT INTO `serial_number_table` VALUES ('19', 'plfz_requestrestart', '0');
INSERT INTO `serial_number_table` VALUES ('21', 'plfz_requestdata', '0');

-- ----------------------------
-- Table structure for ztms_observe_plaoliufuzi_data
-- ----------------------------
DROP TABLE IF EXISTS `ztms_observe_plaoliufuzi_data`;
CREATE TABLE `ztms_observe_plaoliufuzi_data` (
  `id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'id',
  `project_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '所属站点id',
  `node_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '所属节点id',
  `terminal_equipment_type` int DEFAULT NULL COMMENT '终端设备类型',
  `terminal_equipment_id` int DEFAULT NULL COMMENT '终端设备id',
  `version_number` int DEFAULT NULL COMMENT '版本号',
  `device_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '所属设备id',
  `device_idd` varchar(64) DEFAULT NULL,
  `record_time` datetime DEFAULT NULL COMMENT '记录时间',
  `device_name` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '设备名称',
  `device_number` int DEFAULT NULL,
  `device_status` varchar(64) DEFAULT NULL COMMENT '设备状态',
  `cycle_time` int DEFAULT NULL COMMENT '心跳周期',
  `sync_time` bigint DEFAULT NULL COMMENT '服务器时间',
  `temperature` float(8,2) DEFAULT NULL COMMENT '水温',
  `conductivity` float(8,2) DEFAULT NULL COMMENT '电导率',
  `ph` float(8,2) DEFAULT NULL COMMENT '酸碱度',
  `oxygen` float(8,2) DEFAULT NULL COMMENT '溶解氧',
  `turbidity` float(8,2) DEFAULT NULL COMMENT '浊度',
  `salinity` float(8,2) DEFAULT NULL COMMENT '盐度',
  `chlorophyll` float(8,2) DEFAULT NULL COMMENT '叶绿素',
  `blue_green_algae` float(8,2) DEFAULT NULL COMMENT '蓝绿藻',
  `water_depth` float(8,2) DEFAULT NULL COMMENT '水深',
  `oil` float(8,2) DEFAULT NULL COMMENT '水中油',
  `cod` float(8,2) DEFAULT NULL COMMENT '化学需氧量',
  `orp` float(8,2) DEFAULT NULL COMMENT '氧化还原电位',
  `ammonia_nitrogen` float(8,2) DEFAULT NULL COMMENT '氨氮',
  `nitrate_nitrogen` float(8,2) DEFAULT NULL COMMENT '硝态氮',
  `nitrous_nitrogen` float(8,2) DEFAULT NULL COMMENT '亚硝氮',
  `phosphate` float(8,2) DEFAULT NULL COMMENT '磷酸盐',
  `total_nitrogen` float(8,2) DEFAULT NULL COMMENT '总氮',
  `total_phosphorus` float(8,2) DEFAULT NULL COMMENT '总磷',
  `phenol` float(8,2) DEFAULT NULL COMMENT '挥发酚',
  `carbon` float(8,2) DEFAULT NULL COMMENT '二氧化碳',
  `methane` float(8,2) DEFAULT NULL COMMENT '甲烷',
  `flow_speed` float(8,2) DEFAULT NULL COMMENT '总磷',
  `flow_decretion` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '流向',
  `water_level` float(8,2) DEFAULT NULL COMMENT '水位',
  `video` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '视频路径',
  `voltage` float(8,2) DEFAULT NULL COMMENT '电压',
  `electricity` float(8,2) DEFAULT NULL COMMENT '电流',
  `device_temperature` float(8,2) DEFAULT NULL COMMENT '设备温度',
  `HZ` float(8,0) DEFAULT NULL COMMENT '频率',
  `model` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '设备型号',
  `gps` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '经纬度',
  `power` float(8,2) DEFAULT NULL COMMENT '功率',
  `energy` float(8,2) DEFAULT NULL COMMENT '电能',
  `humidity` float(8,2) DEFAULT NULL COMMENT '湿度',
  `rechargeablebattery` float(8,2) DEFAULT NULL COMMENT '可充电电池容量',
  `drybattery` float(8,2) DEFAULT NULL COMMENT '干电池容量',
  `latitude` int DEFAULT NULL COMMENT '纬度',
  `longitude` int DEFAULT NULL COMMENT '经度',
  `Ax` float(8,2) DEFAULT NULL COMMENT 'X轴加速度',
  `Ay` float(8,2) DEFAULT NULL COMMENT 'Y轴加速度',
  `Az` float(8,2) DEFAULT NULL COMMENT 'Z轴加速度',
  `Wx` float(8,2) DEFAULT NULL COMMENT 'X轴角速度',
  `Wy` float(8,2) DEFAULT NULL COMMENT 'Y轴角速度',
  `Wz` float(8,2) DEFAULT NULL COMMENT 'Z轴角速度',
  `roll` float(8,2) DEFAULT NULL COMMENT '横滚角，绕Z',
  `pitch` float(8,2) DEFAULT NULL COMMENT '俯仰角，绕X',
  `yaw` float(8,2) DEFAULT NULL COMMENT '偏航角,绕Y',
  `pressure` float(8,2) DEFAULT NULL COMMENT '压力',
  `totalcapacity` int DEFAULT NULL COMMENT 'TF总容量',
  `remainingcapacity` int DEFAULT NULL COMMENT 'TF卡剩余容量'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of ztms_observe_plaoliufuzi_data
-- ----------------------------

-- ----------------------------
-- Table structure for ztms_observ_plaoliufuzi_abnormaldata
-- ----------------------------
DROP TABLE IF EXISTS `ztms_observ_plaoliufuzi_abnormaldata`;
CREATE TABLE `ztms_observ_plaoliufuzi_abnormaldata` (
  `id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'id',
  `project_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '所属站点id',
  `node_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '所属节点id',
  `terminal_equipment_type` int DEFAULT NULL,
  `terminal_equipment_id` int DEFAULT NULL,
  `version_number` int DEFAULT NULL,
  `device_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '所属设备id',
  `record_time` datetime DEFAULT NULL COMMENT '记录时间',
  `device_name` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '设备名称',
  `device_number` int DEFAULT NULL,
  `device_status` int DEFAULT NULL,
  `cycle_time` int DEFAULT NULL,
  `sync_time` bigint DEFAULT NULL,
  `temperature` float(8,2) DEFAULT NULL COMMENT '水温',
  `conductivity` float(8,2) DEFAULT NULL COMMENT '电导率',
  `ph` float(8,2) DEFAULT NULL COMMENT '酸碱度',
  `oxygen` float(8,2) DEFAULT NULL COMMENT '溶解氧',
  `turbidity` float(8,2) DEFAULT NULL COMMENT '浊度',
  `salinity` float(8,2) DEFAULT NULL COMMENT '盐度',
  `chlorophyll` float(8,2) DEFAULT NULL COMMENT '叶绿素',
  `blue_green_algae` float(8,2) DEFAULT NULL COMMENT '蓝绿藻',
  `water_depth` float(8,2) DEFAULT NULL COMMENT '水深',
  `oil` float(8,2) DEFAULT NULL COMMENT '水中油',
  `cod` float(8,2) DEFAULT NULL COMMENT '化学需氧量',
  `orp` float(8,2) DEFAULT NULL COMMENT '氧化还原电位',
  `ammonia_nitrogen` float(8,2) DEFAULT NULL COMMENT '氨氮',
  `nitrate_nitrogen` float(8,2) DEFAULT NULL COMMENT '硝态氮',
  `nitrous_nitrogen` float(8,2) DEFAULT NULL COMMENT '亚硝氮',
  `phosphate` float(8,2) DEFAULT NULL COMMENT '磷酸盐',
  `total_nitrogen` float(8,2) DEFAULT NULL COMMENT '总氮',
  `total_phosphorus` float(8,2) DEFAULT NULL COMMENT '总磷',
  `phenol` float(8,2) DEFAULT NULL COMMENT '挥发酚',
  `carbon` float(8,2) DEFAULT NULL COMMENT '二氧化碳',
  `methane` float(8,2) DEFAULT NULL COMMENT '甲烷',
  `flow_speed` float(8,2) DEFAULT NULL COMMENT '总磷',
  `flow_decretion` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '流向',
  `water_level` float(8,2) DEFAULT NULL COMMENT '水位',
  `video` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '视频路径',
  `voltage` float(8,2) DEFAULT NULL COMMENT '电压',
  `electricity` float(8,2) DEFAULT NULL COMMENT '电流',
  `device_temperature` float(8,2) DEFAULT NULL COMMENT '设备温度',
  `HZ` float(8,2) DEFAULT NULL COMMENT '频率',
  `model` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '设备型号',
  `gps` varchar(16) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '经纬度',
  `power` float(8,2) DEFAULT NULL,
  `energy` float(8,2) DEFAULT NULL,
  `humidity` float(8,2) DEFAULT NULL,
  `rechargeablebattery` float(8,2) DEFAULT NULL,
  `drybattery` float(8,2) DEFAULT NULL COMMENT '干电池容量',
  `latitude` int DEFAULT NULL COMMENT '纬度',
  `longitude` int DEFAULT NULL COMMENT '经度',
  `Ax` float(8,2) DEFAULT NULL COMMENT 'X轴加速度',
  `Ay` float(8,2) DEFAULT NULL COMMENT 'Y轴加速度',
  `Az` float(8,2) DEFAULT NULL COMMENT 'Z轴加速度',
  `Wx` float(8,2) DEFAULT NULL COMMENT 'X轴角速度',
  `Wy` float(8,2) DEFAULT NULL COMMENT 'Y轴角速度',
  `Wz` float(8,2) DEFAULT NULL COMMENT 'Z轴角速度',
  `roll` float(8,2) DEFAULT NULL COMMENT '横滚角，绕Z',
  `pitch` float(8,2) DEFAULT NULL COMMENT '俯仰角，绕X',
  `yaw` float(8,2) DEFAULT NULL COMMENT '偏航角,绕Y',
  `pressure` float(8,2) DEFAULT NULL COMMENT '压力',
  `totalcapacity` int DEFAULT NULL COMMENT 'TF总容量',
  `remainingcapacity` int DEFAULT NULL COMMENT 'TF卡剩余容量',
  PRIMARY KEY (`id`,`project_id`,`node_id`,`device_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of ztms_observ_plaoliufuzi_abnormaldata
-- ----------------------------
