using SqlSugar; namespace YY.Admin.Core.Models; /// /// 断联续传消息实体。 /// [SugarTable("outbox_messages")] public class OutboxMessage { [SugarColumn(IsPrimaryKey = true, Length = 64)] public string Id { get; set; } = Guid.NewGuid().ToString("N"); [SugarColumn(Length = 128, IsNullable = false)] public string AggregateType { get; set; } = string.Empty; [SugarColumn(Length = 128, IsNullable = false)] public string AggregateId { get; set; } = string.Empty; [SugarColumn(Length = 128, IsNullable = false)] public string EventType { get; set; } = string.Empty; [SugarColumn(ColumnDataType = "TEXT", IsNullable = false)] public string Payload { get; set; } = string.Empty; [SugarColumn(IsNullable = false)] public int Status { get; set; } [SugarColumn(IsNullable = false)] public int RetryCount { get; set; } [SugarColumn(Length = 2000, IsNullable = true)] public string? ErrorMessage { get; set; } [SugarColumn(IsNullable = false)] public DateTime CreatedAt { get; set; } = DateTime.UtcNow; [SugarColumn(IsNullable = true)] public DateTime? LastTriedAt { get; set; } [SugarColumn(IsNullable = true)] public DateTime? SentAt { get; set; } }