< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Data.EntityMaps.GoogleIdTokenUseDbMap
Assembly: ArturRios.Heimdall.Data
File(s): /home/ci/agent/workspace/heimdall-api-docs_main/app/src/Infrastructure/ArturRios.Heimdall.Data/EntityMaps/GoogleIdTokenUseDbMap.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 22
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/ci/agent/workspace/heimdall-api-docs_main/app/src/Infrastructure/ArturRios.Heimdall.Data/EntityMaps/GoogleIdTokenUseDbMap.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 GoogleIdTokenUseDbMap
 8{
 9    public static void Configure(this EntityTypeBuilder<GoogleIdTokenUse> use)
 10    {
 411        use.ToTable("google_id_token_use");
 12
 13        // FR-GO-21: the token's key is the primary key, so recording a use and finding an earlier one
 14        // are the same INSERT … ON CONFLICT DO NOTHING (AtomicWrites.TryRecordGoogleIdTokenUseAsync).
 415        use.HasKey(x => x.Id);
 416        use.Property(x => x.Id).HasColumnName("token_hash").HasMaxLength(64).ValueGeneratedNever();
 17
 18        // The purge selects on it (NFR-19).
 419        use.Property(x => x.ExpiresAt).IsRequired();
 420        use.HasIndex(x => x.ExpiresAt);
 421    }
 22}