using TakeoutSaaS.Domain.Deliveries.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Deliveries.Entities;

/// <summary>
/// 配送状态事件流水。
/// </summary>
public sealed class DeliveryEvent : MultiTenantEntityBase
{
    /// <summary>
    /// 配送单标识。
    /// </summary>
    public long DeliveryOrderId { get; set; }

    /// <summary>
    /// 事件类型。
    /// </summary>
    public DeliveryEventType EventType { get; set; } = DeliveryEventType.Updated;

    /// <summary>
    /// 事件描述。
    /// </summary>
    public string Message { get; set; } = string.Empty;

    /// <summary>
    /// 原始数据 JSON。
    /// </summary>
    public string? Payload { get; set; }

    /// <summary>
    /// 发生时间。
    /// </summary>
    public DateTime OccurredAt { get; set; } = DateTime.UtcNow;
}
