104 lines
2 KiB
Text
104 lines
2 KiB
Text
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Guild {
|
|
id String @unique
|
|
GuildMember GuildMember[]
|
|
|
|
// Settings
|
|
|
|
// {
|
|
// url: {
|
|
// iv: {
|
|
// type: String,
|
|
// required: true,
|
|
// unique: false,
|
|
// index: true,
|
|
// }
|
|
// ,
|
|
// content: {
|
|
// type: String,
|
|
// required: true,
|
|
// unique: false,
|
|
// index: true,
|
|
// },
|
|
// },
|
|
// token: {
|
|
// iv: {
|
|
// type: String,
|
|
// required: true,
|
|
// unique: false,
|
|
// index: true,
|
|
// },
|
|
// content: {
|
|
// type: String,
|
|
// required: true,
|
|
// unique: false,
|
|
// index: true,
|
|
// },
|
|
// },
|
|
|
|
// Modules
|
|
creditsEnabled Boolean @default(false)
|
|
creditsRate Int @default(1)
|
|
creditsTimeout Int @default(5)
|
|
creditsWorkRate Int @default(25)
|
|
creditsWorkTimeout Int @default(86400)
|
|
creditsMinimumLength Int @default(5)
|
|
|
|
pointsEnabled Boolean @default(false)
|
|
pointsRate Int @default(1)
|
|
pointsTimeout Int @default(5)
|
|
pointsMinimumLength Int @default(5)
|
|
|
|
reputationsEnabled Boolean @default(false)
|
|
|
|
countersEnabled Boolean @default(false)
|
|
counters GuildCounter[]
|
|
}
|
|
|
|
model User {
|
|
id String @unique
|
|
GuildMember GuildMember[]
|
|
|
|
// Settings
|
|
|
|
// Modules
|
|
reputationsEarned Int @default(0)
|
|
}
|
|
|
|
model GuildMember {
|
|
userId String
|
|
guildId String
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
guild Guild @relation(fields: [guildId], references: [id])
|
|
|
|
// Settings
|
|
|
|
// Modules
|
|
creditsEarned Int?
|
|
pointsEarned Int?
|
|
|
|
// Unique Identifier
|
|
@@unique([userId, guildId])
|
|
}
|
|
|
|
model GuildCounter {
|
|
guildId String
|
|
channelId String
|
|
triggerWord String
|
|
count Int @default(0)
|
|
guild Guild @relation(fields: [guildId], references: [id])
|
|
|
|
@@unique([guildId, channelId])
|
|
}
|