| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("retroactividades")] |
| | | 7 | | public class Retroactividad |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 0 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("periodo_id")] |
| | 0 | 15 | | public long PeriodoId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("persona_id")] |
| | 0 | 19 | | public long PersonaId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("periodo_referencia_id")] |
| | 0 | 23 | | public long PeriodoReferenciaId { get; set; } |
| | | 24 | | |
| | | 25 | | [Required] |
| | | 26 | | [MaxLength(30)] |
| | | 27 | | [Column("tipo")] |
| | 0 | 28 | | public string Tipo { get; set; } = string.Empty; |
| | | 29 | | |
| | | 30 | | [Required] |
| | | 31 | | [Column("meses_retro")] |
| | 0 | 32 | | public short MesesRetro { get; set; } |
| | | 33 | | |
| | | 34 | | [Required] |
| | | 35 | | [MaxLength(20)] |
| | | 36 | | [Column("estado")] |
| | 0 | 37 | | public string Estado { get; set; } = "pendiente"; |
| | | 38 | | |
| | | 39 | | [Column("creado_por")] |
| | 0 | 40 | | public long? CreadoPor { get; set; } |
| | | 41 | | |
| | | 42 | | [Required] |
| | | 43 | | [Column("creado_en")] |
| | 0 | 44 | | public DateTime CreadoEn { get; set; } = DateTime.UtcNow; |
| | | 45 | | |
| | | 46 | | [Column("confirmado_por")] |
| | 0 | 47 | | public long? ConfirmadoPor { get; set; } |
| | | 48 | | |
| | | 49 | | [Column("confirmado_en")] |
| | 0 | 50 | | public DateTime? ConfirmadoEn { get; set; } |
| | | 51 | | |
| | | 52 | | [Column("calculado_en")] |
| | 0 | 53 | | public DateTime? CalculadoEn { get; set; } |
| | | 54 | | |
| | | 55 | | // Navegación |
| | | 56 | | [ForeignKey("PeriodoId")] |
| | 0 | 57 | | public virtual Periodo Periodo { get; set; } = null!; |
| | | 58 | | |
| | | 59 | | [ForeignKey("PersonaId")] |
| | 0 | 60 | | public virtual Persona Persona { get; set; } = null!; |
| | | 61 | | |
| | | 62 | | [ForeignKey("PeriodoReferenciaId")] |
| | 0 | 63 | | public virtual Periodo PeriodoReferencia { get; set; } = null!; |
| | | 64 | | |
| | | 65 | | [ForeignKey("CreadoPor")] |
| | 0 | 66 | | public virtual Usuario? UsuarioCreador { get; set; } |
| | | 67 | | |
| | | 68 | | [ForeignKey("ConfirmadoPor")] |
| | 0 | 69 | | public virtual Usuario? UsuarioConfirmador { get; set; } |
| | | 70 | | |
| | 0 | 71 | | public virtual ICollection<RetroactividadItem> Items { get; set; } = new List<RetroactividadItem>(); |
| | | 72 | | } |