| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("periodos_liquidacion")] |
| | | 7 | | public class Periodo |
| | | 8 | | { |
| | | 9 | | public const string EstadoAbierta = "ABIERTA"; |
| | | 10 | | public const string EstadoListoPCalculo = "LISTO_P_CALCULO"; |
| | | 11 | | public const string EstadoEnCalculo = "EN_CALCULO"; |
| | | 12 | | public const string EstadoCalculado = "CALCULADO"; |
| | | 13 | | public const string EstadoParaMDN = "PARA_MDN"; |
| | | 14 | | public const string EstadoDescuentosPersonales = "DESCUENTOS_PERSONALES"; |
| | | 15 | | public const string EstadoCerrada = "CERRADA"; |
| | | 16 | | |
| | 0 | 17 | | public static readonly IReadOnlyList<string> EstadosActivos = |
| | 0 | 18 | | new[] { EstadoAbierta, EstadoListoPCalculo, EstadoEnCalculo, EstadoParaMDN, EstadoDescuentosPersonales }; |
| | | 19 | | |
| | | 20 | | [Key] |
| | | 21 | | [Column("id")] |
| | 432 | 22 | | public long Id { get; set; } |
| | | 23 | | |
| | | 24 | | [Required] |
| | | 25 | | [Column("anio")] |
| | 538 | 26 | | public short Anio { get; set; } |
| | | 27 | | |
| | | 28 | | [Required] |
| | | 29 | | [Column("mes")] |
| | 507 | 30 | | public short Mes { get; set; } |
| | | 31 | | |
| | | 32 | | [Required] |
| | | 33 | | [MaxLength(30)] |
| | | 34 | | [Column("estado")] |
| | 788 | 35 | | public string Estado { get; set; } = "ABIERTA"; |
| | | 36 | | |
| | | 37 | | [Required] |
| | | 38 | | [Column("snapshot_id")] |
| | 223 | 39 | | public long SnapshotId { get; set; } |
| | | 40 | | |
| | | 41 | | [Required] |
| | | 42 | | [Column("fecha_apertura")] |
| | 458 | 43 | | public DateTime FechaApertura { get; set; } = DateTime.Now; |
| | | 44 | | |
| | | 45 | | [Required] |
| | | 46 | | [Column("usuario_apertura")] |
| | 235 | 47 | | public long UsuarioApertura { get; set; } |
| | | 48 | | |
| | | 49 | | [Required] |
| | | 50 | | [MaxLength(64)] |
| | | 51 | | [Column("hash_snapshot")] |
| | 602 | 52 | | public string HashSnapshot { get; set; } = string.Empty; |
| | | 53 | | |
| | | 54 | | [Required] |
| | | 55 | | [Column("activo")] |
| | 494 | 56 | | public bool Activo { get; set; } = true; |
| | | 57 | | |
| | | 58 | | [Column("fecha_cierre_insumos")] |
| | 16 | 59 | | public DateTime? FechaCierreInsumos { get; set; } |
| | | 60 | | |
| | | 61 | | [Column("usuario_cierre_insumos")] |
| | 8 | 62 | | public long? UsuarioCierreInsumosId { get; set; } |
| | | 63 | | |
| | | 64 | | [Column("fecha_calculo")] |
| | 9 | 65 | | public DateTime? FechaCalculo { get; set; } |
| | | 66 | | |
| | | 67 | | [Column("usuario_calculo")] |
| | 1 | 68 | | public long? UsuarioCalculoId { get; set; } |
| | | 69 | | |
| | | 70 | | [Column("fecha_cierre")] |
| | 10 | 71 | | public DateTime? FechaCierre { get; set; } |
| | | 72 | | |
| | | 73 | | [Column("usuario_cierre")] |
| | 4 | 74 | | public long? UsuarioCierreId { get; set; } |
| | | 75 | | |
| | | 76 | | [Column("fecha_envio_mdn")] |
| | 6 | 77 | | public DateTime? FechaEnvioMDN { get; set; } |
| | | 78 | | |
| | | 79 | | [Column("usuario_envio_mdn")] |
| | 0 | 80 | | public long? UsuarioEnvioMDNId { get; set; } |
| | | 81 | | |
| | | 82 | | [Column("fecha_descuentos_personales")] |
| | 6 | 83 | | public DateTime? FechaDescuentosPersonales { get; set; } |
| | | 84 | | |
| | | 85 | | [Column("usuario_descuentos_personales")] |
| | 0 | 86 | | public long? UsuarioDescuentosPersonalesId { get; set; } |
| | | 87 | | |
| | | 88 | | [NotMapped] |
| | 26 | 89 | | public string? UsuarioAperturaUsername { get; set; } |
| | | 90 | | |
| | | 91 | | [ForeignKey("SnapshotId")] |
| | 0 | 92 | | public virtual SnapshotInsumos Snapshot { get; set; } = null!; |
| | | 93 | | |
| | | 94 | | [ForeignKey("UsuarioCierreInsumosId")] |
| | 6 | 95 | | public virtual Usuario? UsuarioCierreInsumos { get; set; } |
| | | 96 | | |
| | | 97 | | [ForeignKey("UsuarioCalculoId")] |
| | 6 | 98 | | public virtual Usuario? UsuarioCalculo { get; set; } |
| | | 99 | | |
| | | 100 | | [ForeignKey("UsuarioCierreId")] |
| | 6 | 101 | | public virtual Usuario? UsuarioCierre { get; set; } |
| | | 102 | | |
| | | 103 | | [ForeignKey("UsuarioEnvioMDNId")] |
| | 6 | 104 | | public virtual Usuario? UsuarioEnvioMDN { get; set; } |
| | | 105 | | |
| | | 106 | | [ForeignKey("UsuarioDescuentosPersonalesId")] |
| | 6 | 107 | | public virtual Usuario? UsuarioDescuentosPersonales { get; set; } |
| | | 108 | | } |