87 lines
4.7 KiB
SQL
87 lines
4.7 KiB
SQL
/*
|
||
Navicat Premium Data Transfer
|
||
|
||
Source Server : hj-106
|
||
Source Server Type : MySQL
|
||
Source Server Version : 50723
|
||
Source Host : 116.236.50.106:33306
|
||
Source Schema : tp_alarm
|
||
|
||
Target Server Type : MySQL
|
||
Target Server Version : 50723
|
||
File Encoding : 65001
|
||
|
||
Date: 05/01/2024 17:16:09
|
||
*/
|
||
|
||
SET NAMES utf8mb4;
|
||
SET FOREIGN_KEY_CHECKS = 0;
|
||
|
||
-- ----------------------------
|
||
-- Table structure for sys_alarm
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `sys_alarm`;
|
||
CREATE TABLE `sys_alarm` (
|
||
`alarmId` int(11) NOT NULL AUTO_INCREMENT COMMENT '告警ID',
|
||
`alarmCode` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '告警Code',
|
||
`deviceCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备Code',
|
||
`alarmLevel` int(11) NULL DEFAULT NULL COMMENT '告警等级',
|
||
`alarmInfo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '告警信息',
|
||
`enAlarmInfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '英文告警信息',
|
||
`alarmStatus` int(11) NULL DEFAULT NULL COMMENT '告警状态 1:存在告警 0:不存在告警 ',
|
||
`readStatus` int(11) NULL DEFAULT NULL COMMENT '阅读状态 0:未读 1:已读',
|
||
`orderStatus` int(11) NULL DEFAULT NULL COMMENT '0:未设置工单,1:已设置工单,2:工单已完成,3:手动恢复',
|
||
`cancelTime` datetime NULL DEFAULT NULL COMMENT '撤销当前告警的时间(该告警已被处理时的时间)',
|
||
`uploadTime` datetime NULL DEFAULT NULL COMMENT '上报时间',
|
||
`createTime` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||
PRIMARY KEY (`alarmId`) USING BTREE
|
||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||
|
||
-- ----------------------------
|
||
-- Table structure for sys_strategy
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `sys_strategy`;
|
||
CREATE TABLE `sys_strategy` (
|
||
`strategyId` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Id',
|
||
`deptId` int(11) NULL DEFAULT NULL COMMENT '机构Id',
|
||
`strategyType` int(11) NULL DEFAULT NULL COMMENT '策略类型 1:平衡策略 2:安全策略',
|
||
`strategyName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '策略名称',
|
||
`describes` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '策略简单描述',
|
||
`path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置信地址',
|
||
`createTime` datetime NULL DEFAULT NULL COMMENT '生成时间',
|
||
PRIMARY KEY (`strategyId`) USING BTREE
|
||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||
|
||
-- ----------------------------
|
||
-- Table structure for sys_strategy_gate
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `sys_strategy_gate`;
|
||
CREATE TABLE `sys_strategy_gate` (
|
||
`sdId` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||
`strategyId` int(11) NULL DEFAULT NULL COMMENT '策略Id',
|
||
`deviceCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备Code',
|
||
PRIMARY KEY (`sdId`) USING BTREE
|
||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||
|
||
-- ----------------------------
|
||
-- Table structure for sys_threshold
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `sys_threshold`;
|
||
CREATE TABLE `sys_threshold` (
|
||
`tdId` int(11) NOT NULL AUTO_INCREMENT COMMENT '阀值设置Id',
|
||
`alarmCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '告警Code',
|
||
`typeCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型Code',
|
||
`signName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称',
|
||
`signId` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '信号编码ID',
|
||
`paramType` int(11) NULL DEFAULT NULL COMMENT '参数类型',
|
||
`maxVal` float(10, 0) NULL DEFAULT NULL COMMENT '最大值',
|
||
`minVal` float(10, 0) NULL DEFAULT NULL COMMENT '最小值',
|
||
`timeGap` int(11) NULL DEFAULT NULL COMMENT '时间间隔',
|
||
`alarmInfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '告警信息',
|
||
`alarmLevel` int(11) NULL DEFAULT NULL COMMENT '告警等级',
|
||
`createTime` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||
PRIMARY KEY (`tdId`) USING BTREE
|
||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||
|
||
SET FOREIGN_KEY_CHECKS = 1;
|