| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("lotes_compensacion")] |
| | | 7 | | public class LoteCompensacion |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 100 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("tipo_compensacion_id")] |
| | 136 | 15 | | public long TipoCompensacionId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [Column("periodo_id")] |
| | 145 | 19 | | public long PeriodoId { get; set; } |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [MaxLength(20)] |
| | | 23 | | [Column("estado")] |
| | 299 | 24 | | public string Estado { get; set; } = "borrador"; |
| | | 25 | | |
| | | 26 | | [MaxLength(150)] |
| | | 27 | | [Column("fuente")] |
| | 1 | 28 | | public string? Fuente { get; set; } |
| | | 29 | | |
| | | 30 | | [MaxLength(200)] |
| | | 31 | | [Column("nombre_archivo")] |
| | 21 | 32 | | public string? NombreArchivo { get; set; } |
| | | 33 | | |
| | | 34 | | [MaxLength(100)] |
| | | 35 | | [Column("hash_archivo")] |
| | 21 | 36 | | public string? HashArchivo { get; set; } |
| | | 37 | | |
| | | 38 | | [Required] |
| | | 39 | | [Column("usuario_id")] |
| | 42 | 40 | | public long UsuarioId { get; set; } |
| | | 41 | | |
| | | 42 | | [Column("creado_en")] |
| | 119 | 43 | | public DateTime CreadoEn { get; set; } = DateTime.Now; |
| | | 44 | | |
| | | 45 | | [Column("aprobado_por")] |
| | 25 | 46 | | public long? AprobadoPor { get; set; } |
| | | 47 | | |
| | | 48 | | [Column("aprobado_en")] |
| | 24 | 49 | | public DateTime? AprobadoEn { get; set; } |
| | | 50 | | |
| | | 51 | | // Navegacion |
| | | 52 | | [ForeignKey("PeriodoId")] |
| | 76 | 53 | | public virtual Periodo Periodo { get; set; } = null!; |
| | | 54 | | |
| | | 55 | | [ForeignKey("TipoCompensacionId")] |
| | 4 | 56 | | public virtual TipoCompensacion TipoCompensacion { get; set; } = null!; |
| | | 57 | | |
| | | 58 | | [ForeignKey("UsuarioId")] |
| | 0 | 59 | | public virtual Usuario Usuario { get; set; } = null!; |
| | | 60 | | |
| | | 61 | | [ForeignKey("AprobadoPor")] |
| | 0 | 62 | | public virtual Usuario? AprobadorUsuario { get; set; } |
| | | 63 | | |
| | 101 | 64 | | public virtual ICollection<ItemLoteCompensacion> Items { get; set; } = new List<ItemLoteCompensacion>(); |
| | | 65 | | |
| | | 66 | | [NotMapped] |
| | 0 | 67 | | public int ItemCount { get; set; } |
| | | 68 | | } |