style(notification-outbox): align NotificationOutboxConfiguration with sibling config style
This commit is contained in:
@@ -13,19 +13,42 @@ public class NotificationOutboxConfiguration : IEntityTypeConfiguration<Notifica
|
|||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<Notification> builder)
|
public void Configure(EntityTypeBuilder<Notification> builder)
|
||||||
{
|
{
|
||||||
builder.ToTable("Notifications");
|
|
||||||
builder.HasKey(n => n.NotificationId);
|
builder.HasKey(n => n.NotificationId);
|
||||||
|
|
||||||
builder.Property(n => n.NotificationId).HasMaxLength(64);
|
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.Type)
|
||||||
builder.Property(n => n.ListName).HasMaxLength(200).IsRequired();
|
.HasConversion<string>()
|
||||||
builder.Property(n => n.Subject).HasMaxLength(1000).IsRequired();
|
.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.Body).IsRequired();
|
||||||
|
|
||||||
builder.Property(n => n.LastError).HasMaxLength(4000);
|
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.SourceInstanceId).HasMaxLength(200);
|
||||||
|
|
||||||
builder.Property(n => n.SourceScript).HasMaxLength(200);
|
builder.Property(n => n.SourceScript).HasMaxLength(200);
|
||||||
|
|
||||||
builder.HasIndex(n => new { n.Status, n.NextAttemptAt });
|
builder.HasIndex(n => new { n.Status, n.NextAttemptAt });
|
||||||
|
|
||||||
builder.HasIndex(n => new { n.SourceSiteId, n.CreatedAt });
|
builder.HasIndex(n => new { n.SourceSiteId, n.CreatedAt });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user