Files
var-monorepo/packages/database/prisma/schema/event.prisma
2025-02-22 15:58:04 +01:00

63 lines
2.1 KiB
Plaintext

enum PARTICIPANT_STATUS {
WAITING_FOR_ENTRY_TEST
ENTRY_TEST_FAILED
READY_FOR_EVENT
PARTICIPATED
WAITING_FOR_EXIT_TEST
EXIT_TEST_FAILED
WAITING_FOR_PERMISISONS
FINISHED
WAVED
}
model EventAppointment {
id Int @id @default(autoincrement())
eventId Int
appointmentDate DateTime
presenterId String
// relations:
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 {
id Int @id @default(autoincrement())
name String
description String
discordRoleId String? @default("")
hasPresenceEvents Boolean @default(false)
maxParticipants Int? @default(0)
starterMoodleCourseId String? @default("")
finisherMoodleCourseId String? @default("")
finishedBadges String[] @default([])
requiredBadges String[] @default([])
finishedPermissions String[] @default([])
hidden Boolean @default(true)
// relations:
participants Participant[]
appointments EventAppointment[]
}
model File {
id Int @id @default(autoincrement())
// Weitere Felder für das File-Modell
}