/*
 Navicat Premium Dump SQL

 Source Server         : cbsd-dev
 Source Server Type    : MySQL
 Source Server Version : 50638 (5.6.38)
 Source Host           : cloud.cbsd-pro.com:3306
 Source Schema         : universaltestsoftware_client_api

 Target Server Type    : MySQL
 Target Server Version : 50638 (5.6.38)
 File Encoding         : 65001

 Date: 14/10/2025 14:07:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for boot_log
-- ----------------------------
DROP TABLE IF EXISTS `boot_log`;
CREATE TABLE `boot_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID，自增长',
  `event_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件ID，用于唯一标识一个日志事件',
  `event_date` datetime NULL DEFAULT NULL COMMENT '事件发生时间',
  `thread` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产生日志的线程名称',
  `log_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产生日志的类名',
  `message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志消息内容',
  `exception` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异常堆栈信息',
  `level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志级别（如：DEBUG, INFO, WARN, ERROR）',
  `time` datetime NULL DEFAULT NULL COMMENT '日志记录时间',
  `method` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '产生日志的方法/函数名',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 642869 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统启动日志表，记录应用程序运行过程中的日志信息' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for channel_data
-- ----------------------------
DROP TABLE IF EXISTS `channel_data`;
CREATE TABLE `channel_data`  (
  `data_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '解析数据id',
  `channel_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道id',
  `data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '数据内容',
  `protocol_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议id',
  `protocol_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '协议内容',
  `time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据时间',
  PRIMARY KEY (`data_id`) USING BTREE,
  INDEX `INDEX_CHANNEL`(`channel_id`, `protocol_id`) USING BTREE COMMENT '通道id，协议id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '解析的数据' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for data_board
-- ----------------------------
DROP TABLE IF EXISTS `data_board`;
CREATE TABLE `data_board`  (
  `data_board_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据看板id',
  `data_board_type` int(1) NULL DEFAULT NULL COMMENT '看板类型,0:表格,1:曲线',
  `data_board_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '看板名字',
  `data_type` int(1) NULL DEFAULT NULL COMMENT '0:遥测,1:数据回放',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`data_board_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据看板' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for data_board_channel
-- ----------------------------
DROP TABLE IF EXISTS `data_board_channel`;
CREATE TABLE `data_board_channel`  (
  `data_board_channel_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据看板通道id',
  `data_board_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据看板id',
  `channel_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道Id',
  `channel_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道名字',
  `parameter` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名字',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `sn` int(11) NULL DEFAULT NULL COMMENT '索引',
  `is_left_yaxis` int(1) NULL DEFAULT 1 COMMENT '是否是左边的y轴 0否 1是 默认1',
  `legend_color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图例颜色',
  PRIMARY KEY (`data_board_channel_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据看板通道' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for instruct
-- ----------------------------
DROP TABLE IF EXISTS `instruct`;
CREATE TABLE `instruct`  (
  `instruct_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '指令id',
  `instruct_type` int(11) NOT NULL DEFAULT 1 COMMENT '指令类型 1.常规指令 2.指令组',
  `encoding` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码',
  `parent_encoding` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父级编码',
  `parent_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父级名字',
  `instruct_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指令名字',
  `server_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务id',
  `ip_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
  `tcp_port` int(12) NULL DEFAULT NULL COMMENT '服务端tcp端口',
  `instruct_text` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '指令数据',
  `channel_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道id',
  `channel_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道名字',
  `invocation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '调用用列id',
  `operation_type` int(11) NOT NULL DEFAULT 0 COMMENT '指令类型 0.数据 1.寄存器',
  `extra_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '额外数据',
  `board_type_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '板卡类型名称',
  `board_index` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '板卡编号',
  `protocol_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议id',
  `protocol_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议名字',
  `protocol_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '协议内容',
  `sort` int(12) NULL DEFAULT NULL COMMENT '排序',
  `status` int(1) NULL DEFAULT 1 COMMENT '状态0:禁用,1:启用',
  `lead_time` int(32) NOT NULL DEFAULT 0 COMMENT '前置等待时间ms',
  `tail_time` int(32) NOT NULL DEFAULT 0 COMMENT '后置等待时间ms',
  `hit_count` int(32) NULL DEFAULT 0 COMMENT '命中次数',
  `last_hit_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最后命中时间',
  `instruct_tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指令标识',
  `pre_process_script` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '预处理脚本',
  `pre_process_script_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预处理脚本文件名称',
  `pre_process_script_param` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '预处理脚本参数',
  `pre_process_script_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预处理脚本文件',
  `pre_process_script_comment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '预处理脚本注释',
  `repeat_count` int(32) NULL DEFAULT 1 COMMENT '重复次数',
  `branch_condition_script` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '分支条件脚本',
  `branch_condition_script_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分支条件脚本名称',
  `branch_condition_script_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分支条件脚本文件',
  `branch_condition_script_param` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '分支条件脚本参数',
  `branch_condition_script_comment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '分支条件脚本注释',
  `check_script` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '检查脚本',
  `check_script_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '检查脚本名称',
  `check_script_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '检查脚本文件',
  `check_script_comment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '检查脚本注释',
  `instruct_data_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指令数据文件',
  `jump_target` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '跳转目标',
  `break_point` int(11) NOT NULL DEFAULT 0 COMMENT '断点 1.是 0.否',
  PRIMARY KEY (`instruct_id`) USING BTREE,
  UNIQUE INDEX `UNIQUE_NAME`(`invocation_id`, `instruct_name`) USING BTREE COMMENT '同一用例指令名称不能重复'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '指令' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for invocation
-- ----------------------------
DROP TABLE IF EXISTS `invocation`;
CREATE TABLE `invocation`  (
  `invocation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用例id',
  `invocation_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用例名字',
  `sort` int(11) NOT NULL DEFAULT 1 COMMENT '用例序号',
  `scheme_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方案id',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`invocation_id`) USING BTREE,
  UNIQUE INDEX `UNIQUEEN_NAME`(`scheme_id`, `invocation_name`) USING BTREE COMMENT '同一方案用例名称唯一'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用列' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for parser
-- ----------------------------
DROP TABLE IF EXISTS `parser`;
CREATE TABLE `parser`  (
  `parser_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '解析器id',
  `parser_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '解析器名称',
  `parser_sort` int(11) NULL DEFAULT NULL COMMENT '解析器顺序',
  `channel_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道id',
  `is_delete` int(11) NOT NULL DEFAULT 0 COMMENT '是否删除 1.是 0.否',
  `create_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`parser_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '解析器' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for parser_protocol
-- ----------------------------
DROP TABLE IF EXISTS `parser_protocol`;
CREATE TABLE `parser_protocol`  (
  `parser_protocol_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '解析器协议id',
  `parser_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '解析器id',
  `protocol_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议id',
  `create_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`parser_protocol_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '解析器协议' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for protocol
-- ----------------------------
DROP TABLE IF EXISTS `protocol`;
CREATE TABLE `protocol`  (
  `protocol_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '协议id',
  `protocol_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议名字',
  `protocol_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '协议内容',
  `protocol_type` int(11) NULL DEFAULT NULL COMMENT '协议类型 1.解析 2.指令',
  `protocol_tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '协议标签',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`protocol_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '协议' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for scheme
-- ----------------------------
DROP TABLE IF EXISTS `scheme`;
CREATE TABLE `scheme`  (
  `scheme_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '方案id',
  `scheme_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方案名字',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`scheme_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '方案' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for server
-- ----------------------------
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server`  (
  `server_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '服务端id',
  `server_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务端名字',
  `ip_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
  `tcp_port` int(12) NULL DEFAULT NULL COMMENT '服务端tcp端口',
  `http_port` int(12) NULL DEFAULT NULL COMMENT '服务端http端口',
  `reconnect_initial_delay` int(32) NULL DEFAULT 1000 COMMENT '重连初始延迟',
  `reconnect_max_delay` int(32) NULL DEFAULT 10000 COMMENT '重连最大延迟',
  `reconnect_multiplier` double(12, 2) NULL DEFAULT 1.50 COMMENT '重连延迟乘数',
  `create_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  `is_delete` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否删除0否1是',
  `connect_status` int(1) NULL DEFAULT 0 COMMENT '连接状态0：不连接,1要连接',
  PRIMARY KEY (`server_id`) USING BTREE,
  UNIQUE INDEX `name_index`(`server_name`, `is_delete`) USING BTREE COMMENT '服务端名字不能重复'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务端' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for system_config
-- ----------------------------
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config`  (
  `type` int(11) NOT NULL COMMENT '类型： 1.指令显示列',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
  PRIMARY KEY (`type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置（仅类型和内容）' ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
