mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Add feedback
This commit is contained in:
parent
aa0a265dbf
commit
d1bab9799d
@ -73,6 +73,8 @@ model Category {
|
|||||||
description String
|
description String
|
||||||
discordCategory String @db.VarChar(19)
|
discordCategory String @db.VarChar(19)
|
||||||
emoji String
|
emoji String
|
||||||
|
enableFeedback Boolean @default(false)
|
||||||
|
feedback Feedback[]
|
||||||
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 Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
@ -91,6 +93,19 @@ model Category {
|
|||||||
@@map("categories")
|
@@map("categories")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Feedback {
|
||||||
|
category Category? @relation(fields: [categoryId], references: [id])
|
||||||
|
categoryId Int?
|
||||||
|
comment String? @db.VarChar(4000)
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
rating Int
|
||||||
|
ticket Ticket @relation(fields: [ticketId], references: [id])
|
||||||
|
ticketId String @unique @db.VarChar(19)
|
||||||
|
user User? @relation(fields: [userId], references: [id])
|
||||||
|
userId String? @db.VarChar(19)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
model Guild {
|
model Guild {
|
||||||
archive Boolean @default(true)
|
archive Boolean @default(true)
|
||||||
blocklist Json
|
blocklist Json
|
||||||
@ -164,6 +179,8 @@ model Ticket {
|
|||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
createdBy User @relation(name: "TicketsCreatedByUser", fields: [createdById], references: [id])
|
createdBy User @relation(name: "TicketsCreatedByUser", fields: [createdById], references: [id])
|
||||||
createdById String @db.VarChar(19)
|
createdById String @db.VarChar(19)
|
||||||
|
feedback Feedback?
|
||||||
|
feedbackId Int?
|
||||||
firstResponseAt DateTime?
|
firstResponseAt DateTime?
|
||||||
deleted Boolean @default(false)
|
deleted Boolean @default(false)
|
||||||
guild Guild @relation(fields: [guildId], references: [id])
|
guild Guild @relation(fields: [guildId], references: [id])
|
||||||
@ -189,6 +206,7 @@ model Ticket {
|
|||||||
|
|
||||||
model User {
|
model User {
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
feedback Feedback[]
|
||||||
id String @id @db.VarChar(19)
|
id String @id @db.VarChar(19)
|
||||||
messageCount Int @default(0)
|
messageCount Int @default(0)
|
||||||
ticketsCreated Ticket[] @relation("TicketsCreatedByUser")
|
ticketsCreated Ticket[] @relation("TicketsCreatedByUser")
|
||||||
|
Loading…
Reference in New Issue
Block a user