using System.ComponentModel.DataAnnotations;
using foundation_system.Models;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;

namespace foundation_system.Models.ViewModels;

public class AntecedentesViewModel
{
    [ValidateNever]
    public Nino? Nino { get; set; }
    
    [ValidateNever]
    public List<AntecedenteNino> Historial { get; set; } = new();
    
    // Form fields for new record
    [Required(ErrorMessage = "La fecha es requerida")]
    [Display(Name = "Fecha del Incidente")]
    public DateTime FechaIncidente { get; set; } = DateTime.UtcNow;

    [Required(ErrorMessage = "El tipo de antecedente es requerido")]
    [Display(Name = "Tipo de Antecedente")]
    public string TipoAntecedente { get; set; } = string.Empty;

    [Required(ErrorMessage = "La descripción es requerida")]
    [Display(Name = "Descripción")]
    public string Descripcion { get; set; } = string.Empty;

    [Required(ErrorMessage = "La gravedad es requerida")]
    [Display(Name = "Gravedad")]
    public string Gravedad { get; set; } = string.Empty;
}
