< Summary - Estud

Information
Class: Estud.Back.Database.Students.EstudStudentDbConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Database/Students/EstudStudentDbConfig.cs
Tag: 114_29044117136
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 23
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/Database/Students/EstudStudentDbConfig.cs

#LineLine coverage
 1using Estud.Back.Domain.Identity;
 2using Estud.Back.Domain.Students;
 3
 4namespace Estud.Back.Database.Students;
 5
 6public class EstudStudentDbConfig : IEntityTypeConfiguration<EstudStudent>
 7{
 8    public void Configure(EntityTypeBuilder<EstudStudent> entity)
 9    {
 410        entity.ToTable("students", DbSchemas.Estud);
 11
 412        entity.HasKey(e => e.Id);
 13
 414        entity.HasOne(e => e.User)
 415            .WithOne()
 416            .HasPrincipalKey<EstudUser>(u => new { u.InstitutionId, u.Id })
 417            .HasForeignKey<EstudStudent>(e => new { e.InstitutionId, e.UserId });
 18
 419        entity.Property(x => x.YieldCoefficient).HasPrecision(4, 2);
 20
 421        entity.HasIndex(s => s.EnrollmentCode).IsUnique();
 422    }
 23}