added event appointments

This commit is contained in:
PxlLoewe
2025-02-22 15:58:04 +01:00
parent 3fd0e991fd
commit 433b3713c6
9 changed files with 199 additions and 47 deletions

View File

@@ -10,16 +10,30 @@ enum PARTICIPANT_STATUS {
WAVED
}
model Participant {
id Int @id @default(autoincrement())
userId String @map(name: "user_id")
status PARTICIPANT_STATUS
selectedForParticipatioon Boolean @default(false)
statusLog Json[]
eventId Int
model EventAppointment {
id Int @id @default(autoincrement())
eventId Int
appointmentDate DateTime
presenterId String
// relations:
user User @relation(fields: [userId], references: [id])
Event Event? @relation(fields: [eventId], references: [id])
Users User[] @relation("EventAppointmentUser")
participants Participant[]
Event Event @relation(fields: [eventId], references: [id])
Presenter User @relation(fields: [presenterId], references: [id])
}
model Participant {
id Int @id @default(autoincrement())
userId String @map(name: "user_id")
starterMoodleCurseCompleted Boolean @default(false)
finisherMoodleCurseCompleted Boolean @default(false)
eventAppointmentId Int?
statusLog Json[]
eventId Int
// relations:
User User @relation(fields: [userId], references: [id])
Event Event @relation(fields: [eventId], references: [id])
EventAppointment EventAppointment? @relation(fields: [eventAppointmentId], references: [id])
}
model Event {
@@ -38,6 +52,7 @@ model Event {
// relations:
participants Participant[]
appointments EventAppointment[]
}
model File {