/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.208
 Source Server Type    : MySQL
 Source Server Version : 50727
 Source Host           : 192.168.1.208:3306
 Source Schema         : rtelec_temperature

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

 Date: 11/03/2023 15:13:52
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for alarm_event
-- ----------------------------
DROP TABLE IF EXISTS `alarm_event`;
CREATE TABLE `alarm_event`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '告警事件表',
  `eventid` bigint(20) NOT NULL COMMENT '事件ID,全局唯一',
  `subeventid` bigint(20) NULL DEFAULT NULL COMMENT '测点告警时，对应的复归事件ID',
  `eventdesc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '告警事件描述',
  `eventtype` int(11) NULL DEFAULT NULL COMMENT '事件类别。1-测点告警，2-系统告警，3-告警复归',
  `timestamp` bigint(20) NULL DEFAULT NULL COMMENT '事件产生时的时间戳',
  `strategyid` bigint(20) NULL DEFAULT NULL COMMENT '关联的告警策略ID,只用于测点告警',
  `confirm` int(11) NULL DEFAULT 1 COMMENT '用户是否确认。1-未确认，2-已确认',
  `confirmtime` datetime(0) NULL DEFAULT NULL COMMENT '用户确认时间',
  `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '用户处理结果',
  `appid` int(11) NULL DEFAULT NULL,
  `alarmlevel` int(11) NULL DEFAULT NULL COMMENT '告警级别，1 预警，2 一般，3 严重，4 危急',
  `create_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  `moldeid` int(11) NULL DEFAULT NULL COMMENT '模型id',
  `position` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '位置',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `eventid`(`eventid`) USING BTREE,
  INDEX `idx_strategyid`(`strategyid`) USING BTREE,
  INDEX `idx_confirm`(`confirm`) USING BTREE,
  INDEX `alarmeventid`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '本地告警事件' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for alarm_his
-- ----------------------------
DROP TABLE IF EXISTS `alarm_his`;
CREATE TABLE `alarm_his`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '告警事件表',
  `eventid` bigint(20) NOT NULL COMMENT '事件ID,全局唯一',
  `subeventid` bigint(20) NULL DEFAULT NULL COMMENT '测点告警时，对应的复归事件ID',
  `eventdesc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '告警事件描述',
  `eventtype` int(11) NULL DEFAULT NULL COMMENT '事件类别。1-测点告警，2-系统告警，3-告警复归',
  `timestamp` bigint(20) NULL DEFAULT NULL COMMENT '事件产生时的时间戳',
  `strategyid` bigint(20) NULL DEFAULT NULL COMMENT '关联的告警策略ID,只用于测点告警',
  `confirm` int(11) NULL DEFAULT 1 COMMENT '用户是否确认。1-未确认，2-已确认',
  `confirmtime` datetime(0) NULL DEFAULT NULL COMMENT '用户确认时间',
  `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '用户处理结果',
  `appid` int(11) NULL DEFAULT NULL COMMENT '应用id',
  `alarmlevel` int(11) NULL DEFAULT NULL COMMENT '告警级别，1 预警，2 一般，3 严重，4 危急',
  `modelid` int(11) NULL DEFAULT NULL COMMENT '所属模型id',
  `position` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '位置',
  `create_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `eventid`(`eventid`) USING BTREE,
  INDEX `idx_strategyid`(`strategyid`) USING BTREE,
  INDEX `idx_confirm`(`confirm`) USING BTREE,
  INDEX `alarmeventid`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '告警事件台账' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dev_history
-- ----------------------------
DROP TABLE IF EXISTS `dev_history`;
CREATE TABLE `dev_history`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `appid` int(11) NULL DEFAULT NULL COMMENT '所属appid',
  `deviceid` int(11) NULL DEFAULT NULL COMMENT '设备id',
  `devicename` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
  `mpid` bigint(20) NULL DEFAULT NULL,
  `mpname` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测点名称',
  `attrname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测点名称',
  `val` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测点值',
  `date` datetime(0) NULL DEFAULT NULL COMMENT '上报时间焯',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_deviceid`(`deviceid`) USING BTREE,
  INDEX `index_mpid`(`mpid`) USING BTREE,
  INDEX `index_appid`(`appid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for global_const_code
-- ----------------------------
DROP TABLE IF EXISTS `global_const_code`;
CREATE TABLE `global_const_code`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `parentcode` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `ind2`(`code`, `parentcode`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 478 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of global_const_code
-- ----------------------------
INSERT INTO `global_const_code` VALUES (152, 'log_opttype', 'systemconstcode', '日志操作分类');
INSERT INTO `global_const_code` VALUES (153, 'log_audittype', 'systemconstcode', '日志审计分类');
INSERT INTO `global_const_code` VALUES (154, '0', 'log_opttype', '查询');
INSERT INTO `global_const_code` VALUES (155, '0', 'log_audittype', '系统登录');
INSERT INTO `global_const_code` VALUES (156, '1', 'log_opttype', '新增');
INSERT INTO `global_const_code` VALUES (157, '1', 'log_audittype', '业务模块管理');
INSERT INTO `global_const_code` VALUES (158, '2', 'log_opttype', '编辑');
INSERT INTO `global_const_code` VALUES (159, 'log_eventlevel', 'systemconstcode', '日志事件等级');
INSERT INTO `global_const_code` VALUES (160, 'log_eventtype', 'systemconstcode', '日志事件类型');
INSERT INTO `global_const_code` VALUES (161, 'log_optresult', 'systemconstcode', '日志结果类型');
INSERT INTO `global_const_code` VALUES (162, 'model_table_mapping', 'systemconstcode', '模型对应的数据表');
INSERT INTO `global_const_code` VALUES (163, '2', 'log_audittype', '配置文件');
INSERT INTO `global_const_code` VALUES (164, '3', 'log_opttype', '删除');
INSERT INTO `global_const_code` VALUES (165, '0', 'log_eventlevel', '高');
INSERT INTO `global_const_code` VALUES (166, '0', 'log_eventtype', '系统事件');
INSERT INTO `global_const_code` VALUES (167, '3', 'log_audittype', '统计分析');
INSERT INTO `global_const_code` VALUES (168, '1', 'log_eventtype', '业务事件');
INSERT INTO `global_const_code` VALUES (169, '4', 'log_audittype', '管理后台/基础数据维护/变电站');
INSERT INTO `global_const_code` VALUES (170, '2', 'log_eventtype', '未知类型');
INSERT INTO `global_const_code` VALUES (171, '5', 'log_audittype', '管理后台/系统管理/数据清理');
INSERT INTO `global_const_code` VALUES (172, '6', 'log_audittype', '管理后台/系统管理/系统日志');
INSERT INTO `global_const_code` VALUES (173, '4', 'log_opttype', '登录');
INSERT INTO `global_const_code` VALUES (174, '126', 'model_table_mapping', 'zigbee_026010');
INSERT INTO `global_const_code` VALUES (175, '0', 'log_optresult', '失败');
INSERT INTO `global_const_code` VALUES (176, '1', 'log_eventlevel', '中');
INSERT INTO `global_const_code` VALUES (177, '5', 'log_opttype', '登出');
INSERT INTO `global_const_code` VALUES (178, '127', 'model_table_mapping', 'zigbee_026010_mz');
INSERT INTO `global_const_code` VALUES (179, '1', 'log_optresult', '成功');
INSERT INTO `global_const_code` VALUES (180, '2', 'log_eventlevel', '低');
INSERT INTO `global_const_code` VALUES (181, '7', 'log_audittype', '管理后台/系统管理/过期系统日志清理');
INSERT INTO `global_const_code` VALUES (182, '6', 'log_opttype', '执行');
INSERT INTO `global_const_code` VALUES (183, '1024', 'model_table_mapping', 'zigbee_027001');
INSERT INTO `global_const_code` VALUES (184, '8', 'log_audittype', '管理后台/系统管理/附件管理');
INSERT INTO `global_const_code` VALUES (185, '2', 'log_optresult', '');
INSERT INTO `global_const_code` VALUES (186, '3', 'log_eventlevel', '未知类型');
INSERT INTO `global_const_code` VALUES (187, '7', 'log_opttype', '数据统计');
INSERT INTO `global_const_code` VALUES (188, '9', 'log_audittype', '管理后台/系统管理/用户管理');
INSERT INTO `global_const_code` VALUES (189, '8', 'log_opttype', '图表分析');
INSERT INTO `global_const_code` VALUES (190, '10', 'log_audittype', '管理后台/系统管理/菜单管理');
INSERT INTO `global_const_code` VALUES (191, '9', 'log_opttype', '修改密码');
INSERT INTO `global_const_code` VALUES (192, '11', 'log_audittype', '管理后台/系统管理/角色管理');
INSERT INTO `global_const_code` VALUES (193, '10', 'log_opttype', '重置密码');
INSERT INTO `global_const_code` VALUES (194, '12', 'log_audittype', '管理后台/系统管理/用户角色分配');
INSERT INTO `global_const_code` VALUES (195, '11', 'log_opttype', '审核');
INSERT INTO `global_const_code` VALUES (196, '13', 'log_audittype', '管理后台/系统管理/字典代码');
INSERT INTO `global_const_code` VALUES (197, '12', 'log_opttype', '签入');
INSERT INTO `global_const_code` VALUES (198, '14', 'log_audittype', '管理后台/系统管理/系统参数');
INSERT INTO `global_const_code` VALUES (199, '13', 'log_opttype', '签出');
INSERT INTO `global_const_code` VALUES (200, '15', 'log_audittype', '管理后台/审计管理/审计分类管理');
INSERT INTO `global_const_code` VALUES (201, '14', 'log_opttype', '导入');
INSERT INTO `global_const_code` VALUES (202, '16', 'log_audittype', '管理后台/审计管理/操作分类管理');
INSERT INTO `global_const_code` VALUES (203, '15', 'log_opttype', '导出');
INSERT INTO `global_const_code` VALUES (204, '17', 'log_audittype', '管理后台/审计管理/日志参数配置');
INSERT INTO `global_const_code` VALUES (205, '16', 'log_opttype', '下载');
INSERT INTO `global_const_code` VALUES (206, '18', 'log_audittype', '管理后台/审计管理/日志备份还原');
INSERT INTO `global_const_code` VALUES (207, '17', 'log_opttype', '上传');
INSERT INTO `global_const_code` VALUES (208, '19', 'log_audittype', '管理后台/审计查询/日志操作');
INSERT INTO `global_const_code` VALUES (209, '18', 'log_opttype', '启动');
INSERT INTO `global_const_code` VALUES (210, '20', 'log_audittype', '管理后台/审计查询/日志报表');
INSERT INTO `global_const_code` VALUES (211, '19', 'log_opttype', '提交');
INSERT INTO `global_const_code` VALUES (212, '21', 'log_audittype', '管理后台/审计查询/告警记录');
INSERT INTO `global_const_code` VALUES (213, '20', 'log_opttype', '终止');
INSERT INTO `global_const_code` VALUES (214, '22', 'log_audittype', '管理后台/审计查询/运行日志');
INSERT INTO `global_const_code` VALUES (215, '21', 'log_opttype', '结束');
INSERT INTO `global_const_code` VALUES (216, '23', 'log_audittype', '客户端节点');
INSERT INTO `global_const_code` VALUES (217, '22', 'log_opttype', '驳回');
INSERT INTO `global_const_code` VALUES (218, '24', 'log_audittype', '通知公告');
INSERT INTO `global_const_code` VALUES (219, '23', 'log_opttype', '撤回');
INSERT INTO `global_const_code` VALUES (220, '25', 'log_audittype', '设备数据');
INSERT INTO `global_const_code` VALUES (221, '24', 'log_opttype', '绑定关系');
INSERT INTO `global_const_code` VALUES (222, '26', 'log_audittype', '未知类型');
INSERT INTO `global_const_code` VALUES (223, '25', 'log_opttype', '解除绑定');
INSERT INTO `global_const_code` VALUES (224, '26', 'log_opttype', '禁用');
INSERT INTO `global_const_code` VALUES (225, '27', 'log_opttype', '启用');
INSERT INTO `global_const_code` VALUES (226, '28', 'log_opttype', '锁定');
INSERT INTO `global_const_code` VALUES (227, '29', 'log_opttype', '解锁');
INSERT INTO `global_const_code` VALUES (228, '30', 'log_opttype', '未知类型');
INSERT INTO `global_const_code` VALUES (306, '27', 'log_audittype', '历史数据管理');
INSERT INTO `global_const_code` VALUES (307, '28', 'log_audittype', '告警数据管理');
INSERT INTO `global_const_code` VALUES (308, '29', 'log_audittype', '告警策略管理');
INSERT INTO `global_const_code` VALUES (309, '30', 'log_audittype', '联动管理');
INSERT INTO `global_const_code` VALUES (310, '31', 'log_audittype', '联动策略管理');
INSERT INTO `global_const_code` VALUES (311, '32', 'log_audittype', '未知类型');

-- ----------------------------
-- Table structure for global_sys_param
-- ----------------------------
DROP TABLE IF EXISTS `global_sys_param`;
CREATE TABLE `global_sys_param`  (
  `param_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `param_value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `param_memo` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`param_name`) USING BTREE,
  UNIQUE INDEX `param_name`(`param_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of global_sys_param
-- ----------------------------
INSERT INTO `global_sys_param` VALUES ('allow_access_ips', '*', '');
INSERT INTO `global_sys_param` VALUES ('client_version_', '', '_客户端版本');
INSERT INTO `global_sys_param` VALUES ('dataClearHour', '01', '');
INSERT INTO `global_sys_param` VALUES ('db_script_version', '0', '数据库更新版本');
INSERT INTO `global_sys_param` VALUES ('identify_IDCAbn_matchvalue', '2', '');
INSERT INTO `global_sys_param` VALUES ('identify_IDCAlm_matchvalue', '2', '');
INSERT INTO `global_sys_param` VALUES ('identify_IDCStopStat_matchvalue', '2', '');
INSERT INTO `global_sys_param` VALUES ('login_fail_locktime', '180', '');
INSERT INTO `global_sys_param` VALUES ('login_fail_maxcount', '5', '');
INSERT INTO `global_sys_param` VALUES ('Mqtt_JS_URL', '192.168.1.208:8083', 'mqtt的js库连接地址');
INSERT INTO `global_sys_param` VALUES ('session_timeout', '600', '');
INSERT INTO `global_sys_param` VALUES ('user_login_client_limt', 'none', '');
INSERT INTO `global_sys_param` VALUES ('user_pwd_edit_mod', 'admin', '');
INSERT INTO `global_sys_param` VALUES ('user_pwd_expire_day', '60', '');
INSERT INTO `global_sys_param` VALUES ('user_pwd_rule', 'simple', '');

-- ----------------------------
-- Table structure for global_syslog
-- ----------------------------
DROP TABLE IF EXISTS `global_syslog`;
CREATE TABLE `global_syslog`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `insdate` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  `ip` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作IP',
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '日志内容',
  `staff` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人员',
  `logtype` int(11) NULL DEFAULT NULL COMMENT '操作类型',
  `audittype` int(11) NULL DEFAULT NULL COMMENT '审计类型',
  `eventtype` int(11) NULL DEFAULT NULL COMMENT '事件类型',
  `eventlevel` int(11) NULL DEFAULT NULL COMMENT '事件等级',
  `success` int(11) NOT NULL DEFAULT 1 COMMENT '操作结果',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind1`(`insdate`) USING BTREE,
  INDEX `ind2`(`logtype`) USING BTREE,
  INDEX `ind3`(`success`) USING BTREE,
  INDEX `ind4`(`audittype`) USING BTREE,
  INDEX `ind5`(`eventtype`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 93 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for scene_model
-- ----------------------------
DROP TABLE IF EXISTS `scene_model`;
CREATE TABLE `scene_model`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `scenename` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `modelid` bigint(20) NULL DEFAULT NULL,
  `modelname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '场景与模型关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_data_clear_data
-- ----------------------------
DROP TABLE IF EXISTS `t_data_clear_data`;
CREATE TABLE `t_data_clear_data`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `skeepday` int(11) NOT NULL DEFAULT 30,
  `tablename` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `colname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `filterwhere` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `memo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `cr` int(11) NOT NULL,
  `ct` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_data_clear_data
-- ----------------------------
INSERT INTO `t_data_clear_data` VALUES (1, '系统日志', 30, 'global_syslog', 'insdate', NULL, NULL, 0, '2023-03-11 15:09:59');
INSERT INTO `t_data_clear_data` VALUES (2, '测温记录表', 30, 't_data_zigbee_026010', 'create_time', NULL, NULL, 0, '2023-03-11 15:10:36');
INSERT INTO `t_data_clear_data` VALUES (3, '多探头测温记录', 30, 't_data_zigbee_026010_mz', 'create_time', NULL, NULL, 0, '2023-03-11 15:11:09');
INSERT INTO `t_data_clear_data` VALUES (4, '避雷器记录表', 30, 't_data_zigbee_027001', 'create_time', NULL, NULL, 0, '2023-03-11 15:11:37');

-- ----------------------------
-- Table structure for t_data_role_func
-- ----------------------------
DROP TABLE IF EXISTS `t_data_role_func`;
CREATE TABLE `t_data_role_func`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `roleid` int(11) NOT NULL,
  `funccodeid` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind1`(`roleid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 942 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for t_data_user
-- ----------------------------
DROP TABLE IF EXISTS `t_data_user`;
CREATE TABLE `t_data_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `account` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `pwd` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `pwd_expire` datetime(0) NULL DEFAULT '1970-01-01 00:00:00' COMMENT '密码过期时间',
  `mobilephone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '移动电话号码',
  `memo` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP,
  `createuser` int(11) NULL DEFAULT NULL,
  `role` tinyint(1) NULL DEFAULT 0 COMMENT '是否为管理员帐号',
  `bind_ips` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '绑定允许登录的IP或IP段,多过IP用,分隔',
  `datelimit_start` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '授权访问开始日期',
  `datelimit_end` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '授权访问结束日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 24 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_data_zigbee_026010
-- ----------------------------
DROP TABLE IF EXISTS `t_data_zigbee_026010`;
CREATE TABLE `t_data_zigbee_026010`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `device_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型编码',
  `linked_device` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被监测设备标识',
  `phase` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '相别',
  `device_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
  `device_id` int(11) NOT NULL COMMENT '设备id',
  `tem1` float NULL DEFAULT 99999 COMMENT '温度测点1',
  `tem2` float NULL DEFAULT 99999 COMMENT '温度测点2',
  `tem3` float NULL DEFAULT 99999 COMMENT '温度测点3',
  `tem4` float NULL DEFAULT 99999 COMMENT '温度测点4',
  `tem5` float NULL DEFAULT 99999 COMMENT '温度测点5',
  `tem6` float NULL DEFAULT 99999 COMMENT '温度测点6',
  `tem7` float NULL DEFAULT 99999 COMMENT '温度测点7',
  `tem8` float NULL DEFAULT 99999 COMMENT '温度测点8',
  `tem9` float NULL DEFAULT 99999 COMMENT '温度测点9',
  `tem10` float NULL DEFAULT 99999 COMMENT '温度测点10',
  `tem11` float NULL DEFAULT 99999 COMMENT '温度测点11',
  `tem12` float NULL DEFAULT 99999 COMMENT '温度测点12',
  `tem13` float NULL DEFAULT 99999 COMMENT '温度测点13',
  `tem14` float NULL DEFAULT 99999 COMMENT '温度测点14',
  `tem15` float NULL DEFAULT 99999 COMMENT '温度测点15',
  `tem16` float NULL DEFAULT 99999 COMMENT '温度测点16',
  `tem17` float NULL DEFAULT 99999 COMMENT '温度测点17',
  `tem18` float NULL DEFAULT 99999 COMMENT '温度测点18',
  `tem19` float NULL DEFAULT 99999 COMMENT '温度测点19',
  `tem20` float NULL DEFAULT 99999 COMMENT '温度测点20',
  `tem21` float NULL DEFAULT 99999 COMMENT '温度测点21',
  `tem22` float NULL DEFAULT 99999 COMMENT '温度测点22',
  `tem23` float NULL DEFAULT 99999 COMMENT '温度测点23',
  `tem24` float NULL DEFAULT 99999 COMMENT '温度测点24',
  `tem25` float NULL DEFAULT 99999 COMMENT '温度测点25',
  `tem26` float NULL DEFAULT 99999 COMMENT '温度测点26',
  `tem27` float NULL DEFAULT 99999 COMMENT '温度测点27',
  `tem28` float NULL DEFAULT 99999 COMMENT '温度测点27',
  `tem29` float NULL DEFAULT 99999 COMMENT '温度测点28',
  `tem30` float NULL DEFAULT 99999 COMMENT '温度测点30',
  `hum1` float NULL DEFAULT 99999 COMMENT '湿度测点1',
  `hum2` float NULL DEFAULT 99999 COMMENT '湿度测点2',
  `hum3` float NULL DEFAULT 99999 COMMENT '湿度测点3',
  `hum4` float NULL DEFAULT 99999 COMMENT '湿度测点4',
  `hum5` float NULL DEFAULT 99999 COMMENT '湿度测点5',
  `hum6` float NULL DEFAULT 99999 COMMENT '湿度测点6',
  `hum7` float NULL DEFAULT 99999 COMMENT '湿度测点7',
  `hum8` float NULL DEFAULT 99999 COMMENT '湿度测点8',
  `hum9` float NULL DEFAULT 99999 COMMENT '湿度测点9',
  `hum10` float NULL DEFAULT 99999 COMMENT '湿度测点10',
  `hum11` float NULL DEFAULT 99999 COMMENT '湿度测点11',
  `hum12` float NULL DEFAULT 99999 COMMENT '湿度测点12',
  `hum13` float NULL DEFAULT 99999 COMMENT '湿度测点13',
  `hum14` float NULL DEFAULT 99999 COMMENT '湿度测点14',
  `hum15` float NULL DEFAULT 99999 COMMENT '湿度测点15',
  `hum16` float NULL DEFAULT 99999 COMMENT '湿度测点16',
  `hum17` float NULL DEFAULT 99999 COMMENT '湿度测点17',
  `hum18` float NULL DEFAULT 99999 COMMENT '湿度测点18',
  `hum19` float NULL DEFAULT 99999 COMMENT '湿度测点19',
  `hum20` float NULL DEFAULT 99999 COMMENT '湿度测点20',
  `hum21` float NULL DEFAULT 99999 COMMENT '湿度测点21',
  `hum22` float NULL DEFAULT 99999 COMMENT '湿度测点22',
  `hum23` float NULL DEFAULT 99999 COMMENT '湿度测点23',
  `hum24` float NULL DEFAULT 99999 COMMENT '湿度测点24',
  `hum25` float NULL DEFAULT 99999 COMMENT '湿度测点25',
  `hum26` float NULL DEFAULT 99999 COMMENT '湿度测点26',
  `hum27` float NULL DEFAULT 99999 COMMENT '湿度测点27',
  `hum28` float NULL DEFAULT 99999 COMMENT '湿度测点27',
  `hum29` float NULL DEFAULT 99999 COMMENT '湿度测点28',
  `hum30` float NULL DEFAULT 99999 COMMENT '湿度测点30',
  `vol1` float NULL DEFAULT 99999 COMMENT '电压测点1',
  `vol2` float NULL DEFAULT 99999 COMMENT '电压测点2',
  `vol3` float NULL DEFAULT 99999 COMMENT '电压测点3',
  `vol4` float NULL DEFAULT 99999 COMMENT '电压测点4',
  `vol5` float NULL DEFAULT 99999 COMMENT '电压测点5',
  `vol6` float NULL DEFAULT 99999 COMMENT '电压测点6',
  `vol7` float NULL DEFAULT 99999 COMMENT '电压测点7',
  `vol8` float NULL DEFAULT 99999 COMMENT '电压测点8',
  `vol9` float NULL DEFAULT 99999 COMMENT '电压测点9',
  `vol10` float NULL DEFAULT 99999 COMMENT '电压测点10',
  `vol11` float NULL DEFAULT 99999 COMMENT '电压测点11',
  `vol12` float NULL DEFAULT 99999 COMMENT '电压测点12',
  `vol13` float NULL DEFAULT 99999 COMMENT '电压测点13',
  `vol14` float NULL DEFAULT 99999 COMMENT '电压测点14',
  `vol15` float NULL DEFAULT 99999 COMMENT '电压测点15',
  `vol16` float NULL DEFAULT 99999 COMMENT '电压测点16',
  `vol17` float NULL DEFAULT 99999 COMMENT '电压测点17',
  `vol18` float NULL DEFAULT 99999 COMMENT '电压测点18',
  `vol19` float NULL DEFAULT 99999 COMMENT '电压测点19',
  `vol20` float NULL DEFAULT 99999 COMMENT '电压测点20',
  `vol21` float NULL DEFAULT 99999 COMMENT '电压测点21',
  `vol22` float NULL DEFAULT 99999 COMMENT '电压测点22',
  `vol23` float NULL DEFAULT 99999 COMMENT '电压测点23',
  `vol24` float NULL DEFAULT 99999 COMMENT '电压测点24',
  `vol25` float NULL DEFAULT 99999 COMMENT '电压测点25',
  `vol26` float NULL DEFAULT 99999 COMMENT '电压测点26',
  `vol27` float NULL DEFAULT 99999 COMMENT '电压测点27',
  `vol28` float NULL DEFAULT 99999 COMMENT '电压测点27',
  `vol29` float NULL DEFAULT 99999 COMMENT '电压测点28',
  `vol30` float NULL DEFAULT 99999 COMMENT '电压测点30',
  `acquisition_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '监测时间',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数据记录时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind1`(`device_id`) USING BTREE,
  INDEX `ind2`(`acquisition_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'zigbee通用测温模型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_data_zigbee_026010_mz
-- ----------------------------
DROP TABLE IF EXISTS `t_data_zigbee_026010_mz`;
CREATE TABLE `t_data_zigbee_026010_mz`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `device_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型编码',
  `linked_device` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被监测设备标识',
  `phase` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '相别',
  `device_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
  `device_id` int(11) NOT NULL COMMENT '设备id',
  `tem1` float NULL DEFAULT 99999 COMMENT '温度测点1',
  `tem2` float NULL DEFAULT 99999 COMMENT '温度测点2',
  `tem3` float NULL DEFAULT 99999 COMMENT '温度测点3',
  `tem4` float NULL DEFAULT 99999 COMMENT '温度测点4',
  `tem5` float NULL DEFAULT 99999 COMMENT '温度测点5',
  `tem6` float NULL DEFAULT 99999 COMMENT '温度测点6',
  `envtem` float NULL DEFAULT 99999 COMMENT '环境温度',
  `envhum` float NULL DEFAULT 99999 COMMENT '环境湿度',
  `vol` float NULL DEFAULT 99999 COMMENT '电压',
  `acquisition_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '监测时间',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数据记录时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind`(`device_id`) USING BTREE,
  INDEX `ind2`(`acquisition_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'zigbee通用测温多探头模型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_data_zigbee_027001
-- ----------------------------
DROP TABLE IF EXISTS `t_data_zigbee_027001`;
CREATE TABLE `t_data_zigbee_027001`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `device_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备类型编码',
  `linked_device` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被监测设备标识',
  `phase` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '相别',
  `device_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
  `device_id` int(11) NOT NULL COMMENT '设备id',
  `total_current` float NULL DEFAULT 99999 COMMENT '泄漏电流全电流',
  `resistive_vurrent` float NULL DEFAULT 99999 COMMENT '泄漏电流阻性电流',
  `thunderstrike_times` float NULL DEFAULT 99999 COMMENT '动作次数',
  `temperature` float NULL DEFAULT 99999 COMMENT '温度',
  `humidity` float NULL DEFAULT 99999 COMMENT '相对湿度',
  `lightning_current` float NULL DEFAULT 99999 COMMENT '雷击电流',
  `harmonic_current` float NULL DEFAULT 99999 COMMENT '三次谐波电流',
  `acquisition_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '监测时间',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数据记录时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind1`(`device_id`) USING BTREE,
  INDEX `ind2`(`acquisition_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'zigbee通用避雷器监测模型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_relation_user_area
-- ----------------------------
DROP TABLE IF EXISTS `t_relation_user_area`;
CREATE TABLE `t_relation_user_area`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NOT NULL COMMENT '用户ID',
  `areaid` int(11) NULL DEFAULT NULL COMMENT '区域ID',
  `ct` datetime(0) NULL DEFAULT NULL COMMENT '关系创建时间',
  `cr` int(11) NULL DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ind1`(`userid`) USING BTREE,
  INDEX `ind2`(`areaid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2659 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS `t_data_optimize`;
CREATE TABLE `t_data_optimize` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `model_id` int(11) DEFAULT NULL COMMENT '模型ID。表示下属属性的默认优化配置',
  `device_id` int(11) DEFAULT NULL COMMENT '指定优化设备ID',
  `mp_cnf` text NOT NULL COMMENT '测点优化配置内容。JSON格式',
  `cr` int(255) DEFAULT NULL COMMENT '配置人',
  `ct` datetime DEFAULT NULL COMMENT '配置日期',
  PRIMARY KEY (`id`),
  KEY `ind1` (`model_id`),
  KEY `ind2` (`device_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `t_data_optimize_fillrule`;
CREATE TABLE `t_data_optimize_fillrule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `model_id` int(11) DEFAULT NULL COMMENT '模型ID。表示下属属性的默认优化配置',
  `device_id` int(11) DEFAULT NULL COMMENT '指定优化设备ID',
  `fill_cnf` text NOT NULL COMMENT '测点优化配置内容。JSON格式',
  `cr` int(255) DEFAULT NULL COMMENT '配置人',
  `ct` datetime DEFAULT NULL COMMENT '配置日期',
  PRIMARY KEY (`id`),
  KEY `ind1` (`device_id`),
  KEY `ind2` (`model_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='填充规则配置';


-- ----------------------------
-- Table structure for t_base_absolute_alarm
-- ----------------------------
DROP TABLE IF EXISTS `t_base_absolute_alarm`;
CREATE TABLE `t_base_absolute_alarm` (
                                         `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                         `strategy_name` varchar(100) NOT NULL COMMENT '策略名称',
                                         `alarm_level` int(11) NOT NULL COMMENT '告警等级',
                                         `mod_name` varchar(50) NOT NULL COMMENT '模型名称',
                                         `mod_id` bigint(20) NOT NULL COMMENT '模型id',
                                         `operation_symbol` varchar(50) NOT NULL COMMENT '操作符号',
                                         `threshold` float(11,2) NOT NULL COMMENT '阈值',
  PRIMARY KEY (`id`),
  KEY `t_base_absolute_alarm_mod_id_IDX` (`mod_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COMMENT='绝对值告警设置';

-- ----------------------------
-- Table structure for t_base_alarm_his
-- ----------------------------
DROP TABLE IF EXISTS `t_base_alarm_his`;
CREATE TABLE `t_base_alarm_his` (
                                    `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                    `deviceid` bigint(20) NOT NULL COMMENT '设备id',
                                    `devicename` varchar(50) DEFAULT NULL COMMENT '设备名称',
                                    `mpid` bigint(20) NOT NULL COMMENT '测点id',
                                    `mpname` varchar(50) DEFAULT NULL COMMENT '测点名称',
                                    `alarm_desc` varchar(500) DEFAULT NULL COMMENT '告警描述',
                                    `alarm_type` int(11) DEFAULT NULL COMMENT '告警类别1:绝对值,2:升温,3:温度不平衡',
                                    `strategyid` bigint(20) DEFAULT NULL COMMENT '告警策略id',
                                    `alarm_value` float(11,2) DEFAULT NULL COMMENT '报警数值',
  `confirm` int(11) DEFAULT '0' COMMENT '用户是否确认',
  `confirmtime` varchar(20) DEFAULT NULL COMMENT '用户确认时间',
  `alarm_level` int(11) DEFAULT NULL COMMENT '告警等级',
  `region_id` int(11) DEFAULT NULL COMMENT '区域id',
  `is_reset` int(11) DEFAULT '0' COMMENT '是否复归',
  `create_at` datetime DEFAULT NULL COMMENT '告警发生时间',
  PRIMARY KEY (`id`),
  KEY `t_base_alarm_his_deviceid_IDX` (`deviceid`) USING BTREE,
  KEY `t_base_alarm_his_mpid_IDX` (`mpid`) USING BTREE,
  KEY `t_base_alarm_his_is_reset_IDX` (`is_reset`) USING BTREE,
  KEY `t_base_alarm_his_devicename_IDX` (`devicename`) USING BTREE,
  KEY `t_base_alarm_his_mpname_IDX` (`mpname`) USING BTREE,
  KEY `t_base_alarm_his_alarm_value_IDX` (`alarm_value`) USING BTREE,
  KEY `t_base_alarm_his_confirm_IDX` (`confirm`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=utf8 COMMENT='告警历史数据台账';

-- ----------------------------
-- Table structure for t_base_alarm_mplist
-- ----------------------------
DROP TABLE IF EXISTS `t_base_alarm_mplist`;
CREATE TABLE `t_base_alarm_mplist` (
                                       `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
                                       `fk_id` bigint(20) NOT NULL COMMENT '绝对告警或者升温告警主表id',
                                       `alarm_type` int(11) unsigned NOT NULL COMMENT '告警类型1：绝对值，2：升温',
                                       `mod_id` bigint(20) NOT NULL COMMENT '模型id',
                                       `mod_name` varchar(50) NOT NULL COMMENT '模型名称',
                                       `attrname` varchar(50) NOT NULL COMMENT '测点属性名称',
                                       PRIMARY KEY (`id`),
                                       KEY `t_base_alarm_mplist_fk_id_IDX` (`fk_id`) USING BTREE,
                                       KEY `t_base_alarm_mplist_alarm_type_IDX` (`alarm_type`) USING BTREE,
                                       KEY `t_base_alarm_mplist_attrname_IDX` (`attrname`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=973 DEFAULT CHARSET=utf8 COMMENT='告警设置测点列表';

-- ----------------------------
-- Table structure for t_base_alone_alarm
-- ----------------------------
DROP TABLE IF EXISTS `t_base_alone_alarm`;
CREATE TABLE `t_base_alone_alarm` (
                                      `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                      `deviceid` bigint(20) NOT NULL COMMENT '设备id',
                                      `mpid` bigint(20) NOT NULL COMMENT '测点id',
                                      `attrname` varchar(50) DEFAULT NULL COMMENT '测点属性',
                                      `mpname` varchar(50) DEFAULT NULL COMMENT '测点名称',
                                      `alarm_type` int(11) DEFAULT NULL COMMENT '告警类型1：绝对值，2：升温',
                                      `alarm_id` bigint(20) DEFAULT NULL COMMENT '告警模版id',
                                      `upcycle` int(11) DEFAULT NULL COMMENT '上升周期',
                                      `threshold` float(11,2) NOT NULL COMMENT '阈值',
  PRIMARY KEY (`id`),
  KEY `t_base_alone_alarm_deviceid_IDX` (`deviceid`) USING BTREE,
  KEY `t_base_alone_alarm_mpid_IDX` (`mpid`) USING BTREE,
  KEY `t_base_alone_alarm_alarm_id_IDX` (`alarm_id`) USING BTREE,
  KEY `t_base_alone_alarm_alarm_type_IDX` (`alarm_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=335 DEFAULT CHARSET=utf8 COMMENT='测点独立配置';

-- ----------------------------
-- Table structure for t_base_blacklist
-- ----------------------------
DROP TABLE IF EXISTS `t_base_blacklist`;
CREATE TABLE `t_base_blacklist` (
                                    `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                    `area` varchar(100) NOT NULL COMMENT '区域',
                                    `deviceid` bigint(20) NOT NULL COMMENT '设备id',
                                    `devicename` varchar(100) NOT NULL COMMENT '设备名称',
                                    `devicecode` varchar(100) NOT NULL COMMENT '设备编号',
                                    `creator` varchar(50) NOT NULL COMMENT '添加人',
                                    PRIMARY KEY (`id`),
                                    KEY `t_base_blacklist_deviceid_IDX` (`deviceid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='黑名单表';

-- ----------------------------
-- Table structure for t_base_blacklist_mplist
-- ----------------------------
DROP TABLE IF EXISTS `t_base_blacklist_mplist`;
CREATE TABLE `t_base_blacklist_mplist` (
                                           `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                           `deviceid` bigint(20) NOT NULL COMMENT '设备id',
                                           `mpid` bigint(20) NOT NULL COMMENT '测点id',
                                           PRIMARY KEY (`id`),
                                           KEY `t_base_blacklist_mplist_deviceid_IDX` (`deviceid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='黑名单测点明细表';

-- ----------------------------
-- Table structure for t_base_rise_alarm
-- ----------------------------
DROP TABLE IF EXISTS `t_base_rise_alarm`;
CREATE TABLE `t_base_rise_alarm` (
                                     `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                     `strategy_name` varchar(100) NOT NULL COMMENT '策略名称',
                                     `alarm_level` int(11) NOT NULL COMMENT '告警等级',
                                     `mod_name` varchar(50) NOT NULL COMMENT '模型名称',
                                     `mod_id` bigint(20) NOT NULL COMMENT '模型id',
                                     `upcycle` int(11) NOT NULL COMMENT '上升周期',
                                     `scope` float(11,2) NOT NULL COMMENT '阈值',
  `alarm_type` int(11) DEFAULT NULL COMMENT '告警类型1:绝对值，2：升温，3：温度不平衡',
  PRIMARY KEY (`id`),
  KEY `t_base_rise_alarm_mod_id_IDX` (`mod_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='升温告警设置';

-- ----------------------------
-- Table structure for t_base_unbalance_alarm
-- ----------------------------
DROP TABLE IF EXISTS `t_base_unbalance_alarm`;
CREATE TABLE `t_base_unbalance_alarm` (
                                          `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                          `strategy_name` varchar(100) NOT NULL COMMENT '策略名称',
                                          `alarm_level` int(11) NOT NULL COMMENT '告警等级',
                                          `operation_symbol` varchar(50) NOT NULL COMMENT '操作符号',
                                          `threshold` int(11) NOT NULL COMMENT '阈值',
                                          `alarm_type` int(11) DEFAULT NULL COMMENT '告警类型1:绝对值，2：升温，3：温度不平衡',
                                          PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='温度不平衡告警';
SET FOREIGN_KEY_CHECKS = 1;
