initial commit
This commit is contained in:
commit
6f5a39c212
47 changed files with 3601 additions and 0 deletions
43
server/prisma/schema.prisma
Normal file
43
server/prisma/schema.prisma
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
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")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue