WIP: Project setup with .NET backend and Next.js frontend

This commit is contained in:
Denis Urs Rudolph
2026-04-03 20:55:58 +02:00
parent fbfa367c16
commit 8bfd49e0ab
34 changed files with 2553 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RacePlannerApi.Models;
public class Registration
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
public Guid EventId { get; set; }
[ForeignKey("EventId")]
public Event Event { get; set; } = null!;
[Required]
public Guid ParticipantId { get; set; }
[ForeignKey("ParticipantId")]
public User Participant { get; set; } = null!;
public RegistrationStatus Status { get; set; } = RegistrationStatus.Pending;
[MaxLength(100)]
public string? Category { get; set; }
[MaxLength(200)]
public string? EmergencyContact { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? UpdatedAt { get; set; }
// Navigation properties
public ICollection<Payment> Payments { get; set; } = new List<Payment>();
}
public enum RegistrationStatus
{
Pending,
Confirmed,
Cancelled,
Completed
}