feat: initial datamodel + ef connection and migrations

Initial version of the data model
Includes EF initialization and migrations
EF migrations are applied on application start
This commit is contained in:
2026-04-09 10:36:09 +02:00
commit 16160f6424
45 changed files with 2522 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
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 required Player Player { get; set; }
public required Round Round { get; set; }
}
public class TeamParticipant
{
public int MatchId { get; set; }
public int TeamId { get; set; }
public int Seed { get; set; }
public int Score { get; set; }
public required Team Team { get; set; }
public required Match Round { get; set; }
}