mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13:09 +02:00
Add ticket references
This commit is contained in:
parent
e3b6244729
commit
fb076a0c96
@ -162,12 +162,12 @@ model Ticket {
|
|||||||
archivedUsers ArchivedUser[]
|
archivedUsers ArchivedUser[]
|
||||||
category Category @relation(fields: [categoryId], references: [id])
|
category Category @relation(fields: [categoryId], references: [id])
|
||||||
categoryId String @db.VarChar(19)
|
categoryId String @db.VarChar(19)
|
||||||
claimedBy User @relation(name: "ClaimedTickets", fields: [claimedById], references: [id])
|
claimedBy User @relation(name: "TicketsClaimedByUser", fields: [claimedById], references: [id])
|
||||||
claimedById String @db.VarChar(19)
|
claimedById String @db.VarChar(19)
|
||||||
closedBy User @relation(name: "ClosedTickets", fields: [closedById], references: [id])
|
closedBy User @relation(name: "TicketsClosedByUser", fields: [closedById], references: [id])
|
||||||
closedById String @db.VarChar(19)
|
closedById String @db.VarChar(19)
|
||||||
closedReason String?
|
closedReason String?
|
||||||
createdBy User @relation(name: "CreatedTickets", fields: [createdById], references: [id])
|
createdBy User @relation(name: "TicketsCreatedByUser", fields: [createdById], references: [id])
|
||||||
createdById String @db.VarChar(19)
|
createdById String @db.VarChar(19)
|
||||||
firstResponse DateTime?
|
firstResponse DateTime?
|
||||||
guild Guild @relation(fields: [guildId], references: [id])
|
guild Guild @relation(fields: [guildId], references: [id])
|
||||||
@ -178,6 +178,9 @@ model Ticket {
|
|||||||
open Boolean @default(true)
|
open Boolean @default(true)
|
||||||
openingMessage String @db.VarChar(19)
|
openingMessage String @db.VarChar(19)
|
||||||
pinnedMessages Json @default("[]")
|
pinnedMessages Json @default("[]")
|
||||||
|
referencedBy Ticket[] @relation("TicketsReferencedByTicket")
|
||||||
|
references Ticket? @relation(name: "TicketsReferencedByTicket", fields: [referencesId], references: [id])
|
||||||
|
referencesId String? @db.VarChar(19)
|
||||||
topic String?
|
topic String?
|
||||||
|
|
||||||
@@unique([guildId, number])
|
@@unique([guildId, number])
|
||||||
@ -187,9 +190,9 @@ model Ticket {
|
|||||||
model User {
|
model User {
|
||||||
id String @id @unique @db.VarChar(19)
|
id String @id @unique @db.VarChar(19)
|
||||||
// surveyResponses SurveyResponse[]
|
// surveyResponses SurveyResponse[]
|
||||||
ticketsCreated Ticket[] @relation("CreatedTickets")
|
ticketsCreated Ticket[] @relation("TicketsCreatedByUser")
|
||||||
ticketsClosed Ticket[] @relation("ClosedTickets")
|
ticketsClosed Ticket[] @relation("TicketsClosedByUser")
|
||||||
ticketsClaimed Ticket[] @relation("ClaimedTickets")
|
ticketsClaimed Ticket[] @relation("TicketsClaimedByUser")
|
||||||
|
|
||||||
@@map("users")
|
@@map("users")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user