50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
// include for node docker image
|
|
binaryTargets = ["native", "debian-openssl-1.1.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("POSTGRES_URL")
|
|
}
|
|
|
|
model Attachment {
|
|
id BigInt @id
|
|
msgId BigInt
|
|
channelId BigInt
|
|
|
|
memeId String @unique @db.Uuid
|
|
meme Meme @relation(fields: [memeId], references: [id], onDelete: Restrict)
|
|
|
|
url String
|
|
contentType String
|
|
|
|
message Json
|
|
guild Json
|
|
channel Json
|
|
vision Json
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([channelId])
|
|
@@map("attachments")
|
|
}
|
|
|
|
model Meme {
|
|
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
|
url String
|
|
text String
|
|
tags Json
|
|
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
attachment Attachment?
|
|
|
|
@@map("memes")
|
|
}
|
|
|
|
|