oex2003/evolution-api
0
1// This is your Prisma schema file,2// learn more about it in the docs: https://pris.ly/d/prisma-schema3 4// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?5// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init6 7generator client {8 provider = "prisma-client-js"9}10 11datasource db {12 provider = "mysql"13 url = env("DATABASE_CONNECTION_URI")14}15 16enum InstanceConnectionStatus {17 open18 close19 connecting20}21 22enum DeviceMessage {23 ios24 android25 web26 unknown27 desktop28}29 30enum SessionStatus {31 opened32 closed33 paused34}35 36enum TriggerType {37 all38 keyword39 none40 advanced41}42 43enum TriggerOperator {44 contains45 equals46 startsWith47 endsWith48 regex49}50 51enum OpenaiBotType {52 assistant53 chatCompletion54}55 56enum DifyBotType {57 chatBot58 textGenerator59 agent60 workflow61}62 63model Instance {64 id String @id @default(cuid())65 name String @unique @db.VarChar(255)66 connectionStatus InstanceConnectionStatus @default(open)67 ownerJid String? @db.VarChar(100)68 profileName String? @db.VarChar(100)69 profilePicUrl String? @db.VarChar(500)70 integration String? @db.VarChar(100)71 number String? @db.VarChar(100)72 businessId String? @db.VarChar(100)73 token String? @db.VarChar(255)74 clientName String? @db.VarChar(100)75 disconnectionReasonCode Int? @db.Int76 disconnectionObject Json? @db.Json77 disconnectionAt DateTime? @db.Timestamp78 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp79 updatedAt DateTime? @updatedAt @db.Timestamp80 Chat Chat[]81 Contact Contact[]82 Message Message[]83 Webhook Webhook?84 Chatwoot Chatwoot?85 Label Label[]86 Proxy Proxy?87 Setting Setting?88 Rabbitmq Rabbitmq?89 Nats Nats?90 Sqs Sqs?91 Websocket Websocket?92 Typebot Typebot[]93 Session Session?94 MessageUpdate MessageUpdate[]95 TypebotSetting TypebotSetting?96 Media Media[]97 OpenaiCreds OpenaiCreds[]98 OpenaiBot OpenaiBot[]99 OpenaiSetting OpenaiSetting?100 Template Template[]101 Dify Dify[]102 DifySetting DifySetting?103 IntegrationSession IntegrationSession[]104 EvolutionBot EvolutionBot[]105 EvolutionBotSetting EvolutionBotSetting?106 Flowise Flowise[]107 FlowiseSetting FlowiseSetting?108 Pusher Pusher?109 N8n N8n[]110}111 112model Session {113 id String @id @default(cuid())114 sessionId String @unique115 creds String? @db.Text116 createdAt DateTime @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp117 Instance Instance @relation(fields: [sessionId], references: [id], onDelete: Cascade)118}119 120model Chat {121 id String @id @default(cuid())122 remoteJid String @db.VarChar(100)123 name String? @db.VarChar(100)124 labels Json? @db.Json125 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp126 updatedAt DateTime? @updatedAt @db.Timestamp127 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)128 instanceId String129 unreadMessages Int @default(0)130 131 @@unique([instanceId, remoteJid])132 @@index([instanceId])133 @@index([remoteJid])134}135 136model Contact {137 id String @id @default(cuid())138 remoteJid String @db.VarChar(100)139 pushName String? @db.VarChar(100)140 profilePicUrl String? @db.VarChar(500)141 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp142 updatedAt DateTime? @updatedAt @db.Timestamp143 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)144 instanceId String145 146 @@unique([remoteJid, instanceId])147 @@index([remoteJid])148 @@index([instanceId])149}150 151model Message {152 id String @id @default(cuid())153 key Json @db.Json154 pushName String? @db.VarChar(100)155 participant String? @db.VarChar(100)156 messageType String @db.VarChar(100)157 message Json @db.Json158 contextInfo Json? @db.Json159 source DeviceMessage160 messageTimestamp Int @db.Int161 chatwootMessageId Int? @db.Int162 chatwootInboxId Int? @db.Int163 chatwootConversationId Int? @db.Int164 chatwootContactInboxSourceId String? @db.VarChar(100)165 chatwootIsRead Boolean? @default(false)166 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)167 instanceId String168 typebotSessionId String?169 MessageUpdate MessageUpdate[]170 Media Media?171 webhookUrl String? @db.VarChar(500)172 status String? @db.VarChar(30)173 174 sessionId String?175 session IntegrationSession? @relation(fields: [sessionId], references: [id])176 177 @@index([instanceId])178}179 180model MessageUpdate {181 id String @id @default(cuid())182 keyId String @db.VarChar(100)183 remoteJid String @db.VarChar(100)184 fromMe Boolean185 participant String? @db.VarChar(100)186 pollUpdates Json? @db.Json187 status String @db.VarChar(30)188 Message Message @relation(fields: [messageId], references: [id], onDelete: Cascade)189 messageId String190 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)191 instanceId String192 193 @@index([instanceId])194 @@index([messageId])195}196 197model Webhook {198 id String @id @default(cuid())199 url String @db.VarChar(500)200 headers Json? @db.Json201 enabled Boolean? @default(true)202 events Json? @db.Json203 webhookByEvents Boolean? @default(false)204 webhookBase64 Boolean? @default(false)205 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp206 updatedAt DateTime @updatedAt @db.Timestamp207 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)208 instanceId String @unique209 210 @@index([instanceId])211}212 213model Chatwoot {214 id String @id @default(cuid())215 enabled Boolean? @default(true)216 accountId String? @db.VarChar(100)217 token String? @db.VarChar(100)218 url String? @db.VarChar(500)219 nameInbox String? @db.VarChar(100)220 signMsg Boolean? @default(false)221 signDelimiter String? @db.VarChar(100)222 number String? @db.VarChar(100)223 reopenConversation Boolean? @default(false)224 conversationPending Boolean? @default(false)225 mergeBrazilContacts Boolean? @default(false)226 importContacts Boolean? @default(false)227 importMessages Boolean? @default(false)228 daysLimitImportMessages Int? @db.Int229 organization String? @db.VarChar(100)230 logo String? @db.VarChar(500)231 ignoreJids Json?232 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp233 updatedAt DateTime @updatedAt @db.Timestamp234 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)235 instanceId String @unique236}237 238model Label {239 id String @id @default(cuid())240 labelId String? @db.VarChar(100)241 name String @db.VarChar(100)242 color String @db.VarChar(100)243 predefinedId String? @db.VarChar(100)244 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp245 updatedAt DateTime @updatedAt @db.Timestamp246 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)247 instanceId String248}249 250model Proxy {251 id String @id @default(cuid())252 enabled Boolean @default(false)253 host String @db.VarChar(100)254 port String @db.VarChar(100)255 protocol String @db.VarChar(100)256 username String @db.VarChar(100)257 password String @db.VarChar(100)258 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp259 updatedAt DateTime @updatedAt @db.Timestamp260 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)261 instanceId String @unique262}263 264model Setting {265 id String @id @default(cuid())266 rejectCall Boolean @default(false)267 msgCall String? @db.VarChar(100)268 groupsIgnore Boolean @default(false)269 alwaysOnline Boolean @default(false)270 readMessages Boolean @default(false)271 readStatus Boolean @default(false)272 syncFullHistory Boolean @default(false)273 wavoipToken String? @db.VarChar(100)274 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp275 updatedAt DateTime @updatedAt @db.Timestamp276 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)277 instanceId String @unique278 279 @@index([instanceId])280}281 282model Rabbitmq {283 id String @id @default(cuid())284 enabled Boolean @default(false)285 events Json @db.Json286 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp287 updatedAt DateTime @updatedAt @db.Timestamp288 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)289 instanceId String @unique290}291 292model Nats {293 id String @id @default(cuid())294 enabled Boolean @default(false)295 events Json @db.Json296 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp297 updatedAt DateTime @updatedAt @db.Timestamp298 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)299 instanceId String @unique300}301 302model Sqs {303 id String @id @default(cuid())304 enabled Boolean @default(false)305 events Json @db.Json306 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp307 updatedAt DateTime @updatedAt @db.Timestamp308 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)309 instanceId String @unique310}311 312model Websocket {313 id String @id @default(cuid())314 enabled Boolean @default(false)315 events Json @db.Json316 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp317 updatedAt DateTime @updatedAt @db.Timestamp318 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)319 instanceId String @unique320}321 322model Pusher {323 id String @id @default(cuid())324 enabled Boolean @default(false)325 appId String @db.VarChar(100)326 key String @db.VarChar(100)327 secret String @db.VarChar(100)328 cluster String @db.VarChar(100)329 useTLS Boolean @default(false)330 events Json @db.Json331 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp332 updatedAt DateTime @updatedAt @db.Timestamp333 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)334 instanceId String @unique335}336 337model Typebot {338 id String @id @default(cuid())339 enabled Boolean @default(true)340 description String? @db.VarChar(255)341 url String @db.VarChar(500)342 typebot String @db.VarChar(100)343 expire Int? @default(0) @db.Int344 keywordFinish String? @db.VarChar(100)345 delayMessage Int? @db.Int346 unknownMessage String? @db.VarChar(100)347 listeningFromMe Boolean? @default(false)348 stopBotFromMe Boolean? @default(false)349 keepOpen Boolean? @default(false)350 debounceTime Int? @db.Int351 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp352 updatedAt DateTime? @updatedAt @db.Timestamp353 ignoreJids Json?354 triggerType TriggerType?355 triggerOperator TriggerOperator?356 triggerValue String?357 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)358 instanceId String359 TypebotSetting TypebotSetting[]360}361 362model TypebotSetting {363 id String @id @default(cuid())364 expire Int? @default(0) @db.Int365 keywordFinish String? @db.VarChar(100)366 delayMessage Int? @db.Int367 unknownMessage String? @db.VarChar(100)368 listeningFromMe Boolean? @default(false)369 stopBotFromMe Boolean? @default(false)370 keepOpen Boolean? @default(false)371 debounceTime Int? @db.Int372 typebotIdFallback String? @db.VarChar(100)373 ignoreJids Json?374 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp375 updatedAt DateTime @updatedAt @db.Timestamp376 Fallback Typebot? @relation(fields: [typebotIdFallback], references: [id])377 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)378 instanceId String @unique379}380 381model IntegrationSession {382 id String @id @default(cuid())383 sessionId String @db.VarChar(255)384 remoteJid String @db.VarChar(100)385 pushName String?386 status SessionStatus387 awaitUser Boolean @default(false)388 context Json?389 type String? @db.VarChar(100)390 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp391 updatedAt DateTime @updatedAt @db.Timestamp392 Message Message[]393 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)394 instanceId String395 parameters Json?396 397 botId String?398}399 400model Media {401 id String @id @default(cuid())402 fileName String @db.VarChar(500)403 type String @db.VarChar(100)404 mimetype String @db.VarChar(100)405 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp406 Message Message @relation(fields: [messageId], references: [id], onDelete: Cascade)407 messageId String @unique408 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)409 instanceId String410}411 412model OpenaiCreds {413 id String @id @default(cuid())414 name String? @unique @db.VarChar(255)415 apiKey String? @unique @db.VarChar(255)416 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp417 updatedAt DateTime @updatedAt @db.Timestamp418 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)419 instanceId String420 OpenaiAssistant OpenaiBot[]421 OpenaiSetting OpenaiSetting?422}423 424model OpenaiBot {425 id String @id @default(cuid())426 enabled Boolean @default(true)427 description String? @db.VarChar(255)428 botType OpenaiBotType429 assistantId String? @db.VarChar(255)430 functionUrl String? @db.VarChar(500)431 model String? @db.VarChar(100)432 systemMessages Json? @db.Json433 assistantMessages Json? @db.Json434 userMessages Json? @db.Json435 maxTokens Int? @db.Int436 expire Int? @default(0) @db.Int437 keywordFinish String? @db.VarChar(100)438 delayMessage Int? @db.Int439 unknownMessage String? @db.VarChar(100)440 listeningFromMe Boolean? @default(false)441 stopBotFromMe Boolean? @default(false)442 keepOpen Boolean? @default(false)443 debounceTime Int? @db.Int444 ignoreJids Json?445 splitMessages Boolean? @default(false)446 timePerChar Int? @default(50) @db.Int447 triggerType TriggerType?448 triggerOperator TriggerOperator?449 triggerValue String?450 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp451 updatedAt DateTime @updatedAt @db.Timestamp452 OpenaiCreds OpenaiCreds @relation(fields: [openaiCredsId], references: [id], onDelete: Cascade)453 openaiCredsId String454 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)455 instanceId String456 OpenaiSetting OpenaiSetting[]457}458 459model OpenaiSetting {460 id String @id @default(cuid())461 expire Int? @default(0) @db.Int462 keywordFinish String? @db.VarChar(100)463 delayMessage Int? @db.Int464 unknownMessage String? @db.VarChar(100)465 listeningFromMe Boolean? @default(false)466 stopBotFromMe Boolean? @default(false)467 keepOpen Boolean? @default(false)468 debounceTime Int? @db.Int469 ignoreJids Json?470 splitMessages Boolean? @default(false)471 timePerChar Int? @default(50) @db.Int472 speechToText Boolean? @default(false)473 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp474 updatedAt DateTime @updatedAt @db.Timestamp475 OpenaiCreds OpenaiCreds? @relation(fields: [openaiCredsId], references: [id])476 openaiCredsId String @unique477 Fallback OpenaiBot? @relation(fields: [openaiIdFallback], references: [id])478 openaiIdFallback String? @db.VarChar(100)479 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)480 instanceId String @unique481}482 483model Template {484 id String @id @default(cuid())485 templateId String @unique @db.VarChar(255)486 name String @unique @db.VarChar(255)487 template Json @db.Json488 webhookUrl String? @db.VarChar(500)489 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp490 updatedAt DateTime @updatedAt @db.Timestamp491 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)492 instanceId String493}494 495model Dify {496 id String @id @default(cuid())497 enabled Boolean @default(true)498 description String? @db.VarChar(255)499 botType DifyBotType500 apiUrl String? @db.VarChar(255)501 apiKey String? @db.VarChar(255)502 expire Int? @default(0) @db.Int503 keywordFinish String? @db.VarChar(100)504 delayMessage Int? @db.Int505 unknownMessage String? @db.VarChar(100)506 listeningFromMe Boolean? @default(false)507 stopBotFromMe Boolean? @default(false)508 keepOpen Boolean? @default(false)509 debounceTime Int? @db.Int510 ignoreJids Json?511 splitMessages Boolean? @default(false)512 timePerChar Int? @default(50) @db.Int513 triggerType TriggerType?514 triggerOperator TriggerOperator?515 triggerValue String?516 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp517 updatedAt DateTime @updatedAt @db.Timestamp518 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)519 instanceId String520 DifySetting DifySetting[]521}522 523model DifySetting {524 id String @id @default(cuid())525 expire Int? @default(0) @db.Int526 keywordFinish String? @db.VarChar(100)527 delayMessage Int? @db.Int528 unknownMessage String? @db.VarChar(100)529 listeningFromMe Boolean? @default(false)530 stopBotFromMe Boolean? @default(false)531 keepOpen Boolean? @default(false)532 debounceTime Int? @db.Int533 ignoreJids Json?534 splitMessages Boolean? @default(false)535 timePerChar Int? @default(50) @db.Int536 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp537 updatedAt DateTime @updatedAt @db.Timestamp538 Fallback Dify? @relation(fields: [difyIdFallback], references: [id])539 difyIdFallback String? @db.VarChar(100)540 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)541 instanceId String @unique542}543 544model EvolutionBot {545 id String @id @default(cuid())546 enabled Boolean @default(true)547 description String? @db.VarChar(255)548 apiUrl String? @db.VarChar(255)549 apiKey String? @db.VarChar(255)550 expire Int? @default(0) @db.Int551 keywordFinish String? @db.VarChar(100)552 delayMessage Int? @db.Int553 unknownMessage String? @db.VarChar(100)554 listeningFromMe Boolean? @default(false)555 stopBotFromMe Boolean? @default(false)556 keepOpen Boolean? @default(false)557 debounceTime Int? @db.Int558 ignoreJids Json?559 splitMessages Boolean? @default(false)560 timePerChar Int? @default(50) @db.Int561 triggerType TriggerType?562 triggerOperator TriggerOperator?563 triggerValue String?564 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp565 updatedAt DateTime @updatedAt @db.Timestamp566 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)567 instanceId String568 EvolutionBotSetting EvolutionBotSetting[]569}570 571model EvolutionBotSetting {572 id String @id @default(cuid())573 expire Int? @default(0) @db.Int574 keywordFinish String? @db.VarChar(100)575 delayMessage Int? @db.Int576 unknownMessage String? @db.VarChar(100)577 listeningFromMe Boolean? @default(false)578 stopBotFromMe Boolean? @default(false)579 keepOpen Boolean? @default(false)580 debounceTime Int? @db.Int581 ignoreJids Json?582 splitMessages Boolean? @default(false)583 timePerChar Int? @default(50) @db.Int584 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp585 updatedAt DateTime @updatedAt @db.Timestamp586 Fallback EvolutionBot? @relation(fields: [botIdFallback], references: [id])587 botIdFallback String? @db.VarChar(100)588 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)589 instanceId String @unique590}591 592model Flowise {593 id String @id @default(cuid())594 enabled Boolean @default(true)595 description String? @db.VarChar(255)596 apiUrl String? @db.VarChar(255)597 apiKey String? @db.VarChar(255)598 expire Int? @default(0) @db.Int599 keywordFinish String? @db.VarChar(100)600 delayMessage Int? @db.Int601 unknownMessage String? @db.VarChar(100)602 listeningFromMe Boolean? @default(false)603 stopBotFromMe Boolean? @default(false)604 keepOpen Boolean? @default(false)605 debounceTime Int? @db.Int606 ignoreJids Json?607 splitMessages Boolean? @default(false)608 timePerChar Int? @default(50) @db.Int609 triggerType TriggerType?610 triggerOperator TriggerOperator?611 triggerValue String?612 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp613 updatedAt DateTime @updatedAt @db.Timestamp614 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)615 instanceId String616 FlowiseSetting FlowiseSetting[]617}618 619model FlowiseSetting {620 id String @id @default(cuid())621 expire Int? @default(0) @db.Int622 keywordFinish String? @db.VarChar(100)623 delayMessage Int? @db.Int624 unknownMessage String? @db.VarChar(100)625 listeningFromMe Boolean? @default(false)626 stopBotFromMe Boolean? @default(false)627 keepOpen Boolean? @default(false)628 debounceTime Int? @db.Int629 ignoreJids Json?630 splitMessages Boolean? @default(false)631 timePerChar Int? @default(50) @db.Int632 createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp633 updatedAt DateTime @updatedAt @db.Timestamp634 Fallback Flowise? @relation(fields: [flowiseIdFallback], references: [id])635 flowiseIdFallback String? @db.VarChar(100)636 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)637 instanceId String @unique638}639 640model IsOnWhatsapp {641 id String @id @default(cuid())642 remoteJid String @unique @db.VarChar(100)643 jidOptions String644 createdAt DateTime @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp645 updatedAt DateTime @updatedAt @db.Timestamp646}647 648model N8n {649 id String @id @default(cuid())650 enabled Boolean @default(true) @db.Boolean651 description String? @db.VarChar(255)652 webhookUrl String? @db.VarChar(255)653 basicAuthUser String? @db.VarChar(255)654 basicAuthPass String? @db.VarChar(255)655 expire Int? @default(0) @db.Int656 keywordFinish String? @db.VarChar(100)657 delayMessage Int? @db.Integer658 unknownMessage String? @db.VarChar(100)659 listeningFromMe Boolean? @default(false)660 stopBotFromMe Boolean? @default(false)661 keepOpen Boolean? @default(false)662 debounceTime Int? @db.Integer663 ignoreJids Json?664 splitMessages Boolean? @default(false)665 timePerChar Int? @default(50) @db.Integer666 triggerType TriggerType?667 triggerOperator TriggerOperator?668 triggerValue String?669 createdAt DateTime? @default(now()) @db.Timestamp670 updatedAt DateTime @updatedAt @db.Timestamp671 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)672 instanceId String673 N8nSetting N8nSetting[]674}675 676model N8nSetting {677 id String @id @default(cuid())678 expire Int? @default(0) @db.Int679 keywordFinish String? @db.VarChar(100)680 delayMessage Int? @db.Integer681 unknownMessage String? @db.VarChar(100)682 listeningFromMe Boolean? @default(false)683 stopBotFromMe Boolean? @default(false)684 keepOpen Boolean? @default(false)685 debounceTime Int? @db.Integer686 ignoreJids Json?687 splitMessages Boolean? @default(false)688 timePerChar Int? @default(50) @db.Integer689 createdAt DateTime? @default(now()) @db.Timestamp690 updatedAt DateTime @updatedAt @db.Timestamp691 Fallback N8n? @relation(fields: [n8nIdFallback], references: [id])692 n8nIdFallback String? @db.VarChar(100)693 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)694 instanceId String @unique695}696 697model Evoai {698 id String @id @default(cuid())699 enabled Boolean @default(true) @db.Boolean700 description String? @db.VarChar(255)701 agentUrl String? @db.VarChar(255)702 apiKey String? @db.VarChar(255)703 expire Int? @default(0) @db.Int704 keywordFinish String? @db.VarChar(100)705 delayMessage Int? @db.Integer706 unknownMessage String? @db.VarChar(100)707 listeningFromMe Boolean? @default(false)708 stopBotFromMe Boolean? @default(false)709 keepOpen Boolean? @default(false)710 debounceTime Int? @db.Integer711 ignoreJids Json?712 splitMessages Boolean? @default(false)713 timePerChar Int? @default(50) @db.Integer714 triggerType TriggerType?715 triggerOperator TriggerOperator?716 triggerValue String?717 createdAt DateTime? @default(now()) @db.Timestamp718 updatedAt DateTime @updatedAt @db.Timestamp719 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)720 instanceId String721 EvoaiSetting EvoaiSetting[]722}723 724model EvoaiSetting {725 id String @id @default(cuid())726 expire Int? @default(0) @db.Int727 keywordFinish String? @db.VarChar(100)728 delayMessage Int? @db.Integer729 unknownMessage String? @db.VarChar(100)730 listeningFromMe Boolean? @default(false)731 stopBotFromMe Boolean? @default(false)732 keepOpen Boolean? @default(false)733 debounceTime Int? @db.Integer734 ignoreJids Json?735 splitMessages Boolean? @default(false)736 timePerChar Int? @default(50) @db.Integer737 createdAt DateTime? @default(now()) @db.Timestamp738 updatedAt DateTime @updatedAt @db.Timestamp739 Fallback Evoai? @relation(fields: [evoaiIdFallback], references: [id])740 evoaiIdFallback String? @db.VarChar(100)741 Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)742 instanceId String @unique743}744 