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

namespace TakeoutSaaS.Domain.Orders.Entities;

/// <summary>
/// 售后/退款申请。
/// </summary>
public sealed class RefundRequest : MultiTenantEntityBase
{
    /// <summary>
    /// 关联订单标识。
    /// </summary>
    public long OrderId { get; set; }

    /// <summary>
    /// 退款单号。
    /// </summary>
    public string RefundNo { get; set; } = string.Empty;

    /// <summary>
    /// 申请金额。
    /// </summary>
    public decimal Amount { get; set; }

    /// <summary>
    /// 申请原因。
    /// </summary>
    public string Reason { get; set; } = string.Empty;

    /// <summary>
    /// 退款状态。
    /// </summary>
    public RefundStatus Status { get; set; } = RefundStatus.Pending;

    /// <summary>
    /// 用户提交时间。
    /// </summary>
    public DateTime RequestedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 审核完成时间。
    /// </summary>
    public DateTime? ProcessedAt { get; set; }

    /// <summary>
    /// 审核备注。
    /// </summary>
    public string? ReviewNotes { get; set; }
}
