< Summary

Information
Class: FAU.Entidades.Persona
Assembly: FAU.Entidades
File(s): /home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.Entidades/Persona.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 78
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Cedula()100%11100%
get_PrimerNombre()100%11100%
get_SegundoNombre()100%11100%
get_PrimerApellido()100%11100%
get_SegundoApellido()100%11100%
get_NombreCompleto()50%44100%
get_FechaNacimiento()100%11100%
get_Email()100%11100%
get_Telefono()100%11100%
get_Direccion()100%11100%
get_CodigoPostal()100%11100%
get_Departamento()100%11100%
get_Localidad()100%11100%
get_FechaActualizacion()100%11100%
get_Usuarios()100%11100%
get_CuentasBancarias()100%11100%
get_RelacionesLaborales()100%11100%

File(s)

/home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.Entidades/Persona.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace FAU.Entidades;
 5
 6[Table("personas")]
 7public class Persona
 8{
 9    [Key]
 10    [Column("id")]
 24511    public long Id { get; set; }
 12
 13    [Required]
 14    [MaxLength(12)]
 15    [Column("cedula")]
 61016    public string Cedula { get; set; } = string.Empty;
 17
 18    [Required]
 19    [MaxLength(100)]
 20    [Column("primer_nombre")]
 48821    public string PrimerNombre { get; set; } = string.Empty;
 22
 23    [MaxLength(100)]
 24    [Column("segundo_nombre")]
 3525    public string? SegundoNombre { get; set; }
 26
 27    [Required]
 28    [MaxLength(100)]
 29    [Column("primer_apellido")]
 48730    public string PrimerApellido { get; set; } = string.Empty;
 31
 32    [MaxLength(100)]
 33    [Column("segundo_apellido")]
 3534    public string? SegundoApellido { get; set; }
 35
 36    /// <summary>
 37    /// Propiedad de conveniencia para obtener el nombre completo
 38    /// </summary>
 39    [NotMapped]
 40    public string NombreCompleto =>
 2641        $"{PrimerNombre} {(string.IsNullOrWhiteSpace(SegundoNombre) ? "" : SegundoNombre + " ")}{PrimerApellido}{(string
 42
 43    [Column("fecha_nacimiento")]
 1444    public DateTime? FechaNacimiento { get; set; }
 45
 46    [MaxLength(150)]
 47    [Column("email")]
 3548    public string? Email { get; set; }
 49
 50    [MaxLength(30)]
 51    [Column("telefono")]
 1352    public string? Telefono { get; set; }
 53
 54    [MaxLength(200)]
 55    [Column("direccion")]
 556    public string? Direccion { get; set; }
 57
 58    [MaxLength(10)]
 59    [Column("codigo_postal")]
 560    public string? CodigoPostal { get; set; }
 61
 62    [MaxLength(100)]
 63    [Column("departamento")]
 564    public string? Departamento { get; set; }
 65
 66    [MaxLength(100)]
 67    [Column("localidad")]
 568    public string? Localidad { get; set; }
 69
 70    [Column("fecha_actualizacion")]
 25071    public DateTime FechaActualizacion { get; set; } = DateTime.UtcNow;
 72
 73    // Navegación
 24874    public virtual ICollection<Usuario> Usuarios { get; set; } = new List<Usuario>();
 24875    public virtual ICollection<CuentaBancaria> CuentasBancarias { get; set; } = new List<CuentaBancaria>();
 24876    public virtual ICollection<RelacionLaboral> RelacionesLaborales { get; set; } = new List<RelacionLaboral>();
 77}
 78