Skip to content

Commit

Permalink
indx
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Mar 5, 2025
1 parent f8d232b commit 35f4f14
Show file tree
Hide file tree
Showing 5 changed files with 2,338 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,35 @@ internal sealed class DialogEntityConfiguration : IEntityTypeConfiguration<Dialo
public void Configure(EntityTypeBuilder<DialogEntity> builder)
{
builder.ToTable("Dialog");

builder.HasIndex(x => x.ServiceResource);
builder.Property(x => x.ServiceResource)
.HasMaxLength(DefaultMaxStringLength);
builder.Property(x => x.ServiceResource)
.UseCollation("C");

builder.HasIndex(x => x.Party);
builder.Property(x => x.Party)
.UseCollation("C");

builder.HasIndex(x => x.Org);
builder.Property(x => x.Org)
.UseCollation("C");
builder.HasIndex(x => new { x.Org, x.IdempotentKey })
.IsUnique()
.HasFilter($"\"{nameof(DialogEntity.IdempotentKey)}\" is not null");

builder.Property(x => x.IdempotentKey)
.HasMaxLength(36);

builder.HasIndex(x => x.CreatedAt);
builder.HasIndex(x => x.DueAt);
builder.HasIndex(x => x.UpdatedAt);
builder.Property(x => x.Org).UseCollation("C");
builder.Property(x => x.ServiceResource).UseCollation("C");
builder.Property(x => x.Party).UseCollation("C");
builder.HasIndex(x => x.Org);
builder.HasIndex(x => x.ServiceResource);
builder.HasIndex(x => x.Party);
builder.HasIndex(x => x.DueAt);
builder.HasIndex(x => x.VisibleFrom);

builder.HasIndex(x => x.ExtendedStatus);
builder.HasIndex(x => x.ExternalReference);

builder.HasIndex(x => x.Process);
builder.Property(x => x.IdempotentKey).HasMaxLength(36);
builder.HasIndex(x => new { x.Org, x.IdempotentKey }).IsUnique().HasFilter($"\"{nameof(DialogEntity.IdempotentKey)}\" is not null");
}
}
Loading

0 comments on commit 35f4f14

Please sign in to comment.