Add linked suggestions with synced voting
This commit is contained in:
@@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user