using System.ComponentModel.DataAnnotations;

namespace HoneyBox.Admin.Models.Auth;

/// <summary>
/// 登录请求模型
/// </summary>
public class LoginRequest
{
    /// <summary>
    /// 用户名
    /// </summary>
    [Required(ErrorMessage = "用户名不能为空")]
    [MaxLength(50, ErrorMessage = "用户名长度不能超过50个字符")]
    public string Username { get; set; } = null!;

    /// <summary>
    /// 密码
    /// </summary>
    [Required(ErrorMessage = "密码不能为空")]
    [MaxLength(100, ErrorMessage = "密码长度不能超过100个字符")]
    public string Password { get; set; } = null!;

    /// <summary>
    /// 验证码Key
    /// </summary>
    [Required(ErrorMessage = "验证码Key不能为空")]
    public string CaptchaKey { get; set; } = null!;

    /// <summary>
    /// 验证码
    /// </summary>
    [Required(ErrorMessage = "验证码不能为空")]
    [MaxLength(10, ErrorMessage = "验证码长度不能超过10个字符")]
    public string CaptchaCode { get; set; } = null!;
}
