2021-08-25 12:01:57 -05:00
|
|
|
datasource db {
|
|
|
|
provider = "postgresql"
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
}
|
|
|
|
|
|
|
|
generator client {
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
}
|
|
|
|
|
|
|
|
model User {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
username String
|
|
|
|
password String
|
|
|
|
token String
|
|
|
|
administrator Boolean @default(false)
|
2021-08-26 14:32:51 -05:00
|
|
|
systemTheme String @default("dark_blue")
|
|
|
|
customTheme Theme?
|
2021-08-25 12:01:57 -05:00
|
|
|
embedTitle String?
|
|
|
|
embedColor String @default("#2f3136")
|
|
|
|
images Image[]
|
|
|
|
urls Url[]
|
|
|
|
}
|
|
|
|
|
2021-08-26 14:32:51 -05:00
|
|
|
model Theme {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
type String
|
|
|
|
primary String
|
|
|
|
secondary String
|
|
|
|
error String
|
|
|
|
warning String
|
|
|
|
info String
|
|
|
|
border String
|
|
|
|
mainBackground String
|
|
|
|
paperBackground String
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
userId Int
|
|
|
|
}
|
|
|
|
|
2021-08-25 12:01:57 -05:00
|
|
|
model Image {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
file String
|
|
|
|
mimetype String @default("image/png")
|
|
|
|
created_at DateTime @default(now())
|
|
|
|
views Int @default(0)
|
2021-08-27 15:48:22 -05:00
|
|
|
favorite Boolean @default(false)
|
2021-09-02 22:59:30 -05:00
|
|
|
embed Boolean @default(false)
|
2021-08-25 12:01:57 -05:00
|
|
|
invisible InvisibleImage?
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
userId Int
|
|
|
|
}
|
|
|
|
|
|
|
|
model InvisibleImage {
|
2021-08-30 22:56:34 -05:00
|
|
|
id Int @id @default(autoincrement())
|
2021-08-26 14:32:51 -05:00
|
|
|
invis String @unique
|
2021-08-30 22:56:34 -05:00
|
|
|
|
|
|
|
imageId Int
|
|
|
|
image Image @relation(fields: [imageId], references: [id])
|
2021-08-25 12:01:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
model Url {
|
2021-08-26 14:32:51 -05:00
|
|
|
id Int @id @default(autoincrement())
|
2021-08-25 12:01:57 -05:00
|
|
|
to String
|
2021-08-26 14:32:51 -05:00
|
|
|
created_at DateTime @default(now())
|
|
|
|
views Int @default(0)
|
2021-08-25 12:01:57 -05:00
|
|
|
invisible InvisibleUrl?
|
2021-08-26 14:32:51 -05:00
|
|
|
user User @relation(fields: [userId], references: [id])
|
2021-08-25 12:01:57 -05:00
|
|
|
userId Int
|
|
|
|
}
|
|
|
|
|
|
|
|
model InvisibleUrl {
|
2021-08-26 14:32:51 -05:00
|
|
|
id Int
|
|
|
|
url Url @relation(fields: [id], references: [id])
|
2021-08-25 12:01:57 -05:00
|
|
|
|
2021-08-26 14:32:51 -05:00
|
|
|
invis String @unique
|
2021-08-25 12:01:57 -05:00
|
|
|
}
|