- 新增 XuqmGroup 部署文档,包含部署方案、架构建议和部署步骤 - 添加安全设计规范,涵盖密码安全、AppSecret验证和服务端API认证 - 补充平台REST API规范,定义Server-to-Server调用接口和错误码 - 创建Java IM服务端SDK计划文档,规划Maven包发布和接口实现
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 appKey;
|
|
|
|
@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 getAppKey() { return appKey; }
|
|
public void setAppKey(String appKey) { this.appKey = appKey; }
|
|
|
|
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; }
|
|
}
|