< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Alterations.Configurations
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Alterations/Configurations.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 41
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%
Configure(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Alterations/Configurations.cs

#LineLine coverage
 1using Elsa.Alterations.Core.Entities;
 2using Microsoft.EntityFrameworkCore;
 3using Microsoft.EntityFrameworkCore.Metadata.Builders;
 4
 5namespace Elsa.Persistence.EFCore.Modules.Alterations;
 6
 7/// <summary>
 8/// EF Core configuration for various entity types.
 9/// </summary>
 10public class Configurations : IEntityTypeConfiguration<AlterationPlan>, IEntityTypeConfiguration<AlterationJob>
 11{
 12    /// <inheritdoc />
 13    public void Configure(EntityTypeBuilder<AlterationPlan> builder)
 14    {
 20315        builder.Ignore(x => x.Alterations);
 20316        builder.Ignore(x => x.WorkflowInstanceFilter);
 20317        builder.Property<string>("SerializedAlterations");
 20318        builder.Property<string>("SerializedWorkflowInstanceFilter");
 20319        builder.Property(x => x.Status).HasConversion<string>();
 20320        builder.HasIndex(x => x.Status).HasDatabaseName($"IX_{nameof(AlterationPlan)}_{nameof(AlterationPlan.Status)}");
 20321        builder.HasIndex(x => x.CreatedAt).HasDatabaseName($"IX_{nameof(AlterationPlan)}_{nameof(AlterationPlan.CreatedA
 20322        builder.HasIndex(x => x.StartedAt).HasDatabaseName($"IX_{nameof(AlterationPlan)}_{nameof(AlterationPlan.StartedA
 20323        builder.HasIndex(x => x.CompletedAt).HasDatabaseName($"IX_{nameof(AlterationPlan)}_{nameof(AlterationPlan.Comple
 20324        builder.HasIndex(x => x.TenantId).HasDatabaseName($"IX_{nameof(AlterationPlan)}_{nameof(AlterationPlan.TenantId)
 20325    }
 26
 27    /// <inheritdoc />
 28    public void Configure(EntityTypeBuilder<AlterationJob> builder)
 29    {
 20330        builder.Ignore(x => x.Log);
 20331        builder.Property<string>("SerializedLog");
 20332        builder.Property(x => x.Status).HasConversion<string>();
 20333        builder.HasIndex(x => x.PlanId).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.PlanId)}");
 20334        builder.HasIndex(x => x.WorkflowInstanceId).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.W
 20335        builder.HasIndex(x => x.Status).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.Status)}");
 20336        builder.HasIndex(x => x.CreatedAt).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.CreatedAt)
 20337        builder.HasIndex(x => x.StartedAt).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.StartedAt)
 20338        builder.HasIndex(x => x.CompletedAt).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.Complete
 20339        builder.HasIndex(x => x.TenantId).HasDatabaseName($"IX_{nameof(AlterationJob)}_{nameof(AlterationJob.TenantId)}"
 20340    }
 41}