trillium/server/prisma/schema.prisma

44 lines
803 B
Plaintext
Raw Permalink Normal View History

2024-05-22 08:35:43 +00:00
generator client {
provider = "prisma-client-js"
}
model Upload {
id String @id
expiresAt DateTime
type String
uploadedBy String
}
model User {
id String @id
username String
password String
staff Boolean @default(false)
status String @default("")
passkeys Json[]
sessions Session[]
}
model Punishment {
id String @id
type String // "mute", "ban"
reason String
punishedUserId String
staffId String
time Int
at DateTime
}
model Session {
id String @id
userId String
expiresAt DateTime
user User @relation(references: [id], fields: [userId], onDelete: Cascade)
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}