/*
 Navicat Premium Dump SQL

 Source Server         : fhxy-192.168.1.61-polardbx
 Source Server Type    : MySQL
 Source Server Version : 80032 (8.0.32-X-Cluster-8.4.19-20241112)
 Source Host           : 192.168.1.61:4886
 Source Schema         : pla-chem-sim-dev-2

 Target Server Type    : MySQL
 Target Server Version : 80032 (8.0.32-X-Cluster-8.4.19-20241112)
 File Encoding         : 65001

 Date: 21/03/2025 15:46:45
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sim_seat
-- ----------------------------
DROP TABLE IF EXISTS `sim_seat`;
CREATE TABLE `sim_seat`  (
  `seat_id` bigint NOT NULL AUTO_INCREMENT COMMENT '座ID',
  `seat_num` int NOT NULL DEFAULT 0 COMMENT '座号',
  `seat_bind_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '[电脑]绑定的[IP地址]',
  `seat_rs485_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '[RS485]绑定的[IP地址]',
  `seat_rs485_port` int NOT NULL DEFAULT 0 COMMENT '[RS485]绑定的[端口]',
  `seat_rs485_socket_state` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT 'Socket状态:[0]:初始化,[1]:打开,[2]:关闭,[5]:禁用',
  `current_user_id` bigint NOT NULL DEFAULT 0 COMMENT '当前座上学员/用户ID',
  `current_sim_id` bigint NOT NULL DEFAULT 0 COMMENT '模拟器的ID:[0]没有连接任何模拟器,[xx]:具体某台模拟器',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`seat_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'sim-座表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sim_seat
-- ----------------------------
INSERT INTO `sim_seat` VALUES (1, 1, '192.168.1.101', '192.168.1.201', 10001, '0', 0, 0, NULL, NULL, NULL, NULL, '座号01');
INSERT INTO `sim_seat` VALUES (2, 2, '192.168.1.102', '192.168.1.201', 10002, '0', 0, 0, NULL, NULL, NULL, NULL, '座号02');
INSERT INTO `sim_seat` VALUES (3, 3, '192.168.1.103', '192.168.1.201', 10003, '0', 0, 0, NULL, NULL, NULL, NULL, '座号03');
INSERT INTO `sim_seat` VALUES (4, 4, '192.168.1.104', '192.168.1.201', 10004, '0', 0, 0, NULL, NULL, NULL, NULL, '座号04');
INSERT INTO `sim_seat` VALUES (5, 5, '192.168.1.105', '192.168.1.201', 10008, '0', 0, 0, NULL, NULL, NULL, NULL, '座号05');
INSERT INTO `sim_seat` VALUES (6, 6, '192.168.1.106', '192.168.1.202', 11001, '0', 0, 0, NULL, NULL, NULL, NULL, '座号06');
INSERT INTO `sim_seat` VALUES (7, 7, '192.168.1.107', '192.168.1.202', 11002, '0', 0, 0, NULL, NULL, NULL, NULL, '座号07');
INSERT INTO `sim_seat` VALUES (8, 8, '192.168.1.108', '192.168.1.202', 11003, '0', 0, 0, NULL, NULL, NULL, NULL, '座号08');
INSERT INTO `sim_seat` VALUES (9, 9, '192.168.1.109', '192.168.1.202', 11004, '0', 0, 0, NULL, NULL, NULL, NULL, '座号09');
INSERT INTO `sim_seat` VALUES (10, 10, '192.168.1.110', '192.168.1.202', 11008, '0', 0, 0, NULL, NULL, NULL, NULL, '座号10');

SET FOREIGN_KEY_CHECKS = 1;
