update
This commit is contained in:
@@ -408,6 +408,7 @@ model ChatRoom {
|
||||
group FamilyGroup @relation(fields: [groupId], references: [id], onDelete: Cascade)
|
||||
members ChatRoomMember[]
|
||||
messages ChatMessage[]
|
||||
botChats BotChat[]
|
||||
|
||||
@@index([groupId, type])
|
||||
@@index([groupId, type, peerUserId])
|
||||
@@ -571,19 +572,23 @@ model BotChat {
|
||||
id String @id @default(uuid())
|
||||
botId String
|
||||
recipientUserId String?
|
||||
roomId String?
|
||||
telegramChatId BigInt
|
||||
chatType String @default("private")
|
||||
nextInboundMessageId Int @default(1)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
|
||||
room ChatRoom? @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
messages BotMessage[]
|
||||
inboundMessages BotInboundMessage[]
|
||||
menuButton ChatMenuButton?
|
||||
|
||||
@@unique([botId, recipientUserId])
|
||||
@@unique([botId, roomId])
|
||||
@@unique([botId, telegramChatId])
|
||||
@@index([botId])
|
||||
@@index([roomId])
|
||||
}
|
||||
|
||||
model ChatMenuButton {
|
||||
|
||||
Reference in New Issue
Block a user