< Summary - Syki

Information
Class: Syki.Back.Features.Academic.CreateWebhookSubscription.WebhookSubscriptionConfig
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CreateWebhookSubscription/WebhookSubscriptionConfig.cs
Tag: 4_16869239191
Line coverage
100%
Covered lines: 14
Uncovered lines: 0
Coverable lines: 14
Total lines: 25
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/Academic/CreateWebhookSubscription/WebhookSubscriptionConfig.cs

#LineLine coverage
 1namespace Syki.Back.Features.Academic.CreateWebhookSubscription;
 2
 3public class WebhookSubscriptionConfig : IEntityTypeConfiguration<WebhookSubscription>
 4{
 5    public void Configure(EntityTypeBuilder<WebhookSubscription> webhookSubscription)
 6    {
 27        webhookSubscription.ToTable("webhook_subscriptions");
 8
 29        webhookSubscription.HasKey(w => w.Id);
 210        webhookSubscription.Property(w => w.Id).ValueGeneratedNever();
 11
 212        webhookSubscription.Property(x => x.Events)
 213            .IsRequired()
 214            .HasColumnType("text[]");
 15
 216        webhookSubscription.HasOne(w => w.Authentication)
 217            .WithOne()
 218            .HasForeignKey<WebhookAuthentication>(w => w.WebhookId)
 219            .IsRequired(false);
 20
 221        webhookSubscription.HasMany(w => w.Calls)
 222            .WithOne()
 223            .HasForeignKey(w => w.WebhookId);
 224    }
 25}