prima orm: instance controller ok

This commit is contained in:
Davidson Gomes
2024-06-06 16:14:22 -03:00
parent b309d686ec
commit 99c8cc0242
9 changed files with 50 additions and 129 deletions

View File

@@ -56,6 +56,8 @@ model Instance {
Websocket Websocket?
Typebot Typebot?
Session Session?
MessageUpdate MessageUpdate[]
TypebotSession TypebotSession[]
}
model Session {
@@ -130,6 +132,8 @@ model MessageUpdate {
status String @db.VarChar(30)
Message Message @relation(fields: [messageId], references: [id], onDelete: Cascade)
messageId Int
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
instanceId String
}
model Webhook {
@@ -277,4 +281,6 @@ model TypebotSession {
Typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
typebotId Int
Message Message[]
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
instanceId String
}