feat(warteliste): Nachfrage/Warteliste für Interessenten

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 22:43:18 +02:00
parent 5e14124322
commit d25d2ee152
17 changed files with 2724 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ public class ApplicationContext : DbContext
public DbSet<Request> Requests => Set<Request>();
public DbSet<MailSettings> MailSettings => Set<MailSettings>();
public DbSet<Feedback> Feedback => Set<Feedback>();
public DbSet<WaitingListEntry> WaitingListEntries => Set<WaitingListEntry>();
// Keep Gerbil.NameSearch in sync on every save (separator-insensitive search key),
// so it can never drift from Name regardless of which code path mutates the entity.
@@ -212,6 +213,15 @@ public class ApplicationContext : DbContext
e.HasIndex(f => f.CreatedAt);
});
// WAITLIST: same relationship-free pattern as Feedback. ContactId is a plain
// nullable Guid column (no navigation property → EF creates NO foreign key), so
// the import re-ingest wipe of Contacts never cascades into — or breaks —
// waiting-list rows. They survive re-ingest, which is the whole point.
modelBuilder.Entity<WaitingListEntry>(e =>
{
e.HasIndex(w => w.CreatedAt);
});
// DB-4: German collation on remaining searched/sorted text columns (Npgsql-only).
if (isNpgsql)
{