Commit Debut de rework

This commit is contained in:
2022-03-19 22:54:55 +01:00
parent aebc60d17f
commit ab02d292da
24 changed files with 234 additions and 212 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
namespace LaDOSE.Entity
{
/// <summary>
/// Represent a Event (Multiple tournaments)
/// </summary>
public class Event : Context.Entity
{
public Event()
{
}
public Event(string name,int? smashId)
{
Name = name;
SmashId = smashId;
}
public String Name { get; set; }
public int? SmashId { get; set; }
public DateTime Date { get; set; }
public List<Tournament> Tournaments { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Security.Cryptography.X509Certificates;
namespace LaDOSE.Entity
{
public class Player : Context.Entity
{
public Player()
{
}
public Player(string name, int? challongeId, int? smashId)
{
this.Name = name;
ChallongeId = challongeId;
SmashId = smashId;
}
public String SmashName { get; set; }
public String Name { get; set; }
public int? ChallongeId {get;set;}
public int? SmashId {get;set;}
public Boolean IsChallonge => ChallongeId.HasValue;
}
}

View File

@@ -0,0 +1,27 @@
namespace LaDOSE.Entity
{
public class Result : Context.Entity
{
public Result(Player player, int point, int rank, Tournament tournament)
{
Player = player;
Point = point;
Rank = rank;
Tournament = tournament;
}
public Result()
{
}
public int PlayerId { get; set; }
public Player Player { get; set; }
public int IdTournament { get; set; }
public Tournament Tournament{ get; set; }
public int Point { get; set; }
public int Rank { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
using System;
namespace LaDOSE.Entity
{
public class Tournament : Context.Entity
{
public Tournament()
{
}
public Tournament(string name, int challongeId, int smashId)
{
Name = name;
ChallongeId = challongeId;
SmashId = smashId;
}
public String Name { get; set; }
public int ChallongeId {get;set;}
public int SmashId {get;set;}
public int? GameId {get;set;}
public Game Game { get; set; }
}
}