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

@@ -131,6 +131,9 @@ namespace GameList.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int?>("ParentSuggestionId")
.HasColumnType("INTEGER");
b.Property<Guid>("PlayerId")
.HasColumnType("TEXT");
@@ -144,6 +147,8 @@ namespace GameList.Data.Migrations
b.HasKey("Id");
b.HasIndex("ParentSuggestionId");
b.HasIndex("PlayerId");
b.ToTable("Suggestions");
@@ -179,12 +184,19 @@ namespace GameList.Data.Migrations
modelBuilder.Entity("GameList.Domain.Suggestion", b =>
{
b.HasOne("GameList.Domain.Suggestion", "ParentSuggestion")
.WithMany("LinkedSuggestions")
.HasForeignKey("ParentSuggestionId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("GameList.Domain.Player", "Player")
.WithMany("Suggestions")
.HasForeignKey("PlayerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ParentSuggestion");
b.Navigation("Player");
});
@@ -216,6 +228,8 @@ namespace GameList.Data.Migrations
modelBuilder.Entity("GameList.Domain.Suggestion", b =>
{
b.Navigation("LinkedSuggestions");
b.Navigation("Votes");
});
#pragma warning restore 612, 618