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,26 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Application.DTOs.PointDeductions.Request;
/// <summary>
/// Request to apply a disciplinary point deduction to a team within a division taken from the route.
/// </summary>
public class CreatePointDeductionRequest
{
[Required(ErrorMessage = "The TeamId field is required.")]
public required Guid TeamId { get; set; }
/// <summary>
/// The positive amount of table points to subtract from the team's total.
/// </summary>
[Range(1, int.MaxValue, ErrorMessage = "Points must be at least 1.")]
public required int Points { get; set; }
/// <summary>
/// The disciplinary reason for the deduction.
/// </summary>
[Required(ErrorMessage = "The Reason field is required.")]
[MaxLength(300, ErrorMessage = "Reason cannot exceed 300 characters.")]
public required string Reason { get; set; }
}
@@ -0,0 +1,17 @@
namespace Application.DTOs.PointDeductions.Response;
/// <summary>
/// The point-deduction summary carried on a standings position row for a penalised team.
/// </summary>
public class AppliedPointDeductionResponse
{
/// <summary>
/// The total table points subtracted from the team.
/// </summary>
public int Points { get; set; }
/// <summary>
/// The combined disciplinary reasons.
/// </summary>
public string Reason { get; set; } = string.Empty;
}
@@ -0,0 +1,44 @@
using System;
namespace Application.DTOs.PointDeductions.Response;
/// <summary>
/// A disciplinary point deduction record, as returned by the create and list endpoints.
/// </summary>
public class PointDeductionResponse
{
/// <summary>
/// The unique identifier of the deduction.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// The division whose standings the deduction affects.
/// </summary>
public Guid DivisionId { get; set; }
/// <summary>
/// The penalised team's id.
/// </summary>
public Guid TeamId { get; set; }
/// <summary>
/// The penalised team's name, when the team was loaded.
/// </summary>
public string? TeamName { get; set; }
/// <summary>
/// The table points subtracted from the team's total.
/// </summary>
public int Points { get; set; }
/// <summary>
/// The disciplinary reason for the deduction.
/// </summary>
public string Reason { get; set; } = string.Empty;
/// <summary>
/// When the deduction was applied.
/// </summary>
public DateTime DateCreated { get; set; }
}