using System.ComponentModel.DataAnnotations;

namespace HoneyBox.Admin.Models.AdminUser;

/// <summary>
/// 更新管理员请求
/// </summary>
public class UpdateAdminUserRequest
{
    /// <summary>
    /// 真实姓名
    /// </summary>
    [MaxLength(50, ErrorMessage = "真实姓名最多50个字符")]
    public string? RealName { get; set; }

    /// <summary>
    /// 头像URL
    /// </summary>
    [MaxLength(500, ErrorMessage = "头像URL最多500个字符")]
    public string? Avatar { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    [MaxLength(100, ErrorMessage = "邮箱最多100个字符")]
    [EmailAddress(ErrorMessage = "邮箱格式不正确")]
    public string? Email { get; set; }

    /// <summary>
    /// 手机号
    /// </summary>
    [MaxLength(20, ErrorMessage = "手机号最多20个字符")]
    public string? Phone { get; set; }

    /// <summary>
    /// 部门ID
    /// </summary>
    public long? DepartmentId { get; set; }

    /// <summary>
    /// 状态：0禁用 1启用
    /// </summary>
    [Range(0, 1, ErrorMessage = "状态必须是0(禁用)或1(启用)")]
    public byte Status { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(500, ErrorMessage = "备注最多500个字符")]
    public string? Remark { get; set; }
}
