using System.Text.Json.Serialization;

namespace HoneyBox.Model.Models.Auth;

/// <summary>
/// 用户信息DTO
/// </summary>
public class UserInfoDto
{
    /// <summary>
    /// 用户ID
    /// </summary>
    [JsonPropertyName("id")]
    public int Id { get; set; }

    /// <summary>
    /// 用户唯一标识
    /// </summary>
    [JsonPropertyName("uid")]
    public string? Uid { get; set; }

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

    /// <summary>
    /// 头像URL
    /// </summary>
    public string? Headimg { get; set; }

    /// <summary>
    /// 脱敏后的手机号（格式：138****8000）
    /// </summary>
    public string? Mobile { get; set; }

    /// <summary>
    /// 是否绑定手机号：0否 1是
    /// </summary>
    public int MobileIs { get; set; }

    /// <summary>
    /// 账户余额
    /// </summary>
    public decimal Money { get; set; }

    /// <summary>
    /// 余额2/积分2
    /// </summary>
    public decimal Money2 { get; set; }

    /// <summary>
    /// 积分
    /// </summary>
    public decimal Integral { get; set; }

    /// <summary>
    /// 评分
    /// </summary>
    public decimal Score { get; set; }

    /// <summary>
    /// VIP等级
    /// </summary>
    public int Vip { get; set; }

    /// <summary>
    /// VIP等级图片URL
    /// </summary>
    public string? VipImgurl { get; set; }

    /// <summary>
    /// 优惠券数量
    /// </summary>
    public int Coupon { get; set; }

    /// <summary>
    /// 注册天数
    /// </summary>
    public int Day { get; set; }

    /// <summary>
    /// 权益等级信息
    /// </summary>
    public QuanYiLevelDto? QuanYiLevel { get; set; }
}

/// <summary>
/// 权益等级DTO
/// </summary>
public class QuanYiLevelDto
{
    /// <summary>
    /// 当前等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 距离下一级还差多少欧气值，-1表示已满级
    /// </summary>
    public int Cha { get; set; }

    /// <summary>
    /// 当前等级进度百分比 (0-100)
    /// </summary>
    public int Jindu { get; set; }
}
