/*
任务：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;



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);
INSERT INTO ma_sgzb_nw.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2287, 'IOT设备管理', 2174, 7, 'IOTequipment', 'warehouseManage/machinery/IOTequipment', null, 1, 1, 'C', '0', '0', 'IOTequipment:list', 'example', 'adminBns', '2024-07-11 11:25:21', 'adminBns', '2024-07-23 10:17:38', '');
