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
+56
View File
@@ -0,0 +1,56 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RacePlannerApi.Models;
public class Event
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
[MaxLength(200)]
public string Name { get; set; } = string.Empty;
[MaxLength(2000)]
public string Description { get; set; } = string.Empty;
[Required]
public DateTime EventDate { get; set; }
[Required]
[MaxLength(500)]
public string Location { get; set; } = string.Empty;
public EventStatus Status { get; set; } = EventStatus.Draft;
[MaxLength(100)]
public string? Category { get; set; }
public List<string> Tags { get; set; } = new List<string>();
public int? MaxParticipants { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
// Foreign keys
[Required]
public Guid OrganizerId { get; set; }
[ForeignKey("OrganizerId")]
public User Organizer { get; set; } = null!;
// Navigation properties
public ICollection<Registration> Registrations { get; set; } = new List<Registration>();
public ICollection<Announcement> Announcements { get; set; } = new List<Announcement>();
}
public enum EventStatus
{
Draft,
Published,
Cancelled,
Completed
}