You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
902 B
Plaintext
40 lines
902 B
Plaintext
// 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 = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model GuildConfig {
|
|
id String @id
|
|
welcome_message String @default("Hello %USER%!")
|
|
welcome_channel String?
|
|
welcome_on Boolean @default(false)
|
|
users User[]
|
|
dailymessages DailyMessage[]
|
|
}
|
|
|
|
model DailyMessage {
|
|
id Int @id @default(autoincrement())
|
|
text String
|
|
guild GuildConfig @relation(fields: [guild_id], references: [id])
|
|
guild_id String
|
|
hour Int
|
|
minute Int
|
|
channel String
|
|
}
|
|
|
|
model User {
|
|
id String
|
|
guild GuildConfig @relation(fields: [guild_id], references: [id])
|
|
guild_id String
|
|
messages Int @default(0)
|
|
|
|
@@id([id, guild_id])
|
|
}
|