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,15 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Application.DTOs.MatchSeries.Request;
/// <summary>
/// Payload for scheduling the next game of an existing series; GameNumber and teams are derived server-side.
/// </summary>
public class AddGameToSeriesRequest
{
[Required(ErrorMessage = "Match date field is required.")]
public required DateTime MatchDate { get; set; }
public Guid? VenueId { get; set; }
}
@@ -0,0 +1,22 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Application.DTOs.MatchSeries.Request;
/// <summary>
/// Payload for creating a new best-of-N playoff series between two teams at one bracket round.
/// </summary>
public class CreateMatchSeriesRequest
{
/// <summary>
/// The stage this series belongs to; its BestOf value is copied onto the series at creation time.
/// </summary>
[Required(ErrorMessage = "Stage ID field is required.")]
public required Guid StageId { get; set; }
[Required(ErrorMessage = "Home team ID field is required.")]
public required Guid HomeTeamId { get; set; }
[Required(ErrorMessage = "Visitor team ID field is required.")]
public required Guid VisitorTeamId { get; set; }
}
@@ -0,0 +1,13 @@
using Application.DTOs.Abstract.Request;
using System;
namespace Application.DTOs.MatchSeries.Request;
/// <summary>
/// Represents a request to filter and paginate playoff series.
/// </summary>
public class GetMatchSeriesFilteredRequest : PaginatedFilterRequest
{
public Guid? StageId { get; set; }
}
@@ -0,0 +1,42 @@
using Application.DTOs.Abstract.Response;
using System;
using System.Collections.Generic;
namespace Application.DTOs.MatchSeries.Response;
/// <summary>
/// A best-of-N playoff series between two teams at one bracket round, including its individual games.
/// </summary>
public class MatchSeriesResponse : BaseEntityResponse
{
public required Guid StageId { get; set; }
public required Guid HomeTeamId { get; set; }
public required string HomeTeamName { get; set; }
public required Guid VisitorTeamId { get; set; }
public required string VisitorTeamName { get; set; }
/// <summary>
/// Number of games in this series, one of 1, 3, 5, or 7.
/// </summary>
public required int BestOf { get; set; }
/// <summary>
/// The id of the winning team, set once one team has won the majority of the series' games.
/// </summary>
public Guid? WinningTeamId { get; set; }
/// <summary>
/// The name of the winning team, if the series has been decided.
/// </summary>
public string? WinningTeamName { get; set; }
/// <summary>
/// The individual games played so far in this series.
/// </summary>
public List<SeriesGameResponse> Games { get; set; } = [];
}
@@ -0,0 +1,14 @@
using Application.DTOs.Match.Response;
namespace Application.DTOs.MatchSeries.Response;
/// <summary>
/// A single game within a best-of-N series, with its position in the series alongside the match details.
/// </summary>
public class SeriesGameResponse : MinimalMatchResponse
{
/// <summary>
/// The game's 1-based position within the series.
/// </summary>
public required int GameNumber { get; set; }
}