/*
任务：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;
SET FOREIGN_KEY_CHECKS = 1;
