added event appointments
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -12,6 +12,8 @@ enum PERMISSION {
|
||||
ADMIN_EVENT
|
||||
ADMIN_USER
|
||||
SUSPENDED
|
||||
PILOT
|
||||
DISPO
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -30,9 +32,11 @@ model User {
|
||||
updatedAt DateTime @default(now()) @map(name: "updated_at")
|
||||
|
||||
// relations:
|
||||
oauthTokens OAuthToken[]
|
||||
discordAccounts DiscordAccount[]
|
||||
participants Participant[]
|
||||
oauthTokens OAuthToken[]
|
||||
discordAccounts DiscordAccount[]
|
||||
participants Participant[]
|
||||
EventAppointmentUser EventAppointment[] @relation("EventAppointmentUser")
|
||||
EventAppointment EventAppointment[]
|
||||
|
||||
@@map(name: "users")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user