using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace foundation_system.Models;

[Table("antecedentes_nino")]
public class AntecedenteNino
{
    [Key]
    [Column("id")]
    public long Id { get; set; }

    [Required]
    [Column("nino_id")]
    public long NinoId { get; set; }

    [ForeignKey("NinoId")]
    public virtual Nino Nino { get; set; } = null!;

    [Required]
    [Column("fecha_incidente")]
    public DateTime FechaIncidente { get; set; } = DateTime.UtcNow;

    [Required]
    [Column("tipo_antecedente")]
    [StringLength(50)]
    public string TipoAntecedente { get; set; } = string.Empty; // LlamadaAtencion, Suspension, Castigo

    [Required]
    [Column("descripcion")]
    public string Descripcion { get; set; } = string.Empty;

    [Required]
    [Column("gravedad")]
    [StringLength(20)]
    public string Gravedad { get; set; } = string.Empty; // Alta, Media, Baja

    [Required]
    [Column("usuario_registra")]
    [StringLength(100)]
    public string UsuarioRegistra { get; set; } = string.Empty;

    [Column("activo")]
    public bool Activo { get; set; } = true;

    [Column("creado_en")]
    public DateTime CreadoEn { get; set; } = DateTime.UtcNow;

    [Column("actualizado_en")]
    public DateTime ActualizadoEn { get; set; } = DateTime.UtcNow;
}
