| | | 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 | | [MaxLength(100)] |
| | | 35 | | [Column("puesto")] |
| | 2 | 36 | | public string? Puesto { get; set; } |
| | | 37 | | |
| | | 38 | | [MaxLength(50)] |
| | | 39 | | [Column("plaza")] |
| | 2 | 40 | | public string? Plaza { get; set; } |
| | | 41 | | |
| | | 42 | | [Column("es_automatico")] |
| | 0 | 43 | | public bool EsAutomatico { get; set; } = false; |
| | | 44 | | |
| | | 45 | | [Column("creado_en")] |
| | 4 | 46 | | public DateTime CreadoEn { get; set; } = DateTime.Now; |
| | | 47 | | |
| | | 48 | | // Navegación |
| | | 49 | | [ForeignKey("RelacionLaboralId")] |
| | 0 | 50 | | public virtual RelacionLaboral RelacionLaboral { get; set; } = null!; |
| | | 51 | | |
| | | 52 | | [ForeignKey("TipoMovimientoId")] |
| | 0 | 53 | | public virtual TipoMovimiento TipoMovimiento { get; set; } = null!; |
| | | 54 | | |
| | | 55 | | [ForeignKey("UsuarioId")] |
| | 0 | 56 | | public virtual Usuario? Usuario { get; set; } |
| | | 57 | | } |
| | | 58 | | |