mirror of
https://github.com/sern-handler/frontpage-bot
synced 2026-06-06 01:16:54 +00:00
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
|
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
username String @unique
|
|
discord_id String @unique
|
|
hashed_password String
|
|
isAdmin Boolean @default(false)
|
|
sessions Session[]
|
|
bots Bot[]
|
|
}
|
|
|
|
model Session {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
expiresAt DateTime
|
|
user User @relation(references: [id], fields: [userId], onDelete: Cascade)
|
|
}
|
|
|
|
model Bot {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
user User @relation(references: [id], fields: [userId], onDelete: Cascade)
|
|
|
|
name String
|
|
description String
|
|
verified Boolean @default(false)
|
|
pfpLink String
|
|
inviteLink String?
|
|
srcLink String?
|
|
botId String
|
|
}
|