Adding stub targeting

This commit is contained in:
Ccjcarkbla
2026-03-11 11:05:06 -04:00
parent dd287987e0
commit 5c771a1c51
12 changed files with 140 additions and 9 deletions
+5
View File
@@ -104,12 +104,17 @@ public sealed class AppDbContext : DbContext
e.ToTable("ManagedPage");
e.HasKey(x => x.Id);
e.Property(x => x.Key).HasMaxLength(100).IsRequired();
e.Property(x => x.Stub).HasMaxLength(100);
e.Property(x => x.NormalizedStub).HasMaxLength(100);
e.Property(x => x.DisplayName).HasMaxLength(200).IsRequired();
e.Property(x => x.PageKind).HasMaxLength(50).IsRequired();
e.Property(x => x.RecurrenceRule).HasMaxLength(200);
e.Property(x => x.LastUpdatedBy).HasMaxLength(200).IsRequired();
e.Property(x => x.ContentJson).IsRequired();
e.HasIndex(x => x.Key).IsUnique();
e.HasIndex(x => new { x.PageKind, x.NormalizedStub })
.IsUnique()
.HasFilter("[NormalizedStub] IS NOT NULL");
e.HasIndex(x => new { x.PageKind, x.IsEnabled, x.Priority });
});
}