Adding the typing... indicator, loading older messages, and managing members/admins after creation.
This commit is contained in:
@@ -212,6 +212,7 @@ model Organization {
|
||||
conversationHiddenMessages ConversationHiddenMessage[]
|
||||
conversationPinnedMessages ConversationPinnedMessage[]
|
||||
conversationRoomUserPins ConversationRoomUserPin[]
|
||||
conversationRoomMembers ConversationRoomMember[]
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -2144,3 +2145,19 @@ model ConversationRoomUserPin {
|
||||
@@unique([organizationId, userId, externalRoomId])
|
||||
@@index([organizationId, userId])
|
||||
}
|
||||
|
||||
/// اعضای گروه/کانال در CRM (نقش ادمین برای ارسال در کانال و مدیریت اعضا)
|
||||
model ConversationRoomMember {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
externalRoomId String
|
||||
userId String
|
||||
/// admin | member
|
||||
role String @default("member")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([organizationId, externalRoomId, userId])
|
||||
@@index([organizationId, externalRoomId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user