Files
qhmes/yy-admin-master/YY.Admin.Core/Core/Models/OutboxMessage.cs

44 lines
1.2 KiB
C#
Raw Normal View History

using SqlSugar;
namespace YY.Admin.Core.Models;
/// <summary>
/// 断联续传消息实体。
/// </summary>
[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; }
}