187 lines
4.3 KiB
C#
187 lines
4.3 KiB
C#
using Koogle.Domain.Enums;
|
|
|
|
namespace Koogle.Application.DTOs;
|
|
|
|
/// <summary>
|
|
/// Data transfer object representing a game day.
|
|
/// </summary>
|
|
public record DayDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the day.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Date of the game day.
|
|
/// </summary>
|
|
public DateTime PostDate { get; init; }
|
|
|
|
/// <summary>
|
|
/// Current status of the day (New, Started, Postponed, Closed).
|
|
/// </summary>
|
|
public DayStatus Status { get; init; }
|
|
|
|
/// <summary>
|
|
/// Unique identifier of the club this day belongs to.
|
|
/// </summary>
|
|
public Guid ClubId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Name of the club this day belongs to.
|
|
/// </summary>
|
|
public string? ClubName { get; init; }
|
|
|
|
/// <summary>
|
|
/// Number of participants on this day.
|
|
/// </summary>
|
|
public int ParticipantCount { get; init; }
|
|
|
|
/// <summary>
|
|
/// List of participants on this day.
|
|
/// </summary>
|
|
public List<DayParticipantDto> Participants { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// Date and time when the day was created.
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; init; }
|
|
|
|
/// <summary>
|
|
/// Date and time when the day was last modified.
|
|
/// </summary>
|
|
public DateTime? ModifiedAt { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Lightweight data transfer object for day summaries.
|
|
/// </summary>
|
|
public record DaySummaryDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the day.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Date of the game day.
|
|
/// </summary>
|
|
public DateTime PostDate { get; init; }
|
|
|
|
/// <summary>
|
|
/// Current status of the day.
|
|
/// </summary>
|
|
public DayStatus Status { get; init; }
|
|
|
|
/// <summary>
|
|
/// Number of participants on this day.
|
|
/// </summary>
|
|
public int ParticipantCount { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for creating a new game day.
|
|
/// </summary>
|
|
public record CreateDayDto
|
|
{
|
|
/// <summary>
|
|
/// Date of the game day to create.
|
|
/// </summary>
|
|
public DateTime PostDate { get; init; } = DateTime.Today;
|
|
|
|
/// <summary>
|
|
/// List of person IDs to add as initial participants.
|
|
/// </summary>
|
|
public List<Guid> ParticipantIds { get; init; } = [];
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for updating an existing game day.
|
|
/// </summary>
|
|
public record UpdateDayDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the day to update.
|
|
/// </summary>
|
|
public Guid Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated date of the game day.
|
|
/// </summary>
|
|
public DateTime PostDate { get; init; }
|
|
|
|
/// <summary>
|
|
/// Updated status of the day.
|
|
/// </summary>
|
|
public DayStatus Status { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object representing a participant on a game day.
|
|
/// </summary>
|
|
public record DayParticipantDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the person.
|
|
/// </summary>
|
|
public Guid PersonId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Name of the person.
|
|
/// </summary>
|
|
public string PersonName { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Status indicating whether the person is a member or guest.
|
|
/// </summary>
|
|
public PersonStatus PersonStatus { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for adding a participant to a game day.
|
|
/// </summary>
|
|
public record AddDayParticipantDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the day.
|
|
/// </summary>
|
|
public Guid DayId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Unique identifier of the person to add.
|
|
/// </summary>
|
|
public Guid PersonId { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for removing a participant from a game day.
|
|
/// </summary>
|
|
public record RemoveDayParticipantDto
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier of the day.
|
|
/// </summary>
|
|
public Guid DayId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Unique identifier of the person to remove.
|
|
/// </summary>
|
|
public Guid PersonId { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data transfer object for filtering game days.
|
|
/// </summary>
|
|
public record DayFilterDto
|
|
{
|
|
/// <summary>
|
|
/// Filter by year.
|
|
/// </summary>
|
|
public int? Year { get; init; }
|
|
|
|
/// <summary>
|
|
/// Filter by status.
|
|
/// </summary>
|
|
public DayStatus? Status { get; init; }
|
|
}
|