Files
2026-10-08 10:43:59 +08:00

28 lines
1.7 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using FreeSql.DataAnnotations;
using F9WebAiTest.Domain.Common;
namespace F9WebAiTest.Domain.Entities.Notice;
/// <summary>消息主表(业务系统触发创建,创建时即时投递并实时推送)</summary>
[Table(Name = "NotificationMessages")]
[Index("IX_NotificationMessages_MessageTypeCode", "MessageTypeCode")]
public class NotificationMessage : BaseEntity
{
public long NotificationTypeId { get; set; } // 消息类型ID
public string MessageTypeCode { get; set; } = ""; // 消息类型编码(冗余,路由查询免联表)
public string BusinessType { get; set; } = ""; // 业务类型标识
public string BusinessId { get; set; } = ""; // 业务单据ID
public string Title { get; set; } = ""; // 标题
public string Content { get; set; } = ""; // 内容
public NotificationPriority Priority { get; set; } = NotificationPriority.Normal; // 优先级
public NotificationStatus Status { get; set; } = NotificationStatus.Ready; // 状态
public int RetryCount { get; set; } // 重试次数
public int MaxRetryCount { get; set; } = 3; // 最大重试次数
public string BizContext { get; set; } = ""; // 业务上下文(JSON)
public string ForceReceivers { get; set; } = ""; // 强制接收人(JSON 数组,如 "[1001,1002]"),空=仅按订阅
public long CreatorId { get; set; } // 创建人ID
public string CreatorName { get; set; } = ""; // 创建人姓名
public NotificationCategory Category { get; set; } = NotificationCategory.Notification; // 消息分类(冗余,前端免联表)
public string RoutePath { get; set; } = ""; // Web 端跳转路由(最终值,由模板+业务ID生成)
}