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,11 @@
using System;
namespace Application.DTOs.Club.Request;
/// <summary>
/// Links a club as a squad of the given parent institution club.
/// </summary>
public class LinkClubParentRequest
{
public required Guid ParentClubId { get; set; }
}
@@ -0,0 +1,9 @@
namespace Application.DTOs.Club.Request;
/// <summary>
/// Renames a club. The club's slug (used in its public URL) never changes, only its display name.
/// </summary>
public class RenameClubRequest
{
public required string Name { get; set; }
}
@@ -0,0 +1,10 @@
namespace Application.DTOs.Club.Response;
/// <summary>
/// Outcome of the idempotent club backfill; a second run reports zeros.
/// </summary>
public class ClubBackfillResult
{
public required int ClubsCreated { get; set; }
public required int TeamsLinked { get; set; }
}
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
namespace Application.DTOs.Club.Response;
/// <summary>
/// A club's stable identity plus every per-season team that belongs to it.
/// </summary>
public class ClubHistoryResponse
{
public required Guid Id { get; set; }
public required string Name { get; set; }
public required string Slug { get; set; }
public string? LogoUrl { get; set; }
/// <summary>
/// The per-season teams that make up this club's history.
/// </summary>
public required List<ClubTeamSeasonResponse> Teams { get; set; } = [];
/// <summary>
/// The parent institution this club is a squad of, or null when this club has no parent linked.
/// </summary>
public ClubSummaryResponse? ParentClub { get; set; }
/// <summary>
/// Other squads linked to this club as their parent institution, empty when this club has none.
/// </summary>
public required List<ClubSummaryResponse> ChildClubs { get; set; } = [];
}
@@ -0,0 +1,17 @@
using System;
namespace Application.DTOs.Club.Response;
/// <summary>
/// One season a club's team participated in.
/// </summary>
public class ClubSeasonResponse
{
public required Guid TournamentId { get; set; }
public string? TournamentName { get; set; }
/// <summary>
/// Sort key only, not displayed; defaults to the minimum date so unresolved tournaments sort last.
/// </summary>
public DateTime StartDate { get; set; }
}
@@ -0,0 +1,14 @@
using System;
namespace Application.DTOs.Club.Response;
/// <summary>
/// A minimal club identity, used for pickers and for referencing a related club (parent/child) without pulling in its full season history.
/// </summary>
public class ClubSummaryResponse
{
public required Guid Id { get; set; }
public required string Name { get; set; }
public required string Slug { get; set; }
public string? LogoUrl { get; set; }
}
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
namespace Application.DTOs.Club.Response;
/// <summary>
/// One per-season team row belonging to a club, with the seasons it participated in.
/// </summary>
public class ClubTeamSeasonResponse
{
public required Guid TeamId { get; set; }
public required string Name { get; set; }
public required string Slug { get; set; }
public required string ThreeLetterCode { get; set; }
/// <summary>
/// The tournaments this team was registered in, sourced from its registration records.
/// </summary>
public required List<ClubSeasonResponse> Seasons { get; set; } = [];
}