| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("config_compensaciones")] |
| | | 7 | | public class ConfigCompensacion |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 48 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("tipo_compensacion_id")] |
| | 44 | 15 | | public long TipoCompensacionId { get; set; } |
| | | 16 | | |
| | | 17 | | [Column("regimen_id")] |
| | 5 | 18 | | public long? RegimenId { get; set; } |
| | | 19 | | |
| | | 20 | | [Column("grado_id")] |
| | 5 | 21 | | public long? GradoId { get; set; } |
| | | 22 | | |
| | | 23 | | [Column("escalafon_id")] |
| | 5 | 24 | | public long? EscalafonId { get; set; } |
| | | 25 | | |
| | | 26 | | [MaxLength(50)] |
| | | 27 | | [Column("funcion")] |
| | 5 | 28 | | public string? Funcion { get; set; } |
| | | 29 | | |
| | | 30 | | [Required] |
| | | 31 | | [MaxLength(20)] |
| | | 32 | | [Column("unidad_medida")] |
| | 86 | 33 | | public string UnidadMedida { get; set; } = "monto"; |
| | | 34 | | |
| | | 35 | | [Required] |
| | | 36 | | [MaxLength(20)] |
| | | 37 | | [Column("formula")] |
| | 144 | 38 | | public string Formula { get; set; } = "fijo"; // fijo, tabla, prorrateo, presupuesto, rango |
| | | 39 | | |
| | | 40 | | [Column("valor_por_unidad", TypeName = "numeric(14,2)")] |
| | 17 | 41 | | public decimal? ValorPorUnidad { get; set; } |
| | | 42 | | |
| | | 43 | | [Column("monto", TypeName = "numeric(14,2)")] |
| | 31 | 44 | | public decimal? Monto { get; set; } |
| | | 45 | | |
| | | 46 | | [Column("tope", TypeName = "numeric(14,2)")] |
| | 13 | 47 | | public decimal? Tope { get; set; } |
| | | 48 | | |
| | | 49 | | [Column("tope_unidades")] |
| | 32 | 50 | | public short? TopeUnidades { get; set; } |
| | | 51 | | |
| | | 52 | | [Column("valor_minimo", TypeName = "numeric(14,2)")] |
| | 22 | 53 | | public decimal? ValorMinimo { get; set; } |
| | | 54 | | |
| | | 55 | | [Column("valor_maximo", TypeName = "numeric(14,2)")] |
| | 21 | 56 | | public decimal? ValorMaximo { get; set; } |
| | | 57 | | |
| | | 58 | | [Required] |
| | | 59 | | [Column("vigente_desde", TypeName = "date")] |
| | 28 | 60 | | public DateTime VigenteDesde { get; set; } |
| | | 61 | | |
| | | 62 | | [Column("vigente_hasta", TypeName = "date")] |
| | 27 | 63 | | public DateTime? VigenteHasta { get; set; } |
| | | 64 | | |
| | | 65 | | [Column("activo")] |
| | 106 | 66 | | public bool Activo { get; set; } = true; |
| | | 67 | | |
| | | 68 | | /// Si true, la compensación impacta la base de descuentos legales (FONASA, Montepío, IRPF) |
| | | 69 | | [Column("sujeto_desc_legales")] |
| | 25 | 70 | | public bool SujetoDescLegales { get; set; } = false; |
| | | 71 | | |
| | | 72 | | /// Referencia al concepto del Instructivo para lookup de tarifas por grado o categoría |
| | | 73 | | [Column("catalogo_item_id")] |
| | 22 | 74 | | public long? CatalogoItemId { get; set; } |
| | | 75 | | |
| | | 76 | | // Navegacion |
| | | 77 | | [ForeignKey("TipoCompensacionId")] |
| | 5 | 78 | | public virtual TipoCompensacion TipoCompensacion { get; set; } = null!; |
| | | 79 | | |
| | | 80 | | [ForeignKey("RegimenId")] |
| | 4 | 81 | | public virtual Regimen? Regimen { get; set; } |
| | | 82 | | |
| | | 83 | | [ForeignKey("GradoId")] |
| | 4 | 84 | | public virtual Grado? Grado { get; set; } |
| | | 85 | | |
| | | 86 | | [ForeignKey("EscalafonId")] |
| | 4 | 87 | | public virtual Escalafon? Escalafon { get; set; } |
| | | 88 | | |
| | | 89 | | [ForeignKey("CatalogoItemId")] |
| | 4 | 90 | | public virtual CatalogoItem? CatalogoItem { get; set; } |
| | | 91 | | } |