< Summary

Information
Class: Syki.Back.Features.Cross.SendResetPasswordToken.ResetPasswordTokenConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Cross/SendResetPasswordToken/ResetPasswordTokenConfig.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 21
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/Cross/SendResetPasswordToken/ResetPasswordTokenConfig.cs

#LineLine coverage
 1using Syki.Back.Features.Cross.CreateUser;
 2
 3namespace Syki.Back.Features.Cross.SendResetPasswordToken;
 4
 5public class ResetPasswordTokenConfig : IEntityTypeConfiguration<ResetPasswordToken>
 6{
 7    public void Configure(EntityTypeBuilder<ResetPasswordToken> resetPassword)
 8    {
 29        resetPassword.ToTable("reset_password_tokens");
 10
 211        resetPassword.HasKey(rp => rp.Id);
 212        resetPassword.Property(rp => rp.Id).ValueGeneratedNever();
 13
 214        resetPassword.HasOne<SykiUser>()
 215            .WithMany()
 216            .HasPrincipalKey(u => u.Id)
 217            .HasForeignKey(rp => rp.UserId);
 18
 219        resetPassword.HasIndex(rp => rp.Token).IsUnique();
 220    }
 21}