< Summary

Information
Class: Syki.Back.Features.Academic.CreateStudent.SykiStudentConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CreateStudent/SykiStudentConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 27
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/Features/Academic/CreateStudent/SykiStudentConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Cross.CreateUser;
 2
 3namespace Syki.Back.Features.Academic.CreateStudent;
 4
 5public class SykiStudentConfig : IEntityTypeConfiguration<SykiStudent>
 6{
 7    public void Configure(EntityTypeBuilder<SykiStudent> student)
 8    {
 29        student.ToTable("students");
 10
 211        student.HasKey(a => a.Id);
 212        student.Property(a => a.Id).ValueGeneratedNever();
 13
 214        student.Property(a => a.CourseOfferingId);
 215        student.Property(a => a.Name);
 216        student.Property(a => a.EnrollmentCode);
 17
 218        student.HasOne(a => a.User)
 219            .WithOne()
 220            .HasPrincipalKey<SykiUser>(u => new { u.InstitutionId, u.Id })
 221            .HasForeignKey<SykiStudent>(a => new { a.InstitutionId, a.Id });
 22
 223        student.Property(x => x.YieldCoefficient).HasPrecision(4, 2);
 24
 225        student.HasIndex(s => s.EnrollmentCode).IsUnique();
 226    }
 27}