77 lines
2.6 KiB
C#
77 lines
2.6 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace LaDOSE.DTO
|
|
{
|
|
/// <summary>
|
|
/// Every recorded meeting between two players, broken down per game.
|
|
/// Sets belonging to a bracket with no game attached are not in <see cref="Games"/>
|
|
/// nor in the totals — they are only counted in <see cref="UnknownGameSets"/>.
|
|
/// </summary>
|
|
public class PlayerVersusDTO
|
|
{
|
|
public int PlayerAId { get; set; }
|
|
|
|
/// <summary>Gamertag, falling back to Name, else "#<id>".</summary>
|
|
public string PlayerA { get; set; }
|
|
|
|
public int PlayerBId { get; set; }
|
|
|
|
public string PlayerB { get; set; }
|
|
|
|
/// <summary>Meetings in a bracket whose game is known — the sum of the rows in <see cref="Games"/>.</summary>
|
|
public int Sets { get; set; }
|
|
|
|
/// <summary>Of those, the ones with a determinable winner.</summary>
|
|
public int DecidedSets { get; set; }
|
|
|
|
public int WinsA { get; set; }
|
|
public int WinsB { get; set; }
|
|
|
|
/// <summary>Meetings dropped because the bracket has no game attached.</summary>
|
|
public int UnknownGameSets { get; set; }
|
|
|
|
/// <summary>One row per game they met in, most-played first.</summary>
|
|
public List<VersusGameStatsDTO> Games { get; set; }
|
|
}
|
|
|
|
/// <summary>One game's slice of a <see cref="PlayerVersusDTO"/>.</summary>
|
|
public class VersusGameStatsDTO
|
|
{
|
|
public int GameId { get; set; }
|
|
|
|
/// <summary>Game name, or "#<id>" when the game row is gone.</summary>
|
|
public string Game { get; set; }
|
|
|
|
public string GameLongName { get; set; }
|
|
|
|
/// <summary>Meetings in this game, decided or not.</summary>
|
|
public int Sets { get; set; }
|
|
|
|
/// <summary>Meetings with a determinable winner. Always equals WinsA + WinsB.</summary>
|
|
public int DecidedSets { get; set; }
|
|
|
|
public int WinsA { get; set; }
|
|
public int WinsB { get; set; }
|
|
|
|
/// <summary>Individual games won inside the decided sets.</summary>
|
|
public int GamesWonA { get; set; }
|
|
|
|
public int GamesWonB { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// A player who can be picked for a versus lookup: one with at least one set in a
|
|
/// bracket whose game is known.
|
|
/// </summary>
|
|
public class PlayerOptionDTO
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>Gamertag, falling back to Name, else "#<id>".</summary>
|
|
public string Name { get; set; }
|
|
|
|
/// <summary>Sets in a bracket with a known game, whoever the opponent was.</summary>
|
|
public int Sets { get; set; }
|
|
}
|
|
}
|