using System.ComponentModel.DataAnnotations;

namespace foundation_system.Models.ViewModels;

public class ColaboradorViewModel
{
    public long? Id { get; set; }
    public long? PersonaId { get; set; }

    [Required(ErrorMessage = "Los nombres son requeridos")]
    [Display(Name = "Nombres")]
    public string Nombres { get; set; } = string.Empty;

    [Required(ErrorMessage = "Los apellidos son requeridos")]
    [Display(Name = "Apellidos")]
    public string Apellidos { get; set; } = string.Empty;

    [Display(Name = "DUI")]
    public string? Dui { get; set; }

    [Display(Name = "NIT")]
    public string? Nit { get; set; }

    [Display(Name = "Fecha de Nacimiento")]
    [DataType(DataType.Date)]
    public DateOnly? FechaNacimiento { get; set; }

    [Display(Name = "Género")]
    public string? Genero { get; set; }

    [EmailAddress(ErrorMessage = "Email inválido")]
    public string? Email { get; set; }

    [Display(Name = "Teléfono")]
    public string? Telefono { get; set; }

    [Display(Name = "Dirección")]
    public string? Direccion { get; set; }

    [Required(ErrorMessage = "El cargo es requerido")]
    [Display(Name = "Cargo")]
    public long CargoId { get; set; }

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

    [Required(ErrorMessage = "La fecha de ingreso es requerida")]
    [Display(Name = "Fecha de Ingreso")]
    [DataType(DataType.Date)]
    public DateOnly FechaIngreso { get; set; } = DateOnly.FromDateTime(DateTime.Today);

    [Display(Name = "Horario de Entrada")]
    [DataType(DataType.Time)]
    public TimeSpan? HorarioEntrada { get; set; }

    [Display(Name = "Horario de Salida")]
    [DataType(DataType.Time)]
    public TimeSpan? HorarioSalida { get; set; }

    public bool Activo { get; set; } = true;
}
