34 lines
937 B
C#
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!;
|
|
}
|