/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 80034
 Source Host           : 127.0.0.1:3306
 Source Schema         : pvdemcs

 Target Server Type    : MySQL
 Target Server Version : 80034
 File Encoding         : 65001

 Date: 06/11/2023 14:34:17
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for device_info
-- ----------------------------
DROP TABLE IF EXISTS `device_info`;
CREATE TABLE `device_info`  (
  `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `device_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '控制器编号',
  `device_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '控制器名称',
  `activated` bit(1) NOT NULL DEFAULT b'1' COMMENT '控制器状态,1：启用，0：停用',
  `protocol` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '控制器协议:PLC',
  `host` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '控制器主机地址',
  `port` int NOT NULL COMMENT '控制器主机端口',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者',
  `create_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '修改者',
  `update_at` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `delete_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '删除者',
  `delete_at` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'PLC控制器' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of device_info
-- ----------------------------
INSERT INTO `device_info` VALUES ('1139430641660118767', 'PLC01', '第一涂层室', b'1', 'S7_200Smart', '192.168.10.10', 102, '11', '1', '2023-10-31 15:56:48', '1', '2023-10-31 15:56:48', NULL, NULL, b'0');
INSERT INTO `device_info` VALUES ('1139430641660448768', 'PLC02', '第二涂层室', b'1', 'S7_200Smart', '192.168.10.11', 102, '', '1', '2023-11-01 22:03:29', '1', '2023-11-01 22:03:29', NULL, NULL, b'0');
INSERT INTO `device_info` VALUES ('1139430642223779840', 'PLC03', '第三涂层室', b'1', 'S7_200Smart', '192.168.10.12', 102, '', '1', '2023-11-01 22:05:46', '1', '2023-11-01 22:05:46', NULL, NULL, b'0');
INSERT INTO `device_info` VALUES ('1139430642336751616', 'PLC04', '第四涂层室', b'1', 'S7_200Smart', '192.168.10.13', 102, '', '1', '2023-11-01 22:06:14', '1', '2023-11-01 22:06:14', NULL, NULL, b'0');

SET FOREIGN_KEY_CHECKS = 1;
