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

namespace TakeoutSaaS.Domain.Orders.Entities;

/// <summary>
/// 订单状态流转记录。
/// </summary>
public sealed class OrderStatusHistory : MultiTenantEntityBase
{
    /// <summary>
    /// 订单标识。
    /// </summary>
    public long OrderId { get; set; }

    /// <summary>
    /// 变更后的状态。
    /// </summary>
    public OrderStatus Status { get; set; }

    /// <summary>
    /// 操作人标识（可为空表示系统）。
    /// </summary>
    public long? OperatorId { get; set; }

    /// <summary>
    /// 备注信息。
    /// </summary>
    public string? Notes { get; set; }

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