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

namespace TakeoutSaaS.Domain.Membership.Entities;

/// <summary>
/// 会员档案。
/// </summary>
public sealed class MemberProfile : MultiTenantEntityBase
{
    /// <summary>
    /// 用户标识。
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 手机号。
    /// </summary>
    public string Mobile { get; set; } = string.Empty;

    /// <summary>
    /// 昵称。
    /// </summary>
    public string? Nickname { get; set; }

    /// <summary>
    /// 头像。
    /// </summary>
    public string? AvatarUrl { get; set; }

    /// <summary>
    /// 当前会员等级 ID。
    /// </summary>
    public long? MemberTierId { get; set; }

    /// <summary>
    /// 储值余额。
    /// </summary>
    public decimal StoredBalance { get; set; }

    /// <summary>
    /// 储值实充余额。
    /// </summary>
    public decimal StoredRechargeBalance { get; set; }

    /// <summary>
    /// 储值赠金余额。
    /// </summary>
    public decimal StoredGiftBalance { get; set; }

    /// <summary>
    /// 会员状态。
    /// </summary>
    public MemberStatus Status { get; set; } = MemberStatus.Active;

    /// <summary>
    /// 会员积分余额。
    /// </summary>
    public int PointsBalance { get; set; }

    /// <summary>
    /// 成长值/经验值。
    /// </summary>
    public int GrowthValue { get; set; }

    /// <summary>
    /// 生日。
    /// </summary>
    public DateTime? BirthDate { get; set; }

    /// <summary>
    /// 注册时间。
    /// </summary>
    public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
}
