143 lines
2.6 KiB
Java
143 lines
2.6 KiB
Java
package com.dongni.collisionavoidance.websocket.message;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* 规则状态变更WebSocket消息载荷
|
|
* 用于实时推送规则状态变更到前端
|
|
*
|
|
* @author AI Assistant
|
|
* @since 2025-01-17
|
|
*/
|
|
@Data
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
public class RuleStateChangePayload {
|
|
|
|
/**
|
|
* 规则ID
|
|
*/
|
|
@JsonProperty("ruleId")
|
|
private String ruleId;
|
|
|
|
/**
|
|
* 规则名称
|
|
*/
|
|
@JsonProperty("ruleName")
|
|
private String ruleName;
|
|
|
|
/**
|
|
* 规则类别
|
|
*/
|
|
@JsonProperty("ruleCategory")
|
|
private String ruleCategory;
|
|
|
|
/**
|
|
* 变更类型 (ACTIVATED, DEACTIVATED, PAUSED, CONFIG_UPDATED等)
|
|
*/
|
|
@JsonProperty("changeType")
|
|
private String changeType;
|
|
|
|
/**
|
|
* 原状态
|
|
*/
|
|
@JsonProperty("fromStatus")
|
|
private String fromStatus;
|
|
|
|
/**
|
|
* 新状态
|
|
*/
|
|
@JsonProperty("toStatus")
|
|
private String toStatus;
|
|
|
|
/**
|
|
* 变更时间
|
|
*/
|
|
@JsonProperty("changeTime")
|
|
private LocalDateTime changeTime;
|
|
|
|
/**
|
|
* 变更原因
|
|
*/
|
|
@JsonProperty("reason")
|
|
private String reason;
|
|
|
|
/**
|
|
* 变更操作人
|
|
*/
|
|
@JsonProperty("changedBy")
|
|
private String changedBy;
|
|
|
|
/**
|
|
* 是否影响运行时
|
|
*/
|
|
@JsonProperty("affectsRuntime")
|
|
private Boolean affectsRuntime;
|
|
|
|
/**
|
|
* 严重程度评分 (1-10)
|
|
*/
|
|
@JsonProperty("severityScore")
|
|
private Integer severityScore;
|
|
|
|
/**
|
|
* 是否需要通知
|
|
*/
|
|
@JsonProperty("requiresNotification")
|
|
private Boolean requiresNotification;
|
|
|
|
/**
|
|
* 影响范围
|
|
*/
|
|
@JsonProperty("impactScope")
|
|
private String impactScope;
|
|
|
|
/**
|
|
* 变更描述
|
|
*/
|
|
@JsonProperty("description")
|
|
private String description;
|
|
|
|
/**
|
|
* 相关配置变更
|
|
*/
|
|
@JsonProperty("configChanges")
|
|
private Object configChanges;
|
|
|
|
/**
|
|
* 生效时间
|
|
*/
|
|
@JsonProperty("effectiveTime")
|
|
private LocalDateTime effectiveTime;
|
|
|
|
/**
|
|
* 过期时间 (如果适用)
|
|
*/
|
|
@JsonProperty("expiryTime")
|
|
private LocalDateTime expiryTime;
|
|
|
|
/**
|
|
* 变更上下文
|
|
*/
|
|
@JsonProperty("context")
|
|
private Object context;
|
|
|
|
/**
|
|
* 回滚信息 (如果支持)
|
|
*/
|
|
@JsonProperty("rollbackInfo")
|
|
private Object rollbackInfo;
|
|
|
|
/**
|
|
* 通知级别
|
|
*/
|
|
@JsonProperty("notificationLevel")
|
|
private String notificationLevel;
|
|
} |