Fix survey models

This commit is contained in:
Isaac 2022-03-23 16:06:22 +00:00
parent 73fb4e9ef1
commit 5730e60663

View File

@ -116,6 +116,8 @@ model SurveyResponse {
survey Survey @relation(fields: [surveyGuildId, surveyName], references: [guildId, name]) survey Survey @relation(fields: [surveyGuildId, surveyName], references: [guildId, name])
surveyGuildId String @db.VarChar(19) surveyGuildId String @db.VarChar(19)
surveyName String surveyName String
user User @relation(fields: [userId], references: [id])
userId String @db.VarChar(19)
@@map("survey_responses") @@map("survey_responses")
} }
@ -180,10 +182,11 @@ model Ticket {
} }
model User { model User {
id String @id @unique @db.VarChar(19) id String @id @unique @db.VarChar(19)
ticketsCreated Ticket[] @relation("CreatedTickets") surveyResponses SurveyResponse[]
ticketsClosed Ticket[] @relation("ClosedTickets") ticketsCreated Ticket[] @relation("CreatedTickets")
ticketsClaimed Ticket[] @relation("ClaimedTickets") ticketsClosed Ticket[] @relation("ClosedTickets")
ticketsClaimed Ticket[] @relation("ClaimedTickets")
@@map("users") @@map("users")
} }