Add category fields

This commit is contained in:
Isaac 2022-03-22 23:38:35 +00:00
parent fbabf25f07
commit 73fb4e9ef1

View File

@ -63,10 +63,22 @@ model ArchivedUser {
}
model Category {
guild Guild @relation(fields: [guildId], references: [id])
guildId String @db.VarChar(19)
id String @id @unique @db.VarChar(19)
tickets Ticket[]
channelName String @default("ticket-{num}")
claiming Boolean @default(false)
guild Guild @relation(fields: [guildId], references: [id])
guildId String @db.VarChar(19)
id String @id @unique @db.VarChar(19)
image String?
memberLimit Int @default(1)
name String
openingMessage String @db.Text
ping Json @default("[]")
requireTopic Boolean @default(false)
roles Json
tickets Ticket[]
totalLimit Int @default(-1)
survey Survey @relation(fields: [guildId, surveyName], references: [guildId, name])
surveyName String
@@map("categories")
}
@ -86,11 +98,12 @@ model Guild {
}
model Survey {
guild Guild @relation(fields: [guildId], references: [id])
guildId String @db.VarChar(19)
name String
questions SurveyQuestion[]
responses SurveyResponse[]
categories Category[]
guild Guild @relation(fields: [guildId], references: [id])
guildId String @db.VarChar(19)
name String
questions SurveyQuestion[]
responses SurveyResponse[]
@@id([guildId, name])
@@unique([guildId, name])