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

namespace TakeoutSaaS.Domain.Ordering.Entities;

/// <summary>
/// 结账会话，记录校验上下文。
/// </summary>
public sealed class CheckoutSession : MultiTenantEntityBase
{
    /// <summary>
    /// 用户标识。
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 门店标识。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// 会话 Token。
    /// </summary>
    public string SessionToken { get; set; } = string.Empty;

    /// <summary>
    /// 会话状态。
    /// </summary>
    public CheckoutSessionStatus Status { get; set; } = CheckoutSessionStatus.Pending;

    /// <summary>
    /// 校验结果明细 JSON。
    /// </summary>
    public string ValidationResultJson { get; set; } = string.Empty;

    /// <summary>
    /// 过期时间（UTC）。
    /// </summary>
    public DateTime ExpiresAt { get; set; }
}
