dbpatch/202408/南网仓储/iot_machine_bind_20240805.sql

47 lines
2.1 KiB
MySQL
Raw Normal View History

2024-08-08 17:03:10 +08:00
/*
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;
SET FOREIGN_KEY_CHECKS = 1;
2024-08-20 15:30:00 +08:00
INSERT INTO ma_sgzb_nw.sys_dic (id, p_id, code, name, description, value, sort, level, status, create_time, creator) VALUES (124, 0, null, 'iot设备类型', null, null, null, '1', '0', null, null);
INSERT INTO ma_sgzb_nw.sys_dic (id, p_id, code, name, description, value, sort, level, status, create_time, creator) VALUES (125, 124, null, '定位设备', null, null, null, '2', '0', null, null);
INSERT INTO ma_sgzb_nw.sys_dic (id, p_id, code, name, description, value, sort, level, status, create_time, creator) VALUES (126, 124, null, '检测设备', null, null, null, '2', '0', null, null);