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], onDelete: Cascade)
    CreatedUser User?   @relation("CreatedPenalties", fields: [createdUserId], references: [id])
    Report      Report? @relation(fields: [reportId], references: [id])
}

enum PenaltyType {
    KICK
    TIME_BAN
    PERMISSIONS_REVOCED
    BAN
}
