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

namespace foundation_system.Models;

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

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

    [Column("persona_id")]
    public long PersonaId { get; set; }

    [Column("parentesco")]
    [Required]
    [StringLength(50)]
    public string Parentesco { get; set; } = "PADRE";

    [Column("es_principal")]
    public bool EsPrincipal { get; set; } = false;

    [Column("puede_recoger")]
    public bool PuedeRecoger { get; set; } = true;

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

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

    [ForeignKey("PersonaId")]
    public Persona Persona { get; set; } = null!;
}
