|
@@ -1,6 +1,8 @@
|
|
|
package com.persagy.apm.dmpalarm.model;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
@@ -12,109 +14,115 @@ import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 报警定义(AlarmConfig)实体类
|
|
|
+ *
|
|
|
* @author lixing
|
|
|
* @version V1.0 2021-12-09 10:44:53
|
|
|
*/
|
|
|
-@EqualsAndHashCode(callSuper = true)
|
|
|
@Data
|
|
|
@ApiModel(description = "报警定义")
|
|
|
-public class AlarmConfig extends AuditableEntity<AlarmConfig> implements Serializable {
|
|
|
- private static final long serialVersionUID = -50363859666957294L;
|
|
|
-
|
|
|
- @ApiModelProperty("对象id")
|
|
|
- private String objId;
|
|
|
-
|
|
|
- @ApiModelProperty("对象类型编码")
|
|
|
- private String classCode;
|
|
|
-
|
|
|
- @ApiModelProperty("项目id")
|
|
|
- private String projectId;
|
|
|
-
|
|
|
- @ApiModelProperty("集团编码")
|
|
|
- private String groupCode;
|
|
|
-
|
|
|
- @ApiModelProperty("报警条目编码")
|
|
|
- private String itemCode;
|
|
|
-
|
|
|
- @ApiModelProperty("报警匹配条件id")
|
|
|
- private String targetId;
|
|
|
-
|
|
|
- @ApiModelProperty("报警分类")
|
|
|
- private String category;
|
|
|
-
|
|
|
- @ApiModelProperty("严重程度")
|
|
|
- private String level;
|
|
|
-
|
|
|
- @ApiModelProperty("备注")
|
|
|
- private String remark;
|
|
|
-
|
|
|
- @ApiModelProperty("触发条件")
|
|
|
- private JSONObject condition;
|
|
|
-
|
|
|
- @ApiModelProperty("屏蔽状态 1-open、0- 屏蔽")
|
|
|
- private Integer open;
|
|
|
-
|
|
|
- @ApiModelProperty("是否重点关注")
|
|
|
- private Integer concern;
|
|
|
-
|
|
|
- @ApiModelProperty("是否自定义")
|
|
|
- private Integer userDefined;
|
|
|
-
|
|
|
- @ApiModelProperty("创建用户")
|
|
|
- private String createUser;
|
|
|
-
|
|
|
- @ApiModelProperty("创建时间")
|
|
|
- private Date createTime;
|
|
|
-
|
|
|
- @ApiModelProperty("更新用户")
|
|
|
- private String updateUser;
|
|
|
-
|
|
|
- @ApiModelProperty("更新时间")
|
|
|
- private Date updateTime;
|
|
|
-
|
|
|
- private List<AlarmConfig> alarmConfigs;
|
|
|
-
|
|
|
- /**
|
|
|
- * @description: <p>报警定义唯一标识; 当报警条目和报警匹配条件变化时会重新生成报警定义,
|
|
|
- * 因此在与其他系统进行通讯时,一般不使用报警定义的id作为其唯一标识,而是使用itemCode + objID作为其唯一标识</p>
|
|
|
- * @author: lixing
|
|
|
- * @company: Persagy Technology Co.,Ltd
|
|
|
- * @since: 2020/10/26 11:25 上午
|
|
|
- * @version: V1.0
|
|
|
- */
|
|
|
- @Data
|
|
|
- public class AlarmConfigUnique {
|
|
|
- private String itemCode;
|
|
|
- private String objId;
|
|
|
- private String targetId;
|
|
|
-
|
|
|
- AlarmConfigUnique(String itemCode, String objId, String targetId) {
|
|
|
- this.itemCode = itemCode;
|
|
|
- this.objId = objId;
|
|
|
- this.targetId = targetId;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public AlarmConfigUnique getAlarmConfigUnique() {
|
|
|
- return new AlarmConfigUnique(this.itemCode, this.objId, this.targetId);
|
|
|
- }
|
|
|
-
|
|
|
- public static String PROP_OBJ_ID = "obj_id";
|
|
|
- public static String PROP_CLASS_CODE = "class_code";
|
|
|
- public static String PROP_PROJECT_ID = "project_id";
|
|
|
- public static String PROP_GROUP_CODE = "group_code";
|
|
|
- public static String PROP_ITEM_CODE = "item_code";
|
|
|
- public static String PROP_TARGET_ID = "target_id";
|
|
|
- public static String PROP_CATEGORY = "category";
|
|
|
- public static String PROP_LEVEL = "level";
|
|
|
- public static String PROP_REMARK = "remark";
|
|
|
- public static String PROP_CONDITION = "condition";
|
|
|
- public static String PROP_OPEN = "open";
|
|
|
- public static String PROP_CONCERN = "concern";
|
|
|
- public static String PROP_USER_DEFINED = "user_defined";
|
|
|
- public static String PROP_CREATE_USER = "create_user";
|
|
|
- public static String PROP_CREATE_TIME = "create_time";
|
|
|
- public static String PROP_UPDATE_USER = "update_user";
|
|
|
- public static String PROP_UPDATE_TIME = "update_time";
|
|
|
+public class AlarmConfig implements Serializable {
|
|
|
+ private static final long serialVersionUID = -50363859666957294L;
|
|
|
+ private String id;
|
|
|
+ @ApiModelProperty("对象id")
|
|
|
+ private String objId;
|
|
|
+
|
|
|
+ @ApiModelProperty("对象类型编码")
|
|
|
+ private String classCode;
|
|
|
+
|
|
|
+ @ApiModelProperty("项目id")
|
|
|
+ private String projectId;
|
|
|
+
|
|
|
+ @ApiModelProperty("集团编码")
|
|
|
+ private String groupCode;
|
|
|
+
|
|
|
+ @ApiModelProperty("报警条目编码")
|
|
|
+ private String itemCode;
|
|
|
+
|
|
|
+ @ApiModelProperty("报警匹配条件id")
|
|
|
+ private String targetId;
|
|
|
+
|
|
|
+ @ApiModelProperty("报警分类")
|
|
|
+ private String category;
|
|
|
+
|
|
|
+ @ApiModelProperty("严重程度")
|
|
|
+ private String level;
|
|
|
+
|
|
|
+ @ApiModelProperty("备注")
|
|
|
+ private String remark;
|
|
|
+
|
|
|
+ @ApiModelProperty("触发条件")
|
|
|
+ @TableField(value = "`condition`")
|
|
|
+ private JSONObject condition;
|
|
|
+
|
|
|
+ @ApiModelProperty("屏蔽状态 1-open、0- 屏蔽")
|
|
|
+ private Integer open;
|
|
|
+
|
|
|
+ @ApiModelProperty("是否重点关注")
|
|
|
+ private Integer concern;
|
|
|
+
|
|
|
+ @ApiModelProperty("是否自定义")
|
|
|
+ private Integer userDefined;
|
|
|
+
|
|
|
+ @ApiModelProperty("创建用户")
|
|
|
+ private String createUser;
|
|
|
+
|
|
|
+ @ApiModelProperty("创建时间")
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ @ApiModelProperty("更新用户")
|
|
|
+ private String updateUser;
|
|
|
+
|
|
|
+ @ApiModelProperty("更新时间")
|
|
|
+ private Date updateTime;
|
|
|
+
|
|
|
+ private Integer valid;
|
|
|
+
|
|
|
+ private List<AlarmConfig> alarmConfigs;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description:
|
|
|
+ * <p>
|
|
|
+ * 报警定义唯一标识; 当报警条目和报警匹配条件变化时会重新生成报警定义,
|
|
|
+ * 因此在与其他系统进行通讯时,一般不使用报警定义的id作为其唯一标识,而是使用itemCode + objID作为其唯一标识
|
|
|
+ * </p>
|
|
|
+ * @author: lixing
|
|
|
+ * @company: Persagy Technology Co.,Ltd
|
|
|
+ * @since: 2020/10/26 11:25 上午
|
|
|
+ * @version: V1.0
|
|
|
+ */
|
|
|
+ @Data
|
|
|
+ public class AlarmConfigUnique {
|
|
|
+ private String itemCode;
|
|
|
+ private String objId;
|
|
|
+ private String targetId;
|
|
|
+
|
|
|
+ AlarmConfigUnique(String itemCode, String objId, String targetId) {
|
|
|
+ this.itemCode = itemCode;
|
|
|
+ this.objId = objId;
|
|
|
+ this.targetId = targetId;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public AlarmConfigUnique getAlarmConfigUnique() {
|
|
|
+ return new AlarmConfigUnique(this.itemCode, this.objId, this.targetId);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String PROP_OBJ_ID = "obj_id";
|
|
|
+ public static String PROP_CLASS_CODE = "class_code";
|
|
|
+ public static String PROP_PROJECT_ID = "project_id";
|
|
|
+ public static String PROP_GROUP_CODE = "group_code";
|
|
|
+ public static String PROP_ITEM_CODE = "item_code";
|
|
|
+ public static String PROP_TARGET_ID = "target_id";
|
|
|
+ public static String PROP_CATEGORY = "category";
|
|
|
+ public static String PROP_LEVEL = "level";
|
|
|
+ public static String PROP_REMARK = "remark";
|
|
|
+ public static String PROP_CONDITION = "condition";
|
|
|
+ public static String PROP_OPEN = "open";
|
|
|
+ public static String PROP_CONCERN = "concern";
|
|
|
+ public static String PROP_USER_DEFINED = "user_defined";
|
|
|
+ public static String PROP_CREATE_USER = "create_user";
|
|
|
+ public static String PROP_CREATE_TIME = "create_time";
|
|
|
+ public static String PROP_UPDATE_USER = "update_user";
|
|
|
+ public static String PROP_UPDATE_TIME = "update_time";
|
|
|
|
|
|
}
|