Add Events, Registrations, and Payments controllers with DTOs

This commit is contained in:
Denis Urs Rudolph
2026-04-03 21:06:38 +02:00
parent b6962e1024
commit 30d573d1f8
6 changed files with 995 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
using System.ComponentModel.DataAnnotations;
using RacePlannerApi.Models;
namespace RacePlannerApi.DTOs;
public class CreateRegistrationRequest
{
[Required]
public Guid EventId { get; set; }
[MaxLength(100)]
public string? Category { get; set; }
[MaxLength(200)]
public string? EmergencyContact { get; set; }
}
public class UpdateRegistrationRequest
{
public RegistrationStatus? Status { get; set; }
[MaxLength(100)]
public string? Category { get; set; }
[MaxLength(200)]
public string? EmergencyContact { get; set; }
}
public class RegistrationDto
{
public Guid Id { get; set; }
public Guid EventId { get; set; }
public string EventName { get; set; } = string.Empty;
public DateTime EventDate { get; set; }
public Guid ParticipantId { get; set; }
public string ParticipantName { get; set; } = string.Empty;
public string ParticipantEmail { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public string? Category { get; set; }
public string? EmergencyContact { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public decimal TotalPaid { get; set; }
public decimal AmountDue { get; set; }
}