diff --git a/2024/宁夏机具/iot_machine_20240805.sql b/2024/宁夏机具/iot_machine_20240805.sql new file mode 100644 index 0000000..8647cab --- /dev/null +++ b/2024/宁夏机具/iot_machine_20240805.sql @@ -0,0 +1,52 @@ +/* +任务:IoT设备绑定与查看 增加菜单IOT设备管理 +创建数据库 iot_machine +*/ + +/* + Navicat Premium Data Transfer + + Source Server : 公司测试库 + Source Server Type : MySQL + Source Server Version : 80200 + Source Host : 192.168.0.14:2009 + Source Schema : ma_sgzb_nw + + Target Server Type : MySQL + Target Server Version : 80200 + File Encoding : 65001 + + Date: 05/08/2024 10:15:19 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for iot_machine +-- ---------------------------- +DROP TABLE IF EXISTS `iot_machine`; +CREATE TABLE `iot_machine` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'iot设备id', + `iot_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'iot设备类型', + `iot_code` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'iot设备编码', + `iot_status` tinyint(1) NULL DEFAULT NULL COMMENT 'iot设备状态(0 在线, 1 下线)', + `qr_code` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'iot设备二维码', + `bind_status` tinyint(1) NULL DEFAULT NULL COMMENT 'iot设备绑定状态(0 已绑定,1 未绑定)', + `del_flag` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除标志(0代表存在 2代表删除)', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'iot设备管理表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of iot_machine +-- ---------------------------- +INSERT INTO `iot_machine` VALUES (13, '125', 'NB-001', 0, '20240711-0005140', 1, '0', '1', '2024-07-11 18:30:05', NULL, '2024-07-11 18:31:19'); +INSERT INTO `iot_machine` VALUES (14, '125', 'Nb-002', 0, '20240711-0004754', 1, '0', '1', '2024-07-11 18:30:14', NULL, NULL); +INSERT INTO `iot_machine` VALUES (15, '126', 'NB-003', 0, '20240711-0006410', 1, '0', '1', '2024-07-11 18:30:26', '1', '2024-07-11 18:30:31'); +INSERT INTO `iot_machine` VALUES (16, '126', 'Nb-004', 0, '20240711-0007687', 1, '0', '1', '2024-07-11 18:30:49', NULL, NULL); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/2024/宁夏机具/iot_machine_bind_20240805.sql b/2024/宁夏机具/iot_machine_bind_20240805.sql new file mode 100644 index 0000000..2808016 --- /dev/null +++ b/2024/宁夏机具/iot_machine_bind_20240805.sql @@ -0,0 +1,47 @@ +/* +任务:IoT设备绑定与查看 增加菜单IOT设备管理 +创建数据库 iot_machine_bind +*/ + +/* + Navicat Premium Data Transfer + + Source Server : 公司测试库 + Source Server Type : MySQL + Source Server Version : 80200 + Source Host : 192.168.0.14:2009 + Source Schema : ma_sgzb_nw + + Target Server Type : MySQL + Target Server Version : 80200 + File Encoding : 65001 + + Date: 05/08/2024 10:15:28 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for iot_machine_bind +-- ---------------------------- +DROP TABLE IF EXISTS `iot_machine_bind`; +CREATE TABLE `iot_machine_bind` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `iot_id` bigint NOT NULL COMMENT 'iot设备id', + `type_id` bigint NULL DEFAULT NULL COMMENT '设备类型id', + `ma_code` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '被绑定机具编号', + `binder` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '绑定人', + `bind_time` datetime(0) NULL DEFAULT NULL COMMENT '绑定时间', + `unbinder` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '解绑人', + `unbind_time` datetime(0) NULL DEFAULT NULL COMMENT '解绑时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'iot设备类型绑定表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of iot_machine_bind +-- ---------------------------- +INSERT INTO `iot_machine_bind` VALUES (13, 13, 690, 'NXCS004', '1', '2024-07-11 18:31:08', '1', '2024-07-11 18:31:11'); +INSERT INTO `iot_machine_bind` VALUES (14, 13, 690, 'NXCS004', '1', '2024-07-11 18:31:15', '1', '2024-07-11 18:31:19'); + +SET FOREIGN_KEY_CHECKS = 1;