Fixed message deletion error and layout changes for the message input box.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "ConversationHiddenMessage" ADD COLUMN "scope" TEXT NOT NULL DEFAULT 'all';
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "ConversationHiddenMessage_organizationId_externalRoomId_messageId_key";
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ConversationHiddenMessage_organizationId_externalRoomId_messageId_scope_hiddenByUserId_key" ON "ConversationHiddenMessage"("organizationId", "externalRoomId", "messageId", "scope", "hiddenByUserId");
|
||||
@@ -2097,7 +2097,8 @@ model ConversationRoom {
|
||||
@@index([organizationId, kind])
|
||||
}
|
||||
|
||||
/// پیامهای حذفشده برای همه در CRM (سرویس چت خارجی حذف پایدار ندارد)
|
||||
/// پیامهای حذفشده در CRM (سرویس چت خارجی حذف پایدار ندارد)
|
||||
/// scope=all → برای همه؛ scope=self → فقط برای hiddenByUserId
|
||||
model ConversationHiddenMessage {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
@@ -2105,8 +2106,10 @@ model ConversationHiddenMessage {
|
||||
externalRoomId String
|
||||
messageId String
|
||||
hiddenByUserId String
|
||||
/// all = حذف برای همه | self = حذف فقط برای کاربر
|
||||
scope String @default("all")
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([organizationId, externalRoomId, messageId])
|
||||
@@unique([organizationId, externalRoomId, messageId, scope, hiddenByUserId])
|
||||
@@index([organizationId, externalRoomId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user