71 行
2.4 KiB
Java
71 行
2.4 KiB
Java
|
|
package com.xuqm.im.entity;
|
||
|
|
|
||
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||
|
|
import com.xuqm.im.json.EpochMillisLocalDateTimeSerializer;
|
||
|
|
import jakarta.persistence.Column;
|
||
|
|
import jakarta.persistence.Entity;
|
||
|
|
import jakarta.persistence.Id;
|
||
|
|
import jakarta.persistence.Table;
|
||
|
|
import java.time.LocalDateTime;
|
||
|
|
|
||
|
|
@Entity
|
||
|
|
@Table(name = "im_webhook_alert")
|
||
|
|
public class WebhookAlertEntity {
|
||
|
|
|
||
|
|
@Id
|
||
|
|
private String id;
|
||
|
|
|
||
|
|
@Column(nullable = false, length = 64)
|
||
|
|
private String appId;
|
||
|
|
|
||
|
|
@Column(nullable = false, length = 64)
|
||
|
|
private String webhookId;
|
||
|
|
|
||
|
|
@Column(nullable = false, length = 512)
|
||
|
|
private String webhookUrl;
|
||
|
|
|
||
|
|
@Column(nullable = false, length = 32)
|
||
|
|
private String alertType;
|
||
|
|
|
||
|
|
@Column(length = 512)
|
||
|
|
private String description;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
private boolean acknowledged;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
@JsonSerialize(using = EpochMillisLocalDateTimeSerializer.class)
|
||
|
|
private LocalDateTime createdAt;
|
||
|
|
|
||
|
|
@JsonSerialize(using = EpochMillisLocalDateTimeSerializer.class)
|
||
|
|
private LocalDateTime acknowledgedAt;
|
||
|
|
|
||
|
|
public String getId() { return id; }
|
||
|
|
public void setId(String id) { this.id = id; }
|
||
|
|
|
||
|
|
public String getAppId() { return appId; }
|
||
|
|
public void setAppId(String appId) { this.appId = appId; }
|
||
|
|
|
||
|
|
public String getWebhookId() { return webhookId; }
|
||
|
|
public void setWebhookId(String webhookId) { this.webhookId = webhookId; }
|
||
|
|
|
||
|
|
public String getWebhookUrl() { return webhookUrl; }
|
||
|
|
public void setWebhookUrl(String webhookUrl) { this.webhookUrl = webhookUrl; }
|
||
|
|
|
||
|
|
public String getAlertType() { return alertType; }
|
||
|
|
public void setAlertType(String alertType) { this.alertType = alertType; }
|
||
|
|
|
||
|
|
public String getDescription() { return description; }
|
||
|
|
public void setDescription(String description) { this.description = description; }
|
||
|
|
|
||
|
|
public boolean isAcknowledged() { return acknowledged; }
|
||
|
|
public void setAcknowledged(boolean acknowledged) { this.acknowledged = acknowledged; }
|
||
|
|
|
||
|
|
public LocalDateTime getCreatedAt() { return createdAt; }
|
||
|
|
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||
|
|
|
||
|
|
@JsonSerialize(using = EpochMillisLocalDateTimeSerializer.class)
|
||
|
|
public LocalDateTime getAcknowledgedAt() { return acknowledgedAt; }
|
||
|
|
public void setAcknowledgedAt(LocalDateTime acknowledgedAt) { this.acknowledgedAt = acknowledgedAt; }
|
||
|
|
}
|