|
|
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: 124.221.242.70 Database: iboot
-- ------------------------------------------------------
-- Server version 8.0.29-0ubuntu0.20.04.3
/*!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 */;
--
-- Table structure for table `iot_collect_data`
--
DROP TABLE IF EXISTS `iot_collect_data`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_collect_data` ( `id` bigint NOT NULL AUTO_INCREMENT, `cid` bigint NOT NULL COMMENT '任务执行标识', `uid` bigint DEFAULT NULL COMMENT '设备uid', `signal_id` bigint NOT NULL COMMENT '信号id', `field_type` tinyint DEFAULT NULL COMMENT '数据类型', `collect_task_id` bigint NOT NULL COMMENT '任务id', `address` varchar(128) DEFAULT NULL COMMENT '信号地址', `value` varchar(256) DEFAULT NULL COMMENT '值', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '采集状态', `reason` varchar(64) NOT NULL DEFAULT '' COMMENT '错误说明', `collect_time` datetime NOT NULL COMMENT '采集时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), KEY `iot_collect_data_cid_index` (`cid` DESC), KEY `iot_collect_data_collect_time_index` (`collect_time` DESC), KEY `iot_collect_data_signal_id_index` (`signal_id`), KEY `iot_collect_data_uid_index` (`uid` DESC)) ENGINE=InnoDB AUTO_INCREMENT=543 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='采集到的数据';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_collect_data`
--
LOCK TABLES `iot_collect_data` WRITE;/*!40000 ALTER TABLE `iot_collect_data` DISABLE KEYS */;INSERT INTO `iot_collect_data` VALUES (271,1587346702532595712,1550801539290628000,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(272,1587346702532595712,1550801539290628000,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(273,1587362682827042816,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(274,1587362682827042816,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(275,1587362808643579904,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(276,1587362808643579904,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(277,1587362934460116992,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(278,1587362934460116992,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(279,1587363060259876864,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(280,1587363060259876864,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(281,1587363186088996864,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(282,1587363186088996864,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(283,1587363311922311168,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(284,1587363311922311168,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(285,1587363437755625472,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(286,1587363437755625472,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(287,1587363563635077120,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(288,1587363563635077120,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(289,1587383444641673216,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(290,1587383444641673216,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(291,1587383570454016000,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(292,1587383570454016000,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(293,1587383696278941696,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(294,1587383696278941696,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(295,1587383822116450304,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(296,1587383822116450304,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(297,1587383947903627264,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(298,1587383947903627264,1582605843000504300,2,3,1,'102',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(299,1587384073745330176,1582605843000504300,1,3,1,'100',NULL,0,'无此设备或设备断线','2022-11-01 00:00:00','2022-11-01 00:00:00'),(300,1587384073745330176,1/*!40000 ALTER TABLE `iot_collect_data` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_collect_detail`
--
DROP TABLE IF EXISTS `iot_collect_detail`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_collect_detail` ( `id` bigint NOT NULL AUTO_INCREMENT, `uid` bigint NOT NULL COMMENT '设备uid', `child_sn` varchar(64) DEFAULT NULL COMMENT '子设备编号', `extend` varchar(512) DEFAULT NULL COMMENT '扩展字段', `store_uid` bigint DEFAULT NULL COMMENT '存储设备uid', `store_action` varchar(36) DEFAULT NULL COMMENT '存储动作', `collect_action` varchar(36) DEFAULT NULL COMMENT '采集动作', `point_group_id` bigint NOT NULL COMMENT '点位组', `collect_task_id` bigint NOT NULL COMMENT '采集任务id', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), KEY `iot_collect_detail_collect_task_id_index` (`collect_task_id`), KEY `iot_collect_detail_point_group_id_index` (`point_group_id`), KEY `iot_collect_detail_uid_index` (`uid`), KEY `iot_collect_detail_child_sn_index` (`child_sn`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='采集明细';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_collect_detail`
--
LOCK TABLES `iot_collect_detail` WRITE;/*!40000 ALTER TABLE `iot_collect_detail` DISABLE KEYS */;INSERT INTO `iot_collect_detail` VALUES (1,1582605843000504300,'01',NULL,NULL,'STORE:RDBMS','MODBUS:DTU:TCP',6,1,'2022-10-30 09:47:24');/*!40000 ALTER TABLE `iot_collect_detail` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_collect_task`
--
DROP TABLE IF EXISTS `iot_collect_task`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_collect_task` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL COMMENT '任务名称', `cron` varchar(32) NOT NULL COMMENT '任务调度', `status` char(12) NOT NULL DEFAULT 'stop' COMMENT '任务状态(start, stop, fail)', `remark` varchar(128) NOT NULL DEFAULT '' COMMENT '采集任务说明', `reason` varchar(128) NOT NULL DEFAULT '' COMMENT '任务失败的原因', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `iot_collect_task_name_uindex` (`name`)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据采集任务';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_collect_task`
--
LOCK TABLES `iot_collect_task` WRITE;/*!40000 ALTER TABLE `iot_collect_task` DISABLE KEYS */;INSERT INTO `iot_collect_task` VALUES (1,'plc采集','0/30 * * * * ?','stop','S71200设备采集任务','','2022-08-28 15:29:51','2022-11-01 09:57:50');/*!40000 ALTER TABLE `iot_collect_task` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_device`
--
DROP TABLE IF EXISTS `iot_device`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_device` ( `id` bigint NOT NULL AUTO_INCREMENT, `ip` varchar(32) DEFAULT NULL COMMENT '设备ip', `uid` bigint NOT NULL COMMENT '设备唯一的uid', `name` varchar(64) NOT NULL COMMENT '设备名称', `port` int DEFAULT NULL COMMENT '设备端口', `model` int DEFAULT NULL COMMENT '设备型号', `status` enum('online','offline') NOT NULL DEFAULT 'offline' COMMENT '设备状态', `user_id` bigint DEFAULT NULL COMMENT '所属会员', `account` varchar(64) DEFAULT NULL COMMENT '账号', `password` varchar(64) DEFAULT NULL COMMENT '密码', `device_sn` varchar(64) NOT NULL COMMENT '设备编号', `switch_time` timestamp NULL DEFAULT NULL COMMENT '设备状态切换时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间', `device_type_id` bigint NOT NULL COMMENT '设备所属类型', PRIMARY KEY (`id`), UNIQUE KEY `iot_device_uid_uindex` (`uid`)) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备表';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_device`
--
LOCK TABLES `iot_device` WRITE;/*!40000 ALTER TABLE `iot_device` DISABLE KEYS */;INSERT INTO `iot_device` VALUES (5,'172.16.30.1',1550801539290628000,'欧姆龙PLC',9600,7,'offline',NULL,NULL,NULL,'omron001','2022-11-01 09:51:04','2022-07-23 19:14:34',NULL,3),(6,NULL,1555798233911939000,'RTU协议测试',NULL,10,'offline',NULL,NULL,NULL,'RTU_IOT_MODBUS_01','2022-11-01 09:51:04','2022-08-06 14:09:38',NULL,8),(8,NULL,1559835702382841900,'DTU模拟设测试',NULL,19,'offline',NULL,NULL,NULL,'100000000003','2022-11-01 09:51:04','2022-08-17 17:33:06',NULL,10),(16,NULL,1582605843000504300,'温湿度测试',NULL,9,'offline',NULL,NULL,NULL,'45332450','2022-11-01 09:51:04','2022-10-19 13:33:31',NULL,9);/*!40000 ALTER TABLE `iot_device` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_device_child`
--
DROP TABLE IF EXISTS `iot_device_child`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_device_child` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL COMMENT '子设备名称', `uid` bigint NOT NULL COMMENT '设备uid', `remark` varchar(256) DEFAULT NULL COMMENT '备注', `child_sn` varchar(64) NOT NULL COMMENT '子设备编号', `protocol_type` smallint DEFAULT NULL COMMENT '协议类型', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `iot_device_child_child_sn_index` (`child_sn`), KEY `iot_device_child_uid_index` (`uid`)) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COMMENT='子设备';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_device_child`
--
LOCK TABLES `iot_device_child` WRITE;/*!40000 ALTER TABLE `iot_device_child` DISABLE KEYS */;INSERT INTO `iot_device_child` VALUES (1,'继电器',1537990013924249600,'用于控制设备开关状态','1',1,'2022-06-18 10:48:32'),(2,'温湿度传感器',1555798233911939000,'用于采集环境的温湿度数据','1',1,'2022-08-06 14:10:05'),(4,'电表',1559835702382841900,'电表设备','1',NULL,'2022-08-18 14:12:28'),(5,'电表2',1559835702382841900,NULL,'0003',NULL,'2022-08-24 17:05:47'),(6,'从机1',1565594612523905000,NULL,'1',NULL,'2022-09-02 15:02:34'),(7,'343',1569960474991177700,NULL,'1',NULL,'2022-09-14 16:05:29'),(8,'rtutest001',1567785941169385500,NULL,'rtutest001',NULL,'2022-09-19 10:44:53'),(9,'wendu',1579858029321433000,NULL,'01',NULL,'2022-10-11 23:34:58'),(10,'shidu',1579858029321433000,NULL,'02',NULL,'2022-10-11 23:35:06'),(11,'2',1565594612523905000,NULL,'2',NULL,'2022-10-13 17:15:11'),(12,'温湿度',1582605843000504300,NULL,'01',NULL,'2022-10-19 13:33:56');/*!40000 ALTER TABLE `iot_device_child` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_device_model`
--
DROP TABLE IF EXISTS `iot_device_model`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_device_model` ( `id` int NOT NULL AUTO_INCREMENT, `type_id` int NOT NULL COMMENT '设备类型id', `model` varchar(36) DEFAULT NULL COMMENT '型号', `remark` varchar(128) DEFAULT NULL COMMENT '型号说明', PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb3 COMMENT='设备型号';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_device_model`
--
LOCK TABLES `iot_device_model` WRITE;/*!40000 ALTER TABLE `iot_device_model` DISABLE KEYS */;INSERT INTO `iot_device_model` VALUES (1,2,'S200',NULL),(2,2,'S300',NULL),(3,2,'S400',NULL),(4,2,'S1200',NULL),(5,2,'S1500',NULL),(6,2,'S200Smart',NULL),(7,3,'omron',NULL),(9,9,'温湿度传感器','温湿度采集'),(10,8,'继电器8bits','8路状态继电器'),(11,13,'modbus_rtu','modbus_rtu_test'),(13,15,'Photo','1'),(17,20,'1234','12354'),(19,10,'通用型号','dtu通用设备');/*!40000 ALTER TABLE `iot_device_model` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_device_type`
--
DROP TABLE IF EXISTS `iot_device_type`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_device_type` ( `id` bigint NOT NULL AUTO_INCREMENT, `pid` bigint NOT NULL DEFAULT '0' COMMENT '父id', `path` varchar(128) DEFAULT NULL COMMENT '路径', `name` varchar(64) NOT NULL COMMENT '类型名称', `alias` varchar(36) DEFAULT NULL COMMENT '类型别名', `image` varchar(128) DEFAULT NULL COMMENT '类型图地址', `remark` varchar(256) DEFAULT NULL COMMENT '类型说明', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `iot_device_type_alias_index` (`alias`)) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备类型';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_device_type`
--
LOCK TABLES `iot_device_type` WRITE;/*!40000 ALTER TABLE `iot_device_type` DISABLE KEYS */;INSERT INTO `iot_device_type` VALUES (1,5,'5,1','plc','PLC',NULL,'plc设备','2022-05-15 22:04:02'),(2,1,'5,1,2','西门子','PLC',NULL,'西门子','2022-05-15 22:08:08'),(3,1,'5,1,3','欧姆龙','PLC',NULL,'欧姆龙','2022-05-15 22:09:24'),(4,5,'5,4','dtu','DTU',NULL,'数据传输单元(用于串口转互联网)','2022-06-04 14:07:42'),(5,0,'5','工业物联网',NULL,NULL,'用于工业物联网平台设备的管理','2022-06-12 13:10:58'),(8,4,'5,4,8','modbus_rtu','DTU',NULL,'用于支持dtu操作modbus rtu设备','2022-08-18 12:29:37'),(9,4,'5,4,9','modbus_tcp','DTU',NULL,'用于支持dtu操作modbus tcp设备','2022-08-18 12:30:19'),(10,4,'5,4,10','自定义协议','DTU',NULL,'用于支持dtu操作其他协议的设备','2022-08-18 12:31:18'),(11,0,'11','智能家居',NULL,NULL,'用于智能家居平台设备的管理','2022-08-27 12:33:02'),(13,5,'5,13','modbus','MODBUS',NULL,'基于modbus的客户端实现','2022-09-02 10:13:12'),(23,13,'5,13,23','modbus_tcp','MODBUS',NULL,'基于modbus_tcp协议的主机','2022-11-01 16:14:08'),(24,13,'5,13,24','modbus_rtu','MODBUS',NULL,'基于modbus_rtu协议的主机','2022-11-01 16:15:12');/*!40000 ALTER TABLE `iot_device_type` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_group_point`
--
DROP TABLE IF EXISTS `iot_group_point`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_group_point` ( `id` bigint NOT NULL AUTO_INCREMENT, `signal_id` bigint NOT NULL COMMENT '所属点位', `group_id` bigint NOT NULL COMMENT '所属点位组', PRIMARY KEY (`id`), UNIQUE KEY `iot_group_point_group_id_signal_id_uindex` (`group_id`,`signal_id`), KEY `iot_group_point_group_id_index` (`group_id`), KEY `iot_group_point_point_id_index` (`signal_id`)) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb3 COMMENT='组点位';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_group_point`
--
LOCK TABLES `iot_group_point` WRITE;/*!40000 ALTER TABLE `iot_group_point` DISABLE KEYS */;INSERT INTO `iot_group_point` VALUES (15,1,1),(16,2,1),(27,2,2),(23,3,3),(12,3,4),(24,1,5),(25,2,5),(26,6,5),(30,9,6),(29,10,6);/*!40000 ALTER TABLE `iot_group_point` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_point_group`
--
DROP TABLE IF EXISTS `iot_point_group`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_point_group` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(36) NOT NULL COMMENT '组名称', `model_id` int NOT NULL COMMENT '所属型号', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='点位组';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_point_group`
--
LOCK TABLES `iot_point_group` WRITE;/*!40000 ALTER TABLE `iot_point_group` DISABLE KEYS */;INSERT INTO `iot_point_group` VALUES (2,'13',1,'2022-08-14 21:13:23'),(3,'继电器控制',10,'2022-08-27 14:59:40'),(4,'modbus_tcp',10,'2022-09-02 14:26:59'),(6,'温湿度组',9,'2022-10-30 18:44:35');/*!40000 ALTER TABLE `iot_point_group` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_product`
--
DROP TABLE IF EXISTS `iot_product`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_product` ( `id` bigint NOT NULL AUTO_INCREMENT, `pid` bigint NOT NULL DEFAULT '0' COMMENT '父id', `path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品id路径', `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品名称', `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '产品说明', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='设备产品';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_product`
--
LOCK TABLES `iot_product` WRITE;/*!40000 ALTER TABLE `iot_product` DISABLE KEYS */;/*!40000 ALTER TABLE `iot_product` ENABLE KEYS */;UNLOCK TABLES;
--
-- Table structure for table `iot_signal`
--
DROP TABLE IF EXISTS `iot_signal`;/*!40101 SET @saved_cs_client = @@character_set_client */;/*!50503 SET character_set_client = utf8mb4 */;CREATE TABLE `iot_signal` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL COMMENT '点位名称', `address` varchar(16) NOT NULL DEFAULT '' COMMENT '点位地址', `message` varchar(256) DEFAULT NULL COMMENT '自定义报文', `type` tinyint DEFAULT NULL COMMENT '1. 点位 2. 自定义', `num` tinyint DEFAULT '0' COMMENT '读取的数量', `model_id` int NOT NULL COMMENT '型号id', `encode` char(8) DEFAULT NULL COMMENT '自定义报文编码(HEX,UTF8,ASCII)', `field_name` varchar(32) NOT NULL COMMENT '点位字段名称', `field_type` tinyint DEFAULT NULL COMMENT '字段类型(int、float、...)', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COMMENT='寄存器点位';/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `iot_signal`
--
LOCK TABLES `iot_signal` WRITE;/*!40000 ALTER TABLE `iot_signal` DISABLE KEYS */;INSERT INTO `iot_signal` VALUES (1,'电压值','100','',1,0,1,NULL,'voltage',3,'2022-07-28 17:42:35',NULL),(2,'电流值','102','',1,0,1,NULL,'current',3,'2022-08-16 21:48:24',NULL),(3,'继电器状态','1','',1,0,10,NULL,'status',7,'2022-08-27 14:57:25',NULL),(4,'测试1','2','',1,0,10,NULL,'22',1,'2022-09-08 15:10:11',NULL),(6,'开关','Q100','',1,0,4,NULL,'kaiguan',5,'2022-09-12 18:37:59',NULL),(8,'TEST','','345779348948983495',2,0,19,'HEX','TEST',NULL,'2022-10-29 20:09:24',NULL),(9,'温度','100',NULL,1,0,9,'HEX','temp',5,'2022-10-30 18:43:18',NULL),(10,'湿度','101',NULL,1,0,9,'HEX','humidity',5,'2022-10-30 18:45:49',NULL);/*!40000 ALTER TABLE `iot_signal` ENABLE KEYS */;UNLOCK TABLES;/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-12-01 14:56:48
|