style(notification-outbox): align NotificationOutboxConfiguration with sibling config style

This commit is contained in:
Joseph Doherty
2026-05-19 00:58:50 -04:00
parent 761595309b
commit 3022aa8379

View File

@@ -13,19 +13,42 @@ public class NotificationOutboxConfiguration : IEntityTypeConfiguration<Notifica
{
public void Configure(EntityTypeBuilder<Notification> builder)
{
builder.ToTable("Notifications");
builder.HasKey(n => n.NotificationId);
builder.Property(n => n.NotificationId).HasMaxLength(64);
builder.Property(n => n.Type).HasConversion<string>().HasMaxLength(32).IsRequired();
builder.Property(n => n.Status).HasConversion<string>().HasMaxLength(32).IsRequired();
builder.Property(n => n.ListName).HasMaxLength(200).IsRequired();
builder.Property(n => n.Subject).HasMaxLength(1000).IsRequired();
builder.Property(n => n.Type)
.HasConversion<string>()
.HasMaxLength(32)
.IsRequired();
builder.Property(n => n.Status)
.HasConversion<string>()
.HasMaxLength(32)
.IsRequired();
builder.Property(n => n.ListName)
.HasMaxLength(200)
.IsRequired();
builder.Property(n => n.Subject)
.HasMaxLength(1000)
.IsRequired();
builder.Property(n => n.Body).IsRequired();
builder.Property(n => n.LastError).HasMaxLength(4000);
builder.Property(n => n.SourceSiteId).HasMaxLength(100).IsRequired();
builder.Property(n => n.SourceSiteId)
.HasMaxLength(100)
.IsRequired();
builder.Property(n => n.SourceInstanceId).HasMaxLength(200);
builder.Property(n => n.SourceScript).HasMaxLength(200);
builder.HasIndex(n => new { n.Status, n.NextAttemptAt });
builder.HasIndex(n => new { n.SourceSiteId, n.CreatedAt });
}
}