refactor(arabot): change StatRole to one to one relationship in Prisma

This commit is contained in:
smyalygames
2023-03-02 00:30:48 +00:00
parent 086d1d50c6
commit 80d90256d5
2 changed files with 16 additions and 8 deletions

View File

@@ -96,6 +96,8 @@ model LeaveLog {
roles String[]
}
// Outreach
model Event {
id Int @id @default(autoincrement())
type EventType @relation(fields: [eventType], references: [type])
@@ -125,7 +127,7 @@ model Stat {
documentary Int @default(0)
educated Int @default(0)
participants ParticipantStat[]
role StatRole[]
role StatRole?
}
model StatRole {
@@ -143,6 +145,8 @@ model ParticipantStat {
@@id([statId, userId])
}
// Moderation
model Sus {
id Int @id @default(autoincrement())
user User @relation("susUser", fields: [userId], references: [id])