namespace HoneyBox.Model.Models.Auth;

/// <summary>
/// 微信认证结果DTO
/// </summary>
public class WechatAuthResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 微信openid
    /// </summary>
    public string? OpenId { get; set; }

    /// <summary>
    /// 微信unionid
    /// </summary>
    public string? UnionId { get; set; }

    /// <summary>
    /// 错误信息
    /// </summary>
    public string? ErrorMessage { get; set; }
}

/// <summary>
/// 微信手机号结果DTO
/// </summary>
public class WechatMobileResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 手机号
    /// </summary>
    public string? Mobile { get; set; }

    /// <summary>
    /// 错误信息
    /// </summary>
    public string? ErrorMessage { get; set; }
}

/// <summary>
/// 微信小程序发货信息请求
/// </summary>
public class WechatShippingRequest
{
    /// <summary>
    /// 用户OpenId
    /// </summary>
    public string OpenId { get; set; } = string.Empty;

    /// <summary>
    /// 商户订单号
    /// </summary>
    public string OrderNo { get; set; } = string.Empty;

    /// <summary>
    /// 商户号（可选，不传则根据订单号自动匹配）
    /// </summary>
    public string? MchId { get; set; }

    /// <summary>
    /// 小程序AppId（可选，不传则使用默认配置）
    /// </summary>
    public string? AppId { get; set; }

    /// <summary>
    /// 商品描述（可选，默认为"本单购买商品已发放至[小程序盒柜]"）
    /// </summary>
    public string? ItemDesc { get; set; }

    /// <summary>
    /// 物流类型：1=实体物流，2=同城配送，3=虚拟商品，4=用户自提
    /// 默认为4（虚拟商品场景）
    /// </summary>
    public int LogisticsType { get; set; } = 4;
}

/// <summary>
/// 微信小程序发货信息结果
/// </summary>
public class WechatShippingResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 错误码（0表示成功）
    /// </summary>
    public int ErrorCode { get; set; }

    /// <summary>
    /// 错误信息
    /// </summary>
    public string? ErrorMessage { get; set; }

    /// <summary>
    /// 是否需要重试（发货失败时为true）
    /// </summary>
    public bool NeedRetry { get; set; }
}
