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

namespace TakeoutSaaS.Domain.Billings.Entities;

/// <summary>
/// 租户支付记录。
/// </summary>
public sealed class TenantPayment : AuditableEntityBase
{
    /// <summary>
    /// 租户 ID（雪花算法）。
    /// </summary>
    public long TenantId { get; set; }

    /// <summary>
    /// 账单 ID（雪花算法）。
    /// </summary>
    public long BillingStatementId { get; set; }

    /// <summary>
    /// 支付金额。
    /// </summary>
    public decimal Amount { get; set; }

    /// <summary>
    /// 支付方式。
    /// </summary>
    public TenantPaymentMethod Method { get; set; }

    /// <summary>
    /// 支付状态。
    /// </summary>
    public TenantPaymentStatus Status { get; set; }

    /// <summary>
    /// 交易号。
    /// </summary>
    public string? TransactionNo { get; set; }

    /// <summary>
    /// 支付凭证 URL。
    /// </summary>
    public string? ProofUrl { get; set; }

    /// <summary>
    /// 支付时间。
    /// </summary>
    public DateTime? PaidAt { get; set; }

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

    /// <summary>
    /// 审核人 ID。
    /// </summary>
    public long? VerifiedBy { get; set; }

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

    /// <summary>
    /// 退款原因。
    /// </summary>
    public string? RefundReason { get; set; }

    /// <summary>
    /// 退款时间。
    /// </summary>
    public DateTime? RefundedAt { get; set; }
}
