Add linked suggestions with synced voting

This commit is contained in:
2026-02-05 09:07:46 +01:00
parent 431370ceb9
commit 5d432c9d17
19 changed files with 725 additions and 34 deletions

View File

@@ -49,6 +49,11 @@ public class AppDbContext : DbContext
builder.Property(s => s.GameUrl).HasMaxLength(2048);
builder.Property(s => s.MinPlayers);
builder.Property(s => s.MaxPlayers);
builder.HasOne(s => s.ParentSuggestion)
.WithMany(p => p.LinkedSuggestions)
.HasForeignKey(s => s.ParentSuggestionId)
.OnDelete(DeleteBehavior.SetNull);
builder.HasIndex(s => s.ParentSuggestionId);
});
modelBuilder.Entity<Vote>(builder =>