mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Update Category model
- Add description and emoji - Make survey properties nullable
This commit is contained in:
parent
7c3b15d6bd
commit
08e6841fd4
@ -65,6 +65,8 @@ model ArchivedUser {
|
|||||||
model Category {
|
model Category {
|
||||||
channelName String @default("ticket-{num}")
|
channelName String @default("ticket-{num}")
|
||||||
claiming Boolean @default(false)
|
claiming Boolean @default(false)
|
||||||
|
description String
|
||||||
|
emoji String
|
||||||
guild Guild @relation(fields: [guildId], references: [id])
|
guild Guild @relation(fields: [guildId], references: [id])
|
||||||
guildId String @db.VarChar(19)
|
guildId String @db.VarChar(19)
|
||||||
id String @id @unique @db.VarChar(19)
|
id String @id @unique @db.VarChar(19)
|
||||||
@ -77,76 +79,27 @@ model Category {
|
|||||||
roles Json
|
roles Json
|
||||||
tickets Ticket[]
|
tickets Ticket[]
|
||||||
totalLimit Int @default(-1)
|
totalLimit Int @default(-1)
|
||||||
// survey Survey @relation(fields: [guildId, surveyName], references: [guildId, name])
|
surveyDescription String?
|
||||||
// surveyName String
|
surveyLink String?
|
||||||
surveyDescription String
|
surveyTitle String?
|
||||||
surveyLink String
|
|
||||||
surveyTitle String
|
|
||||||
|
|
||||||
@@map("categories")
|
@@map("categories")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Guild {
|
model Guild {
|
||||||
archive Boolean @default(true)
|
archive Boolean @default(true)
|
||||||
|
blocklist Json
|
||||||
categories Category[]
|
categories Category[]
|
||||||
errorColour String @default("RED")
|
errorColour String @default("RED")
|
||||||
id String @id @unique @db.VarChar(19)
|
id String @id @unique @db.VarChar(19)
|
||||||
primaryColour String @default("#009999")
|
primaryColour String @default("#009999")
|
||||||
successColour String @default("GREEN")
|
successColour String @default("GREEN")
|
||||||
// surveys Survey[]
|
|
||||||
tags Tag[]
|
tags Tag[]
|
||||||
tickets Ticket[]
|
tickets Ticket[]
|
||||||
|
|
||||||
@@map("guilds")
|
@@map("guilds")
|
||||||
}
|
}
|
||||||
|
|
||||||
// model Survey {
|
|
||||||
// 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])
|
|
||||||
// @@map("surveys")
|
|
||||||
// }
|
|
||||||
|
|
||||||
// model SurveyResponse {
|
|
||||||
// answers SurveyQuestionAnswer[]
|
|
||||||
// id Int @id @default(autoincrement())
|
|
||||||
// survey Survey @relation(fields: [surveyGuildId, surveyName], references: [guildId, name])
|
|
||||||
// surveyGuildId String @db.VarChar(19)
|
|
||||||
// surveyName String
|
|
||||||
// user User @relation(fields: [userId], references: [id])
|
|
||||||
// userId String @db.VarChar(19)
|
|
||||||
|
|
||||||
// @@map("survey_responses")
|
|
||||||
// }
|
|
||||||
|
|
||||||
// model SurveyQuestion {
|
|
||||||
// answers SurveyQuestionAnswer[]
|
|
||||||
// content String @db.Text
|
|
||||||
// id Int @id @default(autoincrement())
|
|
||||||
// survey Survey @relation(fields: [surveyGuildId, surveyName], references: [guildId, name])
|
|
||||||
// surveyGuildId String @db.VarChar(19)
|
|
||||||
// surveyName String
|
|
||||||
|
|
||||||
// @@map("survey_questions")
|
|
||||||
// }
|
|
||||||
|
|
||||||
// model SurveyQuestionAnswer {
|
|
||||||
// content String @db.Text
|
|
||||||
// id Int @id @default(autoincrement())
|
|
||||||
// surveyResponse SurveyResponse @relation(fields: [surveyResponseId], references: [id])
|
|
||||||
// surveyResponseId Int
|
|
||||||
// question SurveyQuestion @relation(fields: [questionId], references: [id])
|
|
||||||
// questionId Int
|
|
||||||
|
|
||||||
// @@map("survey_answers")
|
|
||||||
// }
|
|
||||||
|
|
||||||
model Tag {
|
model Tag {
|
||||||
content Json
|
content Json
|
||||||
guild Guild @relation(fields: [guildId], references: [id])
|
guild Guild @relation(fields: [guildId], references: [id])
|
||||||
@ -192,7 +145,6 @@ model Ticket {
|
|||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @unique @db.VarChar(19)
|
id String @id @unique @db.VarChar(19)
|
||||||
// surveyResponses SurveyResponse[]
|
|
||||||
ticketsCreated Ticket[] @relation("TicketsCreatedByUser")
|
ticketsCreated Ticket[] @relation("TicketsCreatedByUser")
|
||||||
ticketsClosed Ticket[] @relation("TicketsClosedByUser")
|
ticketsClosed Ticket[] @relation("TicketsClosedByUser")
|
||||||
ticketsClaimed Ticket[] @relation("TicketsClaimedByUser")
|
ticketsClaimed Ticket[] @relation("TicketsClaimedByUser")
|
||||||
|
Loading…
Reference in New Issue
Block a user