< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Data.EntityMaps.ScopeDbMap
Assembly: ArturRios.Heimdall.Data
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Infrastructure/ArturRios.Heimdall.Data/EntityMaps/ScopeDbMap.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 39
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 1
Fully covered methods: 1
Total methods: 1
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Configure(...)100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Infrastructure/ArturRios.Heimdall.Data/EntityMaps/ScopeDbMap.cs

#LineLine coverage
 1using ArturRios.Heimdall.Domain.Entities;
 2using Microsoft.EntityFrameworkCore;
 3using Microsoft.EntityFrameworkCore.Metadata.Builders;
 4
 5namespace ArturRios.Heimdall.Data.EntityMaps;
 6
 7internal static class ScopeDbMap
 8{
 9    public static void Configure(this EntityTypeBuilder<Scope> scope)
 10    {
 311        scope.ToTable("scope");
 12
 313        scope.HasKey(x => x.Id);
 14
 315        scope.Property(x => x.PublicId).IsRequired();
 316        scope.HasIndex(x => x.PublicId).IsUnique();
 17
 318        scope.Property(x => x.Name).IsRequired();
 19
 20        // Scope name is unique (FR-SC-01, AF-01a / AF-03b).
 321        scope.HasIndex(x => x.Name).IsUnique();
 22
 323        scope.Property(x => x.IsDeleted).HasDefaultValue(false);
 324        scope.Property(x => x.GoogleSignInEnabled).HasDefaultValue(false);
 325        scope.Property(x => x.SelfRegistrationEnabled).HasDefaultValue(false);
 26
 327        scope.Property(x => x.DefaultLegalBasis);
 328        scope.Property(x => x.PrivacyNoticeUri);
 29
 330        scope.Property(x => x.EmailVerificationUrl);
 331        scope.Property(x => x.PasswordResetUrl);
 32
 333        scope.Property(x => x.CreatedAt).HasDefaultValueSql("now()");
 334        scope.Property(x => x.UpdatedAt).HasDefaultValueSql("now()");
 35
 36        // Relationships to Application, GoogleUser, ScopeOwner and ScopeUser are configured from
 37        // their respective dependent-side maps.
 338    }
 39}