< Summary - Syki

Information
Class: Syki.Back.Database.Webhooks.ReceivedWebhookEventDbConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Database/Webhooks/ReceivedWebhookEventDbConfig.cs
Tag: 97_27801654829
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 22
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/Database/Webhooks/ReceivedWebhookEventDbConfig.cs

#LineLine coverage
 1using Syki.Back.Domain.Webhooks;
 2using Syki.Back.Commands.Domain.Commands;
 3
 4namespace Syki.Back.Database.Webhooks;
 5
 6public class ReceivedWebhookEventDbConfig : IEntityTypeConfiguration<ReceivedWebhookEvent>
 7{
 8    public void Configure(EntityTypeBuilder<ReceivedWebhookEvent> entity)
 9    {
 410        entity.ToTable("received_webhook_events", DbSchemas.Syki);
 11
 412        entity.HasKey(e => e.Id);
 13
 414        entity.HasOne(e => e.Command)
 415            .WithOne()
 416            .HasPrincipalKey<Command>(c => c.Id)
 417            .HasForeignKey<ReceivedWebhookEvent>(e => e.CommandId);
 18
 419        entity.HasIndex(e => new { e.ExternalId, e.Source })
 420            .IsUnique();
 421    }
 22}