搭建消息告警模块以及跨网推送服务,支持企微,飞书,钉钉通知
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
|
||||
namespace Model.Entity.Inspection
|
||||
{
|
||||
/// <summary>
|
||||
/// 跨网推送发件箱(内网只写此表;跳板机上的 AlertBridge 控制台程序轮询拉取,
|
||||
/// 在外网推送飞书/钉钉/企微后回写结果,实现工控内网与即时通讯软件的隔离穿透)
|
||||
/// </summary>
|
||||
public class AlertOutboxEntity : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 告警消息Id(关联 AlertMessageEntity.Id)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "告警消息Id")]
|
||||
public long AlertId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 渠道Id(关联 AlertNotifyChannelEntity.Id)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "渠道Id")]
|
||||
public long ChannelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完整推送报文(自包含 JSON:渠道类型/WebhookUrl/Secret/标题/内容/@列表,
|
||||
/// AlertBridge 拉取后无需再查任何配置即可直接推送)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "推送报文", ColumnDataType = "text", IsNullable = true)]
|
||||
public string Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(1待推送/2已拉取/3成功/4失败)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态")]
|
||||
public OutboxStatusEnum Status { get; set; } = OutboxStatusEnum.Pending;
|
||||
|
||||
/// <summary>
|
||||
/// 重试次数(AlertBridge 推送失败回写时累加)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "重试次数")]
|
||||
public int RetryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "拉取时间", IsNullable = true)]
|
||||
public DateTime? PullTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完成时间(成功/失败回写时间)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "完成时间", IsNullable = true)]
|
||||
public DateTime? FinishTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果信息(失败原因等)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "结果信息", Length = 500, IsNullable = true)]
|
||||
public string ResultMsg { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user