haoge/src/main/java/com/example/demo/model/Event.java

146 lines
3.5 KiB
Java
Raw Normal View History

2026-06-09 07:58:18 +00:00
package com.example.demo.model;
import com.example.demo.model.enums.EventSourceType;
import com.example.demo.model.enums.EventStatus;
import com.example.demo.model.enums.ThreatLevel;
import java.time.LocalDateTime;
/**
* 事件实体模型
* <p>
* 对应数据库表 T_EVENT_INFO表示从传感器接收到的原始事件
* 经过数据清洗与标准化后形成的内部表示
* </p>
*/
public class Event {
/** 事件唯一标识全局唯一ID */
private String eventId;
/** 事件来源类型1-雷达, 2-光电 */
private EventSourceType sourceType;
/** 事件发生时间,精确到毫秒 */
private LocalDateTime occurTime;
/** 目标经纬度JSON格式存储如 {"lng": 116.397, "lat": 39.908} */
private String location;
/** 事件置信度范围0.0~1.0 */
private double confidence;
/** 处理状态码0-待处理, 1-已完成 */
private EventStatus status;
/** 威胁等级 */
private ThreatLevel threatLevel;
/** 事件类型:临机/规划 */
private String eventType;
/** 创建时间,默认系统当前时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
public Event() {
}
public Event(String eventId, EventSourceType sourceType, LocalDateTime occurTime,
String location, double confidence, EventStatus status,
ThreatLevel threatLevel, String eventType) {
this.eventId = eventId;
this.sourceType = sourceType;
this.occurTime = occurTime;
this.location = location;
this.confidence = confidence;
this.status = status;
this.threatLevel = threatLevel;
this.eventType = eventType;
this.createTime = LocalDateTime.now();
this.updateTime = LocalDateTime.now();
}
public String getEventId() {
return eventId;
}
public void setEventId(String eventId) {
this.eventId = eventId;
}
public EventSourceType getSourceType() {
return sourceType;
}
public void setSourceType(EventSourceType sourceType) {
this.sourceType = sourceType;
}
public LocalDateTime getOccurTime() {
return occurTime;
}
public void setOccurTime(LocalDateTime occurTime) {
this.occurTime = occurTime;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public double getConfidence() {
return confidence;
}
public void setConfidence(double confidence) {
this.confidence = confidence;
}
public EventStatus getStatus() {
return status;
}
public void setStatus(EventStatus status) {
this.status = status;
}
public ThreatLevel getThreatLevel() {
return threatLevel;
}
public void setThreatLevel(ThreatLevel threatLevel) {
this.threatLevel = threatLevel;
}
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
}