< Summary

Information
Class: Syki.Back.Audit.AuditLogConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Audit/AuditLogConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 22
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
Configure(...)100%11100%

File(s)

/home/runner/work/syki/syki/Back/Audit/AuditLogConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Cross.CreateUser;
 2
 3namespace Syki.Back.Audit;
 4
 5/// <summary>
 6/// Configuração da tabela de logs de auditoria.
 7/// </summary>
 8public class AuditLogConfig : IEntityTypeConfiguration<AuditLog>
 9{
 10    public void Configure(EntityTypeBuilder<AuditLog> auditLog)
 11    {
 212        auditLog.ToTable("audit_logs");
 13
 214        auditLog.HasKey(a => a.Id);
 215        auditLog.Property(a => a.Id).ValueGeneratedNever();
 16
 217        auditLog.HasOne<SykiUser>()
 218            .WithMany()
 219            .HasPrincipalKey(u => new { u.InstitutionId, u.Id })
 220            .HasForeignKey(a => new { a.InstitutionId, a.UserId });
 221    }
 22}