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

namespace foundation_system.Models;

[Table("asistencia_colaboradores", Schema = "public")]
public class AsistenciaColaborador
{
    [Key]
    [Column("id")]
    public long Id { get; set; }

    [Column("colaborador_id")]
    public long ColaboradorId { get; set; }

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

    [Column("fecha")]
    public DateOnly Fecha { get; set; }

    [Required]
    [MaxLength(20)]
    [Column("estado")]
    public string Estado { get; set; } = "PRESENTE";

    [Column("observaciones")]
    public string? Observaciones { get; set; }

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