Match management view

This commit is contained in:
2026-05-06 16:21:50 +02:00
parent c70b9c554e
commit 5a51a8265d
15 changed files with 2554 additions and 7 deletions
@@ -75,13 +75,23 @@ namespace TournamentOrganizer.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("LoserMatchId")
.HasColumnType("INTEGER");
b.Property<int>("TournamentId")
.HasColumnType("INTEGER");
b.Property<int?>("WinnerMatchId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("LoserMatchId");
b.HasIndex("TournamentId");
b.HasIndex("WinnerMatchId");
b.ToTable("Matches");
});
@@ -243,13 +253,27 @@ namespace TournamentOrganizer.Migrations
modelBuilder.Entity("TournamentOrganizer.Models.Match", b =>
{
b.HasOne("TournamentOrganizer.Models.Match", "LoserMatch")
.WithMany()
.HasForeignKey("LoserMatchId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("TournamentOrganizer.Models.Tournament", "Tournament")
.WithMany()
.HasForeignKey("TournamentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TournamentOrganizer.Models.Match", "WinnerMatch")
.WithMany()
.HasForeignKey("WinnerMatchId")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("LoserMatch");
b.Navigation("Tournament");
b.Navigation("WinnerMatch");
});
modelBuilder.Entity("TournamentOrganizer.Models.Player", b =>
@@ -272,7 +296,7 @@ namespace TournamentOrganizer.Migrations
.IsRequired();
b.HasOne("TournamentOrganizer.Models.Round", "Round")
.WithMany()
.WithMany("Players")
.HasForeignKey("RoundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -285,7 +309,7 @@ namespace TournamentOrganizer.Migrations
modelBuilder.Entity("TournamentOrganizer.Models.Round", b =>
{
b.HasOne("TournamentOrganizer.Models.Match", "Match")
.WithMany()
.WithMany("Rounds")
.HasForeignKey("MatchId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -306,7 +330,7 @@ namespace TournamentOrganizer.Migrations
modelBuilder.Entity("TournamentOrganizer.Models.TeamParticipant", b =>
{
b.HasOne("TournamentOrganizer.Models.Match", "Round")
.WithMany()
.WithMany("Teams")
.HasForeignKey("MatchId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -370,6 +394,18 @@ namespace TournamentOrganizer.Migrations
b.Navigation("Tournaments");
});
modelBuilder.Entity("TournamentOrganizer.Models.Match", b =>
{
b.Navigation("Rounds");
b.Navigation("Teams");
});
modelBuilder.Entity("TournamentOrganizer.Models.Round", b =>
{
b.Navigation("Players");
});
modelBuilder.Entity("TournamentOrganizer.Models.Team", b =>
{
b.Navigation("Matches");