< Summary

Information
Class: ProjectTemplate.Infrastructure.Data.Configurations.ApplicationAuditCompletionOutboxEntryConfiguration
Assembly: ProjectTemplate.Infrastructure
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Configurations/ApplicationAuditCompletionOutboxEntryConfiguration.cs
Line coverage
100%
Covered lines: 42
Uncovered lines: 0
Coverable lines: 42
Total lines: 61
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/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Configurations/ApplicationAuditCompletionOutboxEntryConfiguration.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore;
 2using Microsoft.EntityFrameworkCore.Metadata.Builders;
 3using ProjectTemplate.Infrastructure.Data.Entities;
 4
 5namespace ProjectTemplate.Infrastructure.Data.Configurations;
 6
 7/// <summary>
 8/// Configures durable audit-completion outbox persistence.
 9/// </summary>
 10public sealed class ApplicationAuditCompletionOutboxEntryConfiguration
 11    : IEntityTypeConfiguration<ApplicationAuditCompletionOutboxEntry>
 12{
 13    /// <inheritdoc />
 14    public void Configure(EntityTypeBuilder<ApplicationAuditCompletionOutboxEntry> builder)
 15    {
 1016        builder.ToTable("ApplicationAuditCompletionOutbox");
 17
 1018        builder.HasKey(entry => entry.Id);
 1019        builder.Property(entry => entry.Id).ValueGeneratedNever();
 20
 1021        builder.Property(entry => entry.SchemaVersion)
 1022            .HasMaxLength(32)
 1023            .IsRequired();
 1024        builder.Property(entry => entry.Destination)
 1025            .HasMaxLength(128)
 1026            .IsRequired();
 1027        builder.Property(entry => entry.IdempotencyKey)
 1028            .HasMaxLength(128)
 1029            .IsRequired();
 1030        builder.Property(entry => entry.MutationBatchId)
 1031            .HasMaxLength(64)
 1032            .IsRequired();
 1033        builder.Property(entry => entry.PersistenceOutcome)
 1034            .HasMaxLength(64)
 1035            .IsRequired();
 1036        builder.Property(entry => entry.MutationManifestHash)
 1037            .HasMaxLength(256)
 1038            .IsRequired();
 1039        builder.Property(entry => entry.MutationManifestAlgorithm)
 1040            .HasMaxLength(64)
 1041            .IsRequired();
 1042        builder.Property(entry => entry.MutationManifestSchemaVersion)
 1043            .HasMaxLength(32)
 1044            .IsRequired();
 1045        builder.Property(entry => entry.OperationExecutionId).HasMaxLength(128);
 1046        builder.Property(entry => entry.ExecutionAttemptId).HasMaxLength(128);
 1047        builder.Property(entry => entry.DecisionAuditRecordId).HasMaxLength(128);
 1048        builder.Property(entry => entry.CorrelationId).HasMaxLength(128);
 1049        builder.Property(entry => entry.TraceId).HasMaxLength(64);
 1050        builder.Property(entry => entry.Status)
 1051            .HasMaxLength(32)
 1052            .IsRequired();
 1053        builder.Property(entry => entry.LastErrorCode).HasMaxLength(128);
 1054        builder.Property(entry => entry.LastErrorMessage).HasMaxLength(512);
 55
 1056        builder.HasIndex(entry => entry.IdempotencyKey).IsUnique();
 1057        builder.HasIndex(entry => new { entry.Destination, entry.MutationBatchId }).IsUnique();
 1058        builder.HasIndex(entry => new { entry.Status, entry.NextAttemptUtc });
 1059        builder.HasIndex(entry => entry.CreatedUtc);
 1060    }
 61}