mirror of
https://github.com/SrIzan10/prox2-discord.git
synced 2026-06-06 01:06:57 +00:00
59 lines
1.3 KiB
Plaintext
59 lines
1.3 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 = "sqlite"
|
|
url = "file:./sqlite.db"
|
|
}
|
|
|
|
model Post {
|
|
id Int @id @default(autoincrement())
|
|
content String
|
|
published Boolean @default(false)
|
|
guildId String
|
|
verifMsgId String
|
|
posterHash String
|
|
publicMsgId String?
|
|
|
|
votes Vote[]
|
|
replyUsers ReplyUser[]
|
|
}
|
|
|
|
model Vote {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
guildId String
|
|
postId Int
|
|
post Post @relation(fields: [postId], references: [id])
|
|
voterHash String
|
|
isUpvote Boolean
|
|
|
|
@@unique([postId, voterHash])
|
|
}
|
|
|
|
model GuildConfig {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
guildId String @unique
|
|
verifChannelId String
|
|
publicChannelId String
|
|
}
|
|
|
|
model ReplyUser {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
guildId String
|
|
userId Int @unique
|
|
postId Int
|
|
post Post @relation(fields: [postId], references: [id])
|
|
userHash String
|
|
|
|
@@unique([guildId, userHash])
|
|
} |