Sube carpetas API, API.Tests, Application y Domain del Backend
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Application.DTOs.Team.Request;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to create a team.
|
||||
/// </summary>
|
||||
public class CreateTeamRequest
|
||||
{
|
||||
[Required(ErrorMessage = "The Name field is required.")]
|
||||
public required string Name { get; init; }
|
||||
|
||||
[Required(ErrorMessage = "The Three-letter code field is required.")]
|
||||
[MaxLength(3)]
|
||||
public required string ThreeLetterCode { get; init; }
|
||||
|
||||
[Required(ErrorMessage = "The ShirtColor field is required")]
|
||||
public required string ShirtColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The jersey kit pattern applied over the primary shirt color; defaults to "solid" when not supplied.
|
||||
/// </summary>
|
||||
[MaxLength(20)]
|
||||
public string JerseyStyle { get; set; } = "solid";
|
||||
|
||||
/// <summary>
|
||||
/// Optional secondary #rrggbb hex color used for the jersey pattern or trim.
|
||||
/// </summary>
|
||||
[MaxLength(9)]
|
||||
public string? ShirtSecondaryColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional third #rrggbb hex color, used only by tri-color kit templates as a second accent.
|
||||
/// </summary>
|
||||
[MaxLength(9)]
|
||||
public string? ShirtTertiaryColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The logo image file to upload, which must be JPEG or PNG.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "The Logo image is required.")]
|
||||
[DataType(DataType.Upload)]
|
||||
public required IFormFile LogoFile { get; init; }
|
||||
|
||||
public Guid? TournamentId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Application.DTOs.Abstract.Request;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Application.DTOs.Team.Request;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get filtered teams.
|
||||
/// </summary>
|
||||
public class GetTeamsFilteredRequest : PaginatedFilterRequest
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? ThreeLetterCode { get; set; }
|
||||
|
||||
public string? ShirtColor { get; set; }
|
||||
|
||||
public Guid? StageId { get; set; }
|
||||
public Guid? TournamentId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
namespace Application.DTOs.Team.Request;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to update a team's logo.
|
||||
/// </summary>
|
||||
public class UpdateTeamLogoRequest
|
||||
{
|
||||
[Required(ErrorMessage = "The TeamId field is required.")]
|
||||
public required Guid TeamId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The logo image file to upload, which must be JPEG or PNG.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "The Logo image is required.")]
|
||||
[DataType(DataType.Upload)]
|
||||
public required IFormFile LogoFile { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Application.DTOs.Team.Request;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to update a team's details.
|
||||
/// </summary>
|
||||
public class UpdateTeamRequest
|
||||
{
|
||||
public string? Name { get; init; }
|
||||
|
||||
[MaxLength(3)]
|
||||
public string? ThreeLetterCode { get; init; }
|
||||
|
||||
public string? ShirtColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The jersey kit pattern applied over the primary shirt color; left unchanged when not supplied.
|
||||
/// </summary>
|
||||
[MaxLength(20)]
|
||||
public string? JerseyStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional secondary #rrggbb hex color used for the jersey pattern or trim.
|
||||
/// </summary>
|
||||
[MaxLength(9)]
|
||||
public string? ShirtSecondaryColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional third #rrggbb hex color, used only by tri-color kit templates as a second accent.
|
||||
/// </summary>
|
||||
[MaxLength(9)]
|
||||
public string? ShirtTertiaryColor { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user