Refactor event status handling: Remove EventStatus enum from the Prisma schema and update related API routes and UI components to calculate event status dynamically based on event date. This change simplifies event management and enhances data integrity by ensuring status is always derived from the date.

This commit is contained in:
Julien Froidefond
2025-12-10 05:45:25 +01:00
parent fb830c6fcc
commit a69613a232
15 changed files with 167 additions and 298 deletions

View File

@@ -23,12 +23,6 @@ enum EventType {
CODE_KATA
}
enum EventStatus {
UPCOMING
LIVE
PAST
}
enum CharacterClass {
WARRIOR
MAGE
@@ -89,7 +83,6 @@ model Event {
name String
description String
type EventType
status EventStatus
room String?
time String?
maxPlaces Int?
@@ -97,7 +90,6 @@ model Event {
updatedAt DateTime @updatedAt
registrations EventRegistration[]
@@index([status])
@@index([date])
}