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

namespace TakeoutSaaS.Domain.Membership.Entities;

/// <summary>
/// 会员储值卡充值记录。
/// </summary>
public sealed class MemberStoredCardRechargeRecord : MultiTenantEntityBase
{
    /// <summary>
    /// 门店标识。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// 会员标识。
    /// </summary>
    public long MemberId { get; set; }

    /// <summary>
    /// 充值方案标识（可空，表示非方案充值）。
    /// </summary>
    public long? PlanId { get; set; }

    /// <summary>
    /// 充值单号。
    /// </summary>
    public string RecordNo { get; set; } = string.Empty;

    /// <summary>
    /// 会员名称快照。
    /// </summary>
    public string MemberName { get; set; } = string.Empty;

    /// <summary>
    /// 会员手机号快照（脱敏）。
    /// </summary>
    public string MemberMobileMasked { get; set; } = string.Empty;

    /// <summary>
    /// 充值金额。
    /// </summary>
    public decimal RechargeAmount { get; set; }

    /// <summary>
    /// 赠送金额。
    /// </summary>
    public decimal GiftAmount { get; set; }

    /// <summary>
    /// 到账金额（充值+赠送）。
    /// </summary>
    public decimal ArrivedAmount { get; set; }

    /// <summary>
    /// 支付方式。
    /// </summary>
    public PaymentMethod PaymentMethod { get; set; } = PaymentMethod.Unknown;

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

    /// <summary>
    /// 充值时间（UTC）。
    /// </summary>
    public DateTime RechargedAt { get; set; }
}
