26 lines
598 B
Plaintext
26 lines
598 B
Plaintext
model Penalty {
|
|
id Int @id @default(autoincrement())
|
|
userId String
|
|
createdUserId String
|
|
reportId Int?
|
|
|
|
type PenaltyType
|
|
reason String
|
|
until DateTime?
|
|
|
|
suspended Boolean @default(false)
|
|
|
|
timestamp DateTime @default(now())
|
|
|
|
// relations:
|
|
User User @relation(fields: [userId], references: [id])
|
|
CreatedUser User @relation("CreatedPenalties", fields: [createdUserId], references: [id])
|
|
Report Report? @relation(fields: [reportId], references: [id])
|
|
}
|
|
|
|
enum PenaltyType {
|
|
KICK
|
|
TIME_BAN
|
|
BAN
|
|
}
|