Merge branch 'worktree-agent-a02f88e8490625846'

# Conflicts:
#	GerbilManagerWebAPI/ApplicationContext.cs
#	GerbilManagerWebAPI/Program.cs
#	gerbil-manager-web/e2e/mock-data.ts
#	gerbil-manager-web/src/App.tsx
#	gerbil-manager-web/src/components/AppShell.tsx
#	gerbil-manager-web/src/strings/de.ts
This commit is contained in:
2026-06-22 23:07:22 +02:00
17 changed files with 2646 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ public class ApplicationContext : DbContext
public DbSet<AcquisitionRecord> AcquisitionRecords => Set<AcquisitionRecord>();
public DbSet<SaleReservation> SaleReservations => Set<SaleReservation>();
public DbSet<WaitingListEntry> WaitingListEntries => Set<WaitingListEntry>();
public DbSet<ReturnRecord> ReturnRecords => Set<ReturnRecord>();
// 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.
@@ -242,6 +243,19 @@ public class ApplicationContext : DbContext
modelBuilder.Entity<WaitingListEntry>(e =>
{
e.HasIndex(w => w.CreatedAt);
});
// RÜCKNAHMEN (getback_tb): wie Feedback bewusst beziehungsfrei. GerbilId/
// FromContactId sind einfache nullable Guid-Spalten (keine Navigation → EF legt
// KEINEN Foreign Key an), damit der Import-Re-Ingest-Wipe von Gerbils/Contacts
// diese Zeilen weder löscht noch bricht. Sie überleben den Re-Ingest.
modelBuilder.Entity<ReturnRecord>(e =>
{
e.Property(r => r.ReturnPrice).HasPrecision(10, 2);
e.Property(r => r.OriginalPrice).HasPrecision(10, 2);
e.HasIndex(r => r.GerbilId);
e.HasIndex(r => r.CreatedAt);
});
// DB-4: German collation on remaining searched/sorted text columns (Npgsql-only).
if (isNpgsql)