| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace FAU.Entidades; |
| | | 5 | | |
| | | 6 | | [Table("dependientes")] |
| | | 7 | | public class Dependiente |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [Column("id")] |
| | 26 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | | 13 | | [Required] |
| | | 14 | | [Column("persona_id")] |
| | 53 | 15 | | public long PersonaId { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [MaxLength(30)] |
| | | 19 | | [Column("tipo")] |
| | 104 | 20 | | public string Tipo { get; set; } = string.Empty; |
| | | 21 | | |
| | | 22 | | [Required] |
| | | 23 | | [MaxLength(100)] |
| | | 24 | | [Column("nombre")] |
| | 82 | 25 | | public string Nombre { get; set; } = string.Empty; |
| | | 26 | | |
| | | 27 | | [MaxLength(20)] |
| | | 28 | | [Column("cedula")] |
| | 9 | 29 | | public string? Cedula { get; set; } |
| | | 30 | | |
| | | 31 | | [Column("fecha_nacimiento", TypeName = "date")] |
| | 18 | 32 | | public DateTime? FechaNacimiento { get; set; } |
| | | 33 | | |
| | | 34 | | [Column("discapacitado")] |
| | 18 | 35 | | public bool Discapacitado { get; set; } = false; |
| | | 36 | | |
| | | 37 | | [Column("porcentaje_deduccion")] |
| | 8 | 38 | | public short? PorcentajeDeduccion { get; set; } |
| | | 39 | | |
| | | 40 | | [Required] |
| | | 41 | | [Column("vigente_desde", TypeName = "date")] |
| | 41 | 42 | | public DateTime VigenteDesde { get; set; } |
| | | 43 | | |
| | | 44 | | [Column("vigente_hasta", TypeName = "date")] |
| | 14 | 45 | | public DateTime? VigenteHasta { get; set; } |
| | | 46 | | |
| | | 47 | | [Column("activo")] |
| | 99 | 48 | | public bool Activo { get; set; } = true; |
| | | 49 | | |
| | | 50 | | [ForeignKey("PersonaId")] |
| | 17 | 51 | | public virtual Persona Persona { get; set; } = null!; |
| | | 52 | | } |