| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("relaciones_laborales")] |
| | | 7 | | public class RelacionLaboral |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 143 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("persona_id")] |
| | 773 | 15 | | public long PersonaId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("regimen_id")] |
| | 304 | 19 | | public long RegimenId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("unidad_id")] |
| | 189 | 23 | | public long UnidadId { get; set; } |
| | | 24 | | |
| | | 25 | | [Required] |
| | | 26 | | [Column("programa_id")] |
| | 208 | 27 | | public long ProgramaId { get; set; } |
| | | 28 | | |
| | | 29 | | [Required] |
| | | 30 | | [Column("situacion_id")] |
| | 276 | 31 | | public long SituacionId { get; set; } |
| | | 32 | | |
| | | 33 | | [Required] |
| | | 34 | | [Column("escalafon_id")] |
| | 230 | 35 | | public long EscalafonId { get; set; } |
| | | 36 | | |
| | | 37 | | [Required] |
| | | 38 | | [Column("grado_id")] |
| | 1870 | 39 | | public long GradoId { get; set; } |
| | | 40 | | |
| | | 41 | | [Required] |
| | | 42 | | [Column("fecha_inicio", TypeName = "date")] |
| | 314 | 43 | | public DateTime FechaInicio { get; set; } |
| | | 44 | | |
| | | 45 | | [Column("fecha_fin", TypeName = "date")] |
| | 10 | 46 | | public DateTime? FechaFin { get; set; } |
| | | 47 | | |
| | | 48 | | [Column("fecha_ultimo_ascenso", TypeName = "date")] |
| | 1 | 49 | | public DateTime? FechaUltimoAscenso { get; set; } |
| | | 50 | | |
| | | 51 | | /// <summary> |
| | | 52 | | /// Fecha de ascenso a oficial. Base del progresivo 044.001 para oficiales. |
| | | 53 | | /// NULL para tropa (el progresivo cuenta desde FechaInicio). |
| | | 54 | | /// </summary> |
| | | 55 | | [Column("fecha_ascenso_oficial", TypeName = "date")] |
| | 151 | 56 | | public DateTime? FechaAscensoOficial { get; set; } |
| | | 57 | | |
| | | 58 | | /// <summary>True si el funcionario cobra Prima Idoneidad (OG 042.093).</summary> |
| | | 59 | | [Column("superprima")] |
| | 96 | 60 | | public bool Superprima { get; set; } |
| | | 61 | | |
| | | 62 | | [Required] |
| | | 63 | | [MaxLength(20)] |
| | | 64 | | [Column("estado")] |
| | 150 | 65 | | public EstadoRelacion Estado { get; set; } = EstadoRelacion.Activo; // activo, inactivo |
| | | 66 | | |
| | | 67 | | [Column("fecha_actualizacion")] |
| | 269 | 68 | | public DateTime FechaActualizacion { get; set; } = DateTime.Now; |
| | | 69 | | |
| | | 70 | | // Campos adicionales para compensaciones |
| | | 71 | | [MaxLength(10)] |
| | | 72 | | [Column("prima_tecnica")] |
| | 385 | 73 | | public string? PrimaTecnica { get; set; } = "VACIO"; // VACIO, A, B, C |
| | | 74 | | |
| | | 75 | | [MaxLength(30)] |
| | | 76 | | [Column("prima_solidaria_familiar")] |
| | 8 | 77 | | public string? PrimaSolidariaFamiliar { get; set; } |
| | | 78 | | |
| | | 79 | | [Column("riesgo_vuelo", TypeName = "decimal(14,2)")] |
| | 112 | 80 | | public decimal? RiesgoVuelo { get; set; } |
| | | 81 | | |
| | | 82 | | /// <summary>Categoría de viático (CAT_VIAT legacy). 0 = sin viático; ≥1 = recibe OG 069.008 c/aportes.</summary> |
| | | 83 | | [Column("categoria_viatico")] |
| | 53 | 84 | | public short CategoriaViatico { get; set; } = 0; |
| | | 85 | | |
| | | 86 | | /// <summary>Usa FONASA en vez de Sanidad Militar (SS_FF_AA=0 en legacy). False = Sanidad FFAA; true = FONASA.</summ |
| | | 87 | | [Column("usa_fonasa")] |
| | 52 | 88 | | public bool UsaFonasa { get; set; } = false; |
| | | 89 | | |
| | | 90 | | /// <summary>Años de servicio de un período anterior (CTAPER_ANT legacy). Se suman al cálculo del progresivo.</summa |
| | | 91 | | [Column("anios_servicio_anterior")] |
| | 10 | 92 | | public short AniosServicioAnterior { get; set; } = 0; |
| | | 93 | | |
| | | 94 | | [Column("anios_inactivos")] |
| | 59 | 95 | | public int? AniosInactivos { get; set; } |
| | | 96 | | |
| | | 97 | | [Column("observaciones")] |
| | 17 | 98 | | public string? Observaciones { get; set; } |
| | | 99 | | |
| | | 100 | | [Column("sub_unidad_id")] |
| | 9 | 101 | | public long? SubUnidadId { get; set; } |
| | | 102 | | |
| | | 103 | | [Column("motivo_baja_id")] |
| | 4 | 104 | | public long? MotivoBajaId { get; set; } |
| | | 105 | | |
| | | 106 | | // Sit50: reincorporados |
| | | 107 | | [Column("grado_reincorporacion_id")] |
| | 46 | 108 | | public long? GradoReincorporacionId { get; set; } |
| | | 109 | | |
| | | 110 | | |
| | | 111 | | [Column("haber_retiro", TypeName = "numeric(14,2)")] |
| | 47 | 112 | | public decimal? HaberRetiro { get; set; } |
| | | 113 | | |
| | | 114 | | [Column("porcentaje_progresivo", TypeName = "numeric(5,4)")] |
| | 45 | 115 | | public decimal? PorcentajeProgresivo { get; set; } |
| | | 116 | | |
| | | 117 | | // Navegación |
| | | 118 | | [ForeignKey("PersonaId")] |
| | 340 | 119 | | public virtual Persona Persona { get; set; } = null!; |
| | | 120 | | |
| | | 121 | | [ForeignKey("RegimenId")] |
| | 191 | 122 | | public virtual Regimen Regimen { get; set; } = null!; |
| | | 123 | | |
| | | 124 | | [ForeignKey("UnidadId")] |
| | 4 | 125 | | public virtual Unidad Unidad { get; set; } = null!; |
| | | 126 | | |
| | | 127 | | [ForeignKey("ProgramaId")] |
| | 28 | 128 | | public virtual Programa Programa { get; set; } = null!; |
| | | 129 | | |
| | | 130 | | [ForeignKey("SituacionId")] |
| | 346 | 131 | | public virtual Situacion Situacion { get; set; } = null!; |
| | | 132 | | |
| | | 133 | | [ForeignKey("EscalafonId")] |
| | 36 | 134 | | public virtual Escalafon Escalafon { get; set; } = null!; |
| | | 135 | | |
| | | 136 | | [ForeignKey("GradoId")] |
| | 130 | 137 | | public virtual Grado Grado { get; set; } = null!; |
| | | 138 | | |
| | | 139 | | [ForeignKey("SubUnidadId")] |
| | 3 | 140 | | public virtual SubUnidad? SubUnidad { get; set; } |
| | | 141 | | |
| | | 142 | | [ForeignKey("MotivoBajaId")] |
| | 4 | 143 | | public virtual MotivoBaja? MotivoBaja { get; set; } |
| | | 144 | | |
| | | 145 | | [ForeignKey("GradoReincorporacionId")] |
| | 0 | 146 | | public virtual Grado? GradoReincorporacion { get; set; } |
| | | 147 | | |
| | 254 | 148 | | public virtual ICollection<MovimientoLaboral> MovimientosLaborales { get; set; } = new List<MovimientoLaboral>(); |
| | | 149 | | } |
| | | 150 | | |