| | | 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")] |
| | 3 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("persona_id")] |
| | 0 | 15 | | public long PersonaId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("regimen_id")] |
| | 0 | 19 | | public long RegimenId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("unidad_id")] |
| | 0 | 23 | | public long UnidadId { get; set; } |
| | | 24 | | |
| | | 25 | | [Required] |
| | | 26 | | [Column("programa_id")] |
| | 0 | 27 | | public long ProgramaId { get; set; } |
| | | 28 | | |
| | | 29 | | [Required] |
| | | 30 | | [Column("situacion_id")] |
| | 0 | 31 | | public long SituacionId { get; set; } |
| | | 32 | | |
| | | 33 | | [Required] |
| | | 34 | | [Column("escalafon_id")] |
| | 0 | 35 | | public long EscalafonId { get; set; } |
| | | 36 | | |
| | | 37 | | [Required] |
| | | 38 | | [Column("grado_id")] |
| | 0 | 39 | | public long GradoId { get; set; } |
| | | 40 | | |
| | | 41 | | [Required] |
| | | 42 | | [Column("fecha_inicio", TypeName = "date")] |
| | 0 | 43 | | public DateTime FechaInicio { get; set; } |
| | | 44 | | |
| | | 45 | | [Column("fecha_fin", TypeName = "date")] |
| | 4 | 46 | | public DateTime? FechaFin { get; set; } |
| | | 47 | | |
| | | 48 | | [Required] |
| | | 49 | | [MaxLength(20)] |
| | | 50 | | [Column("estado")] |
| | 8 | 51 | | public string Estado { get; set; } = "activo"; // activo, inactivo |
| | | 52 | | |
| | | 53 | | [Column("fecha_actualizacion")] |
| | 4 | 54 | | public DateTime FechaActualizacion { get; set; } = DateTime.UtcNow; |
| | | 55 | | |
| | | 56 | | // Campos adicionales para compensaciones |
| | | 57 | | [MaxLength(10)] |
| | | 58 | | [Column("prima_tecnica")] |
| | 3 | 59 | | public string? PrimaTecnica { get; set; } = "VACIO"; // VACIO, A, B, C |
| | | 60 | | |
| | | 61 | | [MaxLength(30)] |
| | | 62 | | [Column("prima_solidaria_familiar")] |
| | 0 | 63 | | public string? PrimaSolidariaFamiliar { get; set; } |
| | | 64 | | |
| | | 65 | | [Column("riesgo_vuelo", TypeName = "decimal(14,2)")] |
| | 0 | 66 | | public decimal? RiesgoVuelo { get; set; } |
| | | 67 | | |
| | | 68 | | [Column("anios_inactivos")] |
| | 0 | 69 | | public int? AniosInactivos { get; set; } |
| | | 70 | | |
| | | 71 | | [Column("observaciones")] |
| | 0 | 72 | | public string? Observaciones { get; set; } |
| | | 73 | | |
| | | 74 | | [Column("compania_id")] |
| | 0 | 75 | | public long? CompaniaId { get; set; } |
| | | 76 | | |
| | | 77 | | // Navegación |
| | | 78 | | [ForeignKey("PersonaId")] |
| | 0 | 79 | | public virtual Persona Persona { get; set; } = null!; |
| | | 80 | | |
| | | 81 | | [ForeignKey("RegimenId")] |
| | 0 | 82 | | public virtual Regimen Regimen { get; set; } = null!; |
| | | 83 | | |
| | | 84 | | [ForeignKey("UnidadId")] |
| | 0 | 85 | | public virtual Unidad Unidad { get; set; } = null!; |
| | | 86 | | |
| | | 87 | | [ForeignKey("ProgramaId")] |
| | 0 | 88 | | public virtual Programa Programa { get; set; } = null!; |
| | | 89 | | |
| | | 90 | | [ForeignKey("SituacionId")] |
| | 0 | 91 | | public virtual Situacion Situacion { get; set; } = null!; |
| | | 92 | | |
| | | 93 | | [ForeignKey("EscalafonId")] |
| | 0 | 94 | | public virtual Escalafon Escalafon { get; set; } = null!; |
| | | 95 | | |
| | | 96 | | [ForeignKey("GradoId")] |
| | 0 | 97 | | public virtual Grado Grado { get; set; } = null!; |
| | | 98 | | |
| | | 99 | | [ForeignKey("CompaniaId")] |
| | 0 | 100 | | public virtual Compania? Compania { get; set; } |
| | | 101 | | |
| | 3 | 102 | | public virtual ICollection<MovimientoLaboral> MovimientosLaborales { get; set; } = new List<MovimientoLaboral>(); |
| | | 103 | | } |
| | | 104 | | |