Sube carpetas API, API.Tests, Application y Domain del Backend

This commit is contained in:
FrancoRu
2026-09-18 13:35:59 -03:00
parent bbb09554bb
commit 2eb4eeef03
572 changed files with 56405 additions and 0 deletions
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace Application.DTOs.Statistics.Response;
/// <summary>
/// A player's full cross-season trajectory, one entry per registered season, most recent first.
/// </summary>
public class PlayerHistoryResponse
{
public required Guid PlayerId { get; set; }
public required string FullName { get; set; }
/// <summary>
/// Per-season trajectory rows, most recent season first.
/// </summary>
public IEnumerable<PlayerHistorySeasonResponse> Seasons { get; set; } = [];
}
@@ -0,0 +1,25 @@
using System;
namespace Application.DTOs.Statistics.Response;
/// <summary>
/// A single sanction the player received during a given season.
/// </summary>
public class PlayerHistorySanctionResponse
{
public required Guid SanctionId { get; set; }
public required string Description { get; set; }
/// <summary>
/// Length in fechas, or matchdays.
/// </summary>
public required int Duration { get; set; }
public required DateTime IssuedDate { get; set; }
/// <summary>
/// The match the sanction was issued in.
/// </summary>
public required Guid MatchId { get; set; }
}
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
namespace Application.DTOs.Statistics.Response;
/// <summary>
/// One row of a player's trajectory, sourced from the season-scoped registration to preserve past history.
/// </summary>
public class PlayerHistorySeasonResponse
{
/// <summary>
/// The season, as the calendar year of the tournament's start date.
/// </summary>
public required int Season { get; set; }
public required Guid TournamentId { get; set; }
public required string TournamentName { get; set; }
/// <summary>
/// The team the player was registered to for that season.
/// </summary>
public required Guid TeamId { get; set; }
public required string TeamName { get; set; }
/// <summary>
/// Total points scored for that season's tournament.
/// </summary>
public required int TotalPoints { get; set; }
/// <summary>
/// Distinct games played in that season's tournament.
/// </summary>
public required int GamesPlayed { get; set; }
/// <summary>
/// Sanctions received during that season's tournament.
/// </summary>
public IEnumerable<PlayerHistorySanctionResponse> Sanctions { get; set; } = [];
}
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
namespace Application.DTOs.Statistics.Response;
/// <summary>
/// A player's individual statistic card: total and average points and games played, per season and overall.
/// </summary>
public class PlayerStatisticCardResponse
{
/// <summary>
/// The player's stable identity, the same person across every season.
/// </summary>
public required Guid PlayerId { get; set; }
/// <summary>
/// The player's full name, formatted as LAST First Second.
/// </summary>
public required string FullName { get; set; }
/// <summary>
/// Overall total points across every season.
/// </summary>
public required int TotalPoints { get; set; }
/// <summary>
/// Overall distinct games played across every season.
/// </summary>
public required int GamesPlayed { get; set; }
/// <summary>
/// Overall points per game played, rounded to two decimals; zero when no games were played.
/// </summary>
public required double AveragePoints { get; set; }
/// <summary>
/// Per-season breakdown, most recent season first.
/// </summary>
public IEnumerable<SeasonStatLineResponse> Seasons { get; set; } = [];
}
@@ -0,0 +1,27 @@
namespace Application.DTOs.Statistics.Response;
/// <summary>
/// One season's scoring line in a player's statistic card, where a season is a tournament start-date year.
/// </summary>
public class SeasonStatLineResponse
{
/// <summary>
/// The season, as the calendar year of the tournament's start date.
/// </summary>
public required int Season { get; set; }
/// <summary>
/// Total points the player scored in that season.
/// </summary>
public required int TotalPoints { get; set; }
/// <summary>
/// Distinct matches the player had a scoring-sheet entry for in that season.
/// </summary>
public required int GamesPlayed { get; set; }
/// <summary>
/// Points per game played in that season, rounded to two decimals; zero when no games were played.
/// </summary>
public required double AveragePoints { get; set; }
}