Fixing the issue with complete deletion from the database
This commit is contained in:
@@ -209,6 +209,7 @@ model Organization {
|
||||
leadImportJobs LeadImportJob[]
|
||||
conversationSettings ConversationSettings?
|
||||
conversationRooms ConversationRoom[]
|
||||
conversationHiddenMessages ConversationHiddenMessage[]
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -2095,3 +2096,17 @@ model ConversationRoom {
|
||||
@@unique([organizationId, dmUserMinId, dmUserMaxId])
|
||||
@@index([organizationId, kind])
|
||||
}
|
||||
|
||||
/// پیامهای حذفشده برای همه در CRM (سرویس چت خارجی حذف پایدار ندارد)
|
||||
model ConversationHiddenMessage {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
externalRoomId String
|
||||
messageId String
|
||||
hiddenByUserId String
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([organizationId, externalRoomId, messageId])
|
||||
@@index([organizationId, externalRoomId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user