using System.ComponentModel.DataAnnotations;

namespace WebVentaCoche.ViewModels
{
    public class SecurityViewModel
    {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Contraseña actual")]
        public string CurrentPassword { get; set; } = null!;

        [Required]
        [StringLength(100, ErrorMessage = "La {0} debe tener al menos {2} y como máximo {1} caracteres.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Nueva contraseña")]
        public string NewPassword { get; set; } = null!;

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Confirmar nueva contraseña")]
        [Compare("NewPassword", ErrorMessage = "La nueva contraseña y la confirmación no coinciden.")]
        public string ConfirmNewPassword { get; set; } = null!;

        [Display(Name = "Autenticación multifactor habilitada")]
        public bool Is2faEnabled { get; set; }

        //Opcional: codigo de verificación para MFA
        [DataType(DataType.Text)]
        [Display(Name = "Código de verificación MFA")]
        public string? TwoFactorCode { get; set; }
    }
}
