| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("movimientos_laborales")] |
| | | 7 | | public class MovimientoLaboral |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 3 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("relacion_laboral_id")] |
| | 4 | 15 | | public long RelacionLaboralId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("tipo_movimiento_id")] |
| | 5 | 19 | | public long TipoMovimientoId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [Column("fecha_movimiento", TypeName = "date")] |
| | 6 | 23 | | public DateTime FechaMovimiento { get; set; } |
| | | 24 | | |
| | | 25 | | [Column("retroactivo_desde", TypeName = "date")] |
| | 0 | 26 | | public DateTime? RetroactivoDesde { get; set; } |
| | | 27 | | |
| | | 28 | | [Column("usuario_id")] |
| | 5 | 29 | | public long? UsuarioId { get; set; } |
| | | 30 | | |
| | | 31 | | [Column("observaciones")] |
| | 3 | 32 | | public string? Observaciones { get; set; } |
| | | 33 | | |
| | | 34 | | [Column("es_automatico")] |
| | 0 | 35 | | public bool EsAutomatico { get; set; } = false; |
| | | 36 | | |
| | | 37 | | [Column("creado_en")] |
| | 4 | 38 | | public DateTime CreadoEn { get; set; } = DateTime.UtcNow; |
| | | 39 | | |
| | | 40 | | // Navegación |
| | | 41 | | [ForeignKey("RelacionLaboralId")] |
| | 0 | 42 | | public virtual RelacionLaboral RelacionLaboral { get; set; } = null!; |
| | | 43 | | |
| | | 44 | | [ForeignKey("TipoMovimientoId")] |
| | 0 | 45 | | public virtual TipoMovimiento TipoMovimiento { get; set; } = null!; |
| | | 46 | | |
| | | 47 | | [ForeignKey("UsuarioId")] |
| | 0 | 48 | | public virtual Usuario? Usuario { get; set; } |
| | | 49 | | } |
| | | 50 | | |