< Summary

Information
Class: FAU.Entidades.Usuario
Assembly: FAU.Entidades
File(s): /home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.Entidades/Usuario.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 47
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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_Username()100%11100%
get_PasswordHash()100%11100%
get_Estado()100%11100%
get_IntentosFallidos()100%11100%
get_BloqueadoHasta()100%11100%
get_PersonaId()100%11100%
get_FechaActualizacion()100%11100%
get_Persona()100%11100%
get_Roles()100%11100%
get_BitacorasAuditoria()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace FAU.Entidades;
 5
 6[Table("usuarios")]
 7public class Usuario
 8{
 9    [Key]
 10    [Column("id")]
 12011    public long Id { get; set; }
 12
 13    [Required]
 14    [MaxLength(60)]
 15    [Column("username")]
 21416    public string Username { get; set; } = string.Empty;
 17
 18    [Required]
 19    [MaxLength(255)]
 20    [Column("password_hash")]
 11521    public string PasswordHash { get; set; } = string.Empty;
 22
 23    [Required]
 24    [MaxLength(20)]
 25    [Column("estado")]
 20426    public string Estado { get; set; } = "activo";
 27
 28    [Column("intentos_fallidos")]
 1829    public short IntentosFallidos { get; set; } = 0;
 30
 31    [Column("bloqueado_hasta")]
 432    public DateTime? BloqueadoHasta { get; set; }
 33
 34    [Column("persona_id")]
 1935    public long? PersonaId { get; set; }
 36
 37    [Column("fecha_actualizacion")]
 12138    public DateTime FechaActualizacion { get; set; } = DateTime.UtcNow;
 39
 40    // Navegación
 41    [ForeignKey("PersonaId")]
 12742    public virtual Persona? Persona { get; set; }
 43
 19744    public virtual ICollection<Rol> Roles { get; set; } = new List<Rol>();
 9245    public virtual ICollection<BitacoraAuditoria> BitacorasAuditoria { get; set; } = new List<BitacoraAuditoria>();
 46}
 47