using System.Text.Json.Serialization;

namespace HoneyBox.Model.Models.Equity;

/// <summary>
/// 权益等级信息响应
/// </summary>
public class EquityInfoResponse
{
    /// <summary>
    /// 用户权益信息
    /// </summary>
    [JsonPropertyName("userinfo")]
    public EquityUserInfoDto Userinfo { get; set; } = new();

    /// <summary>
    /// 权益等级列表
    /// </summary>
    [JsonPropertyName("data")]
    public List<EquityLevelDto> Data { get; set; } = new();
}

/// <summary>
/// 权益用户信息DTO
/// </summary>
public class EquityUserInfoDto
{
    /// <summary>
    /// 昵称
    /// </summary>
    [JsonPropertyName("nickname")]
    public string Nickname { get; set; } = string.Empty;

    /// <summary>
    /// 头像
    /// </summary>
    [JsonPropertyName("headimg")]
    public string Headimg { get; set; } = string.Empty;

    /// <summary>
    /// 当前权益等级
    /// </summary>
    [JsonPropertyName("vip")]
    public int Vip { get; set; }

    /// <summary>
    /// 升级所需金额
    /// </summary>
    [JsonPropertyName("upgrade_money")]
    public string UpgradeMoney { get; set; } = string.Empty;

    /// <summary>
    /// 下一个权益等级
    /// </summary>
    [JsonPropertyName("last_vip")]
    public int LastVip { get; set; }

    /// <summary>
    /// 升级进度百分比 (0-100)
    /// </summary>
    [JsonPropertyName("jin_du")]
    public decimal JinDu { get; set; }

    /// <summary>
    /// 提示信息
    /// </summary>
    [JsonPropertyName("notice")]
    public string Notice { get; set; } = string.Empty;
}

/// <summary>
/// 权益等级DTO
/// </summary>
public class EquityLevelDto
{
    /// <summary>
    /// 等级ID
    /// </summary>
    [JsonPropertyName("id")]
    public int Id { get; set; }

    /// <summary>
    /// 等级
    /// </summary>
    [JsonPropertyName("level")]
    public int Level { get; set; }

    /// <summary>
    /// 等级名称
    /// </summary>
    [JsonPropertyName("title")]
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 等级图标URL
    /// </summary>
    [JsonPropertyName("imgurl")]
    public string Imgurl { get; set; } = string.Empty;

    /// <summary>
    /// 升级条件金额（累计消费）
    /// </summary>
    [JsonPropertyName("condition")]
    public int Condition { get; set; }

    /// <summary>
    /// 折扣
    /// </summary>
    [JsonPropertyName("discount")]
    public decimal Discount { get; set; }

    /// <summary>
    /// 等级特权描述/提示信息
    /// </summary>
    [JsonPropertyName("notice")]
    public string Notice { get; set; } = string.Empty;
}
