Files
BCSH1-TournamentApp/TournamentOrganizer/Models/Participant.cs
T
2026-05-06 13:28:10 +02:00

34 lines
937 B
C#

using Microsoft.EntityFrameworkCore;
namespace TournamentOrganizer.Models;
[PrimaryKey(nameof(RoundId), nameof(PlayerId))]
public class PlayerParticipant
{
public int RoundId { get; set; }
public int PlayerId { get; set; }
public Player Player { get; set; } = null!;
public Round Round { get; set; } = null!;
}
[PrimaryKey(nameof(MatchId), nameof(TeamId))]
public class TeamParticipant
{
public int MatchId { get; set; }
public int TeamId { get; set; }
public int Seed { get; set; }
public int Score { get; set; }
public Team Team { get; set; } = null!;
public Match Round { get; set; } = null!;
}
[PrimaryKey(nameof(TournamentId), nameof(TeamId))]
public class TournamentTeam
{
public int TournamentId { get; set; }
public int TeamId { get; set; }
public int Seed { get; set; }
public Tournament Tournament { get; set; } = null!;
public Team Team { get; set; } = null!;
}