CREATE TABLE `Servers` (
    `server_name` VARCHAR(32) PRIMARY KEY,
    `status VARCHAR(32) NOT NULL`,
    `upstream` VARCHAR(32),
    `detect_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `responseTime` varchar(255) NOT NULL COMMENT '响应时间',
    `protocol` varchar(32) NOT NULL COMMENT '通信协议名称',
) DEFAULT CHARACTER SET = utf8mb4 COMMENT = '服务器列表';


CREATE TABLE `ServerHealthLog` (
    `health_id` INT AUTO_INCREMENT PRIMARY KEY,
    `server_name` VARCHAR(32),
    `upstream` VARCHAR(32),
    `detect_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `status` VARCHAR(32) NOT NULL,
    `responseTime` varchar(255) NOT NULL COMMENT '响应时间',
    `protocol` varchar(32) NOT NULL COMMENT '通信协议名称',
    FOREIGN KEY (`server_name`) REFERENCES Servers(`server_name`),
    INDEX `check_time_index` (`check_time`)
) DEFAULT CHARACTER SET = utf8mb4 COMMENT = '服务器历史信息记录表';