using System.ComponentModel.DataAnnotations;

namespace TakeoutSaaS.Application.Identity.Contracts;

/// <summary>
/// 微信小程序登录请求。
/// </summary>
public sealed class WeChatLoginRequest
{
    /// <summary>
    /// wx.login 返回的临时 code。
    /// </summary>
    [Required]
    [MaxLength(128)]
    public string Code { get; set; } = string.Empty;

    /// <summary>
    /// 用户昵称。
    /// </summary>
    [MaxLength(64)]
    public string? Nickname { get; set; }

    /// <summary>
    /// 头像地址。
    /// </summary>
    [MaxLength(256)]
    public string? Avatar { get; set; }

    /// <summary>
    /// 加密用户数据。
    /// </summary>
    public string? EncryptedData { get; set; }

    /// <summary>
    /// 加密向量。
    /// </summary>
    public string? Iv { get; set; }
}
