< Summary - Estud

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

#LineLine coverage
 1using Estud.Back.Domain.Students;
 2
 3namespace Estud.Back.Database.Students;
 4
 5public class StudentClassNoteDbConfig : IEntityTypeConfiguration<StudentClassNote>
 6{
 7    public void Configure(EntityTypeBuilder<StudentClassNote> entity)
 8    {
 49        entity.ToTable("student_class_notes", DbSchemas.Estud);
 10
 411        entity.HasKey(e => e.Id);
 12
 413        entity.Property(e => e.Note).HasPrecision(4, 2);
 14
 415        entity.HasOne<EstudStudent>()
 416            .WithMany()
 417            .HasPrincipalKey(x => x.Id)
 418            .HasForeignKey(e => e.StudentId);
 19
 420        entity.HasIndex(e => new { e.ClassId, e.StudentId, e.Type })
 421            .IsUnique();
 422    }
 23}