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
+35
View File
@@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
namespace RacePlannerApi.Models;
public class User
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
[EmailAddress]
public string Email { get; set; } = string.Empty;
[Required]
public string PasswordHash { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string Name { get; set; } = string.Empty;
[Required]
public UserRole Role { get; set; } = UserRole.Participant;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation properties
public ICollection<Event> OrganizedEvents { get; set; } = new List<Event>();
public ICollection<Registration> Registrations { get; set; } = new List<Registration>();
}
public enum UserRole
{
Participant,
Organizer
}