Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / mysqldb / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x593b=['../api/mailMessage/mailMessage.model','MailApplication','../api/mailApplication/mailApplication.model','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','../api/faxApplication/faxApplication.model','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','FaxQueue','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','../api/smsApplication/smsApplication.model','SmsInteraction','../api/smsInteraction/smsInteraction.model','../api/smsMessage/smsMessage.model','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','../api/openchannelApplication/openchannelApplication.model','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmCompany/cmCompany.model','CmContact','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','../api/sound/sound.model','Tag','../api/tag/tag.model','ContactItemType','../api/contactItemType/contactItemType.model','../api/cmContactHasItem/cmContactHasItem.model','CmHopperAdditionalPhone','../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model','Template','../api/template/template.model','../api/trigger/trigger.model','Variable','../api/variable/variable.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','../api/analyticDefaultReport/analyticDefaultReport.model','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','../api/intDeskAccount/intDeskAccount.model','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','../api/intServicenowConfiguration/intServicenowConfiguration.model','../api/intServicenowField/intServicenowField.model','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','../api/intFreshsalesField/intFreshsalesField.model','Integration','../api/integration/integration.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','SquareRecording','../api/squareRecording/squareRecording.model','../api/squareMessage/squareMessage.model','Team','License','../api/license/license.model','Campaign','Migration','Attachment','../api/attachment/attachment.model','../api/plugin/plugin.model','MailTransferReport','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','UserProfile','../api/userProfile/userProfile.model','UserProfileResource','../api/userNotification/userNotification.model','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','TeamVoiceQueue','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','../api/userVoicePrefix/userVoicePrefix.model','UserSetting','../api/user-setting/user-setting.model','User','cascade','UserId','userSetting','hasMany','Recordings','VoiceQueuesRt','Extensions','HopperFinals','HopperHistory','ReportAgentPreview','OpenchannelInteraction','OpenchannelInteractions','ChatInteractions','SmsInteractions','MailInteractions','WhatsappInteractions','UserNotification','UserNotifications','SenderId','belongsTo','userProfileId','Groups','chat_group_has_users','Contacts','cm_user_has_contacts','Lists','cm_user_has_lists','user_has_teams','belongsToMany','user_has_mail_interactions','user_has_chat_interactions','FaxInteractions','user_has_sms_interactions','user_has_whatsapp_interactions','VoiceQueue','VoiceQueues','UserVoiceQueue','VoicePrefix','VoicePrefixes','UserMailQueue','UserFaxQueue','SmsQueue','SmsQueues','OpenchannelQueues','WhatsappQueues','ChatWebsite','ChatWebsites','FaxAccounts','user_has_fax_accounts','MailAccounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','user_has_whatsapp_accounts','SquareProjects','user_has_square_projects','SpiedAgents','VoiceContext','Applications','Sound','Sounds','Members','VoiceQueueId','CmHopper','Hoppers','HopperHistories','HopperBlacks','JscriptySessionReport','JscriptySessions','Trunk','TrunkId','TrunkBackup','TrunkBackupId','Interval','IntervalId','Pause','mandatoryDispositionPause','voice_queues_has_cm_lists','Agents','Teams','BlackLists','ScreenRecording','VoiceMailMessage','Messages','mailbox','mailboxuser','AgentReports','Contact','ContactId','MailAccountId','restrict','MailServerOut','CloudProviderId','Imap','hasOne','Smtp','Dispositions','Answers','MailMessage','Interactions','List','TemplateId','mandatoryDispositionPauseId','user_has_mail_accounts','team_has_mail_queues','Account','Owner','Tags','mail_interaction_has_tags','ThroughTags','Users','MailInteractionId','Interaction','ChatWebsiteId','ChatOfflineMessageId','TagId','MailQueueReport','DashboardItem','Items','FaxAccountId','Exntensions','FaxApplication','FaxInteractionId','fax_interaction_has_tags','user_has_fax_interactions','SmsAccountId','SmsMessage','ListId','SmsApplication','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelApplication','OpenchannelQueueId','openchannel_interaction_has_tags','user_has_openchannel_interactions','OpenchannelInteractionId','team_has_openchannel_queues','ProactiveActions','Agent','Queue','ChatInteractionId','chat_interaction_has_tags','AttachmentId','Attachments','team_has_chat_queues','ChatGroupId','CompanyId','CmContactHasItem','Phones','CmContactId','Company','cm_contact_has_tags','AdditionalPhones','CmHopperId','CampaignId','OwnerId','AutomationAllId','Any','OneAny','AutomationAnyId','Actions','AutomationId','ParentId','Intervals','MailApplications','FaxApplications','AnalyticDefaultReport','DefaultReportId','CustomReportId','Mohs','moh_has_sounds','whatsapp_interaction_has_tags','ItemType','ItemTypeId','Hopper','Trigger','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','Fields','AnalyticMetric','MetricId','Configurations','AccountId','SubjectId','Descriptions','DescriptionId','FieldId','Subject','Description','Field','SugarcrmConfiguration','Subjects','VariableId','DeskAccount','DeskConfiguration','DeskField','int_desk_configuration_has_tags','ZohoConfiguration','ZendeskConfiguration','int_zendesk_configuration_has_tags','FreshdeskConfiguration','int_freshdesk_configuration_has_tags','VtigerConfiguration','ServicenowConfiguration','ServicenowField','Dynamics365Account','FreshsalesConfiguration','FreshsalesField','FromId','SessionId','ProjectId','MailQueues','team_has_fax_queues','FaxQueues','SquareProjectId','campaigns_has_cm_lists','FromUserId','FromAgent','ToUserId','ToAgent','ToMailAccountId','ToAccount','FromChatWebsiteId','FromAccount','ToChatQueueId','ToQueue','ToChatWebsiteId','ToFaxQueueId','ToFaxAccountId','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','Queues','UserProfileSection','Resources','sectionId','WhatsappAccountId','WhatsappMessage','WhatsappInteractionId','FromWhatsappAccountId','ToWhatsappAccountId','ToQueueId','WhatsappQueueId','exports','../config/environment','lodash','jstz','determine','sequelize','defaultsDeep','motion2','xcall','xC@LL1234','127.0.0.1','mysql','name','utf8','utf8_general_ci','sequelizeHistory','utf8mb4','database','password','options','username','import','VoiceChanSpy','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','../api/trunk/trunk.model','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserChatQueue','../api/userChatQueue/userChatQueue.model','../api/userMailQueue/userMailQueue.model','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerIn/mailServerIn.model','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailInteraction/mailInteraction.model'];(function(_0x963c77,_0x3d7802){var _0x5490db=function(_0x45b08d){while(--_0x45b08d){_0x963c77['push'](_0x963c77['shift']());}};_0x5490db(++_0x3d7802);}(_0x593b,0x1cf));var _0xb593=function(_0x109461,_0x2690dc){_0x109461=_0x109461-0x0;var _0x414c0c=_0x593b[_0x109461];return _0x414c0c;};'use strict';var config=require(_0xb593('0x0'));var Sequelize=require('sequelize');var _=require(_0xb593('0x1'));var jstz=require(_0xb593('0x2'));var timezone=jstz[_0xb593('0x3')]();config[_0xb593('0x4')]=_[_0xb593('0x5')](config[_0xb593('0x4')],{'database':_0xb593('0x6'),'username':_0xb593('0x7'),'password':_0xb593('0x8'),'options':{'host':_0xb593('0x9'),'port':0xcea,'dialect':_0xb593('0xa'),'dialectOptions':{'charset':'utf8mb4'},'logging':![],'timezone':timezone[_0xb593('0xb')](),'define':{'charset':_0xb593('0xc'),'collate':_0xb593('0xd')}}});config[_0xb593('0xe')]=_[_0xb593('0x5')](config['sequelizeHistory'],{'database':_0xb593('0x6'),'username':_0xb593('0x7'),'password':'xC@LL1234','options':{'host':_0xb593('0x9'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0xb593('0xf')},'logging':![],'timezone':timezone[_0xb593('0xb')](),'define':{'charset':_0xb593('0xc'),'collate':_0xb593('0xd')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xb593('0x4')][_0xb593('0x10')],config[_0xb593('0x4')]['username'],config[_0xb593('0x4')][_0xb593('0x11')],config[_0xb593('0x4')][_0xb593('0x12')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xb593('0xe')][_0xb593('0x10')],config[_0xb593('0xe')][_0xb593('0x13')],config['sequelizeHistory'][_0xb593('0x11')],config[_0xb593('0xe')]['options'])};db['User']=db[_0xb593('0x4')][_0xb593('0x14')]('../api/user/user.model');db[_0xb593('0x15')]=db[_0xb593('0x4')]['import']('../api/voiceChanSpy/voiceChanSpy.model');db['VoiceContext']=db[_0xb593('0x4')]['import']('../api/voiceContext/voiceContext.model');db[_0xb593('0x16')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x17'));db[_0xb593('0x18')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x19'));db['VoiceQueue']=db[_0xb593('0x4')][_0xb593('0x14')]('../api/voiceQueue/voiceQueue.model');db[_0xb593('0x1a')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x1b'));db['ScreenRecording']=db['sequelize'][_0xb593('0x14')]('../api/screenRecording/screenRecording.model');db[_0xb593('0x1c')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x1d'));db['VoiceMailMessage']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x1e'));db[_0xb593('0x1f')]=db[_0xb593('0x4')]['import'](_0xb593('0x20'));db[_0xb593('0x21')]=db[_0xb593('0x4')]['import'](_0xb593('0x22'));db[_0xb593('0x23')]=db['sequelize']['import'](_0xb593('0x24'));db[_0xb593('0x25')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x26'));db[_0xb593('0x27')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x28'));db['Trunk']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x29'));db['VoiceTransferReport']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x2a'));db[_0xb593('0x2b')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x2c'));db['UserVoiceQueue']=db[_0xb593('0x4')]['import']('../api/userVoiceQueue/userVoiceQueue.model');db[_0xb593('0x2d')]=db[_0xb593('0x4')]['import'](_0xb593('0x2e'));db['UserMailQueue']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x2f'));db['UserFaxQueue']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x30'));db[_0xb593('0x31')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x32'));db[_0xb593('0x33')]=db[_0xb593('0x4')]['import'](_0xb593('0x34'));db[_0xb593('0x35')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x36'));db[_0xb593('0x37')]=db[_0xb593('0x4')]['import'](_0xb593('0x38'));db['MailServerOut']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x39'));db[_0xb593('0x3a')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x3b'));db[_0xb593('0x3c')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/mailQueue/mailQueue.model');db[_0xb593('0x3d')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x3e'));db[_0xb593('0x3f')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x40'));db['MailMessage']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x41'));db[_0xb593('0x42')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x43'));db['MailQueueReport']=db['sequelize'][_0xb593('0x14')](_0xb593('0x44'));db[_0xb593('0x45')]=db[_0xb593('0x4')]['import']('../api/dashboard/dashboard.model');db['DashboardItem']=db['sequelize']['import'](_0xb593('0x46'));db[_0xb593('0x47')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x48'));db['FaxApplication']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x49'));db[_0xb593('0x4a')]=db[_0xb593('0x4')]['import'](_0xb593('0x4b'));db[_0xb593('0x4c')]=db[_0xb593('0x4')]['import']('../api/faxMessage/faxMessage.model');db[_0xb593('0x4d')]=db['sequelize'][_0xb593('0x14')]('../api/faxQueue/faxQueue.model');db[_0xb593('0x4e')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x4f'));db[_0xb593('0x50')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x51'));db['SmsApplication']=db['sequelize'][_0xb593('0x14')](_0xb593('0x52'));db[_0xb593('0x53')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x54'));db['SmsMessage']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x55'));db['SmsQueue']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x56'));db[_0xb593('0x57')]=db[_0xb593('0x4')]['import'](_0xb593('0x58'));db['OpenchannelApplication']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x59'));db['OpenchannelInteraction']=db[_0xb593('0x4')]['import'](_0xb593('0x5a'));db[_0xb593('0x5b')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x5c'));db[_0xb593('0x5d')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x5e'));db['ChatWebsite']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x5f'));db[_0xb593('0x60')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x61'));db[_0xb593('0x62')]=db[_0xb593('0x4')]['import'](_0xb593('0x63'));db[_0xb593('0x64')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x65'));db[_0xb593('0x66')]=db[_0xb593('0x4')]['import'](_0xb593('0x67'));db[_0xb593('0x68')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x69'));db[_0xb593('0x6a')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x6b'));db[_0xb593('0x6c')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x6d'));db[_0xb593('0x6e')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x6f'));db[_0xb593('0x70')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x71'));db[_0xb593('0x72')]=db['sequelize'][_0xb593('0x14')]('../api/cmContact/cmContact.model');db['CmHopper']=db['sequelize'][_0xb593('0x14')]('../api/cmHopper/cmHopper.model');db[_0xb593('0x73')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x74'));db[_0xb593('0x75')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x76'));db[_0xb593('0x77')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x78'));db['ReportAgentPreview']=db['sequelize'][_0xb593('0x14')](_0xb593('0x79'));db[_0xb593('0x7a')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x7b'));db[_0xb593('0x7c')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x7d'));db[_0xb593('0x7e')]=db['sequelize'][_0xb593('0x14')]('../api/automation/automation.model');db[_0xb593('0x7f')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x80'));db[_0xb593('0x81')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x82'));db[_0xb593('0x83')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x84'));db['Interval']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x85'));db['Pause']=db[_0xb593('0x4')]['import'](_0xb593('0x86'));db[_0xb593('0x87')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x88'));db[_0xb593('0x89')]=db[_0xb593('0x4')]['import'](_0xb593('0x8a'));db[_0xb593('0x8b')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x8c'));db['Sound']=db[_0xb593('0x4')]['import'](_0xb593('0x8d'));db[_0xb593('0x8e')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x8f'));db[_0xb593('0x90')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x91'));db['CmContactHasItem']=db[_0xb593('0x4')]['import'](_0xb593('0x92'));db[_0xb593('0x93')]=db['sequelize']['import'](_0xb593('0x94'));db[_0xb593('0x95')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x96'));db['Trigger']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x97'));db[_0xb593('0x98')]=db[_0xb593('0x4')]['import'](_0xb593('0x99'));db['Integration']=db[_0xb593('0x4')][_0xb593('0x14')]('../api/integration/integration.model');db[_0xb593('0x9a')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x9b'));db[_0xb593('0x9c')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x9d'));db['AnalyticDefaultReport']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x9e'));db['AnalyticExtractedReport']=db[_0xb593('0x4')][_0xb593('0x14')]('../api/analyticExtractedReport/analyticExtractedReport.model');db['AnalyticMetric']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x9f'));db[_0xb593('0xa0')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xa1'));db[_0xb593('0xa2')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/analyticTreeReport/analyticTreeReport.model');db[_0xb593('0xa3')]=db['sequelize']['import'](_0xb593('0xa4'));db[_0xb593('0xa5')]=db[_0xb593('0x4')]['import'](_0xb593('0xa6'));db[_0xb593('0xa7')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/intSalesforceField/intSalesforceField.model');db[_0xb593('0xa8')]=db[_0xb593('0x4')]['import'](_0xb593('0xa9'));db['SugarcrmConfiguration']=db['sequelize'][_0xb593('0x14')](_0xb593('0xaa'));db[_0xb593('0xab')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xac'));db['DeskAccount']=db[_0xb593('0x4')]['import'](_0xb593('0xad'));db['DeskConfiguration']=db[_0xb593('0x4')]['import']('../api/intDeskConfiguration/intDeskConfiguration.model');db['DeskField']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xae'));db[_0xb593('0xaf')]=db[_0xb593('0x4')]['import'](_0xb593('0xb0'));db['ZohoConfiguration']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xb1'));db[_0xb593('0xb2')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xb3'));db[_0xb593('0xb4')]=db['sequelize'][_0xb593('0x14')](_0xb593('0xb5'));db['ZendeskConfiguration']=db[_0xb593('0x4')]['import'](_0xb593('0xb6'));db[_0xb593('0xb7')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/intZendeskField/intZendeskField.model');db[_0xb593('0xb8')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xb9'));db['FreshdeskConfiguration']=db[_0xb593('0x4')]['import']('../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model');db[_0xb593('0xba')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xbb'));db[_0xb593('0xbc')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xbd'));db['VtigerConfiguration']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xbe'));db[_0xb593('0xbf')]=db[_0xb593('0x4')]['import'](_0xb593('0xc0'));db[_0xb593('0xc1')]=db[_0xb593('0x4')]['import'](_0xb593('0xc2'));db['ServicenowConfiguration']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xc3'));db['ServicenowField']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xc4'));db['Dynamics365Account']=db['sequelize'][_0xb593('0x14')](_0xb593('0xc5'));db[_0xb593('0xc6')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xc7'));db[_0xb593('0xc8')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xc9'));db[_0xb593('0xca')]=db['sequelize'][_0xb593('0x14')]('../api/intFreshsalesAccount/intFreshsalesAccount.model');db['FreshsalesConfiguration']=db['sequelize'][_0xb593('0x14')](_0xb593('0xcb'));db['FreshsalesField']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xcc'));db[_0xb593('0xcd')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xce'));db['Network']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xcf'));db[_0xb593('0xd0')]=db[_0xb593('0x4')]['import'](_0xb593('0xd1'));db[_0xb593('0xd2')]=db['sequelize'][_0xb593('0x14')](_0xb593('0xd3'));db[_0xb593('0xd4')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0xb593('0xd5')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xd6'));db['JscriptySessionReport']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xd7'));db[_0xb593('0xd8')]=db[_0xb593('0x4')]['import'](_0xb593('0xd9'));db[_0xb593('0xda')]=db['sequelize'][_0xb593('0x14')](_0xb593('0xdb'));db['SquareDetailsReport']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xdc'));db[_0xb593('0xdd')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xde'));db[_0xb593('0xdf')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/setting/setting.model');db[_0xb593('0xe0')]=db[_0xb593('0x4')]['import'](_0xb593('0xe1'));db[_0xb593('0xe2')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/squareProject/squareProject.model');db[_0xb593('0xe3')]=db['sequelize']['import'](_0xb593('0xe4'));db['SquareMessage']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xe5'));db[_0xb593('0xe6')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/team/team.model');db[_0xb593('0xe7')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xe8'));db[_0xb593('0xe9')]=db[_0xb593('0x4')]['import']('../api/campaign/campaign.model');db[_0xb593('0xea')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/migration/migration.model');db[_0xb593('0xeb')]=db[_0xb593('0x4')]['import'](_0xb593('0xec'));db['Plugin']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xed'));db[_0xb593('0xee')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/mailTransferReport/mailTransferReport.model');db[_0xb593('0xef')]=db['sequelize']['import'](_0xb593('0xf0'));db[_0xb593('0xf1')]=db[_0xb593('0x4')]['import']('../api/faxTransferReport/faxTransferReport.model');db[_0xb593('0xf2')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xf3'));db[_0xb593('0xf4')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xf5'));db[_0xb593('0xf6')]=db[_0xb593('0x4')]['import'](_0xb593('0xf7'));db['VoicePrefix']=db[_0xb593('0x4')][_0xb593('0x14')]('../api/voicePrefix/voicePrefix.model');db[_0xb593('0xf8')]=db['sequelize'][_0xb593('0x14')](_0xb593('0xf9'));db['UserProfileSection']=db[_0xb593('0x4')]['import']('../api/userProfileSection/userProfileSection.model');db[_0xb593('0xfa')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/userProfileResource/userProfileResource.model');db['UserNotification']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xfb'));db[_0xb593('0xfc')]=db[_0xb593('0x4')]['import'](_0xb593('0xfd'));db[_0xb593('0xfe')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0xff'));db[_0xb593('0x100')]=db[_0xb593('0x4')]['import']('../api/whatsappInteraction/whatsappInteraction.model');db['WhatsappMessage']=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x101'));db[_0xb593('0x102')]=db[_0xb593('0x4')]['import'](_0xb593('0x103'));db[_0xb593('0x104')]=db[_0xb593('0x4')][_0xb593('0x14')]('../api/whatsappTransferReport/whatsappTransferReport.model');db[_0xb593('0x105')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x106'));db[_0xb593('0x107')]=db['sequelize'][_0xb593('0x14')]('../api/cloudProvider/cloudProvider.model');db[_0xb593('0x108')]=db['sequelize'][_0xb593('0x14')]('../api/teamVoiceQueue/teamVoiceQueue.model');db[_0xb593('0x109')]=db[_0xb593('0x4')][_0xb593('0x14')](_0xb593('0x10a'));db[_0xb593('0x10b')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x10c'));db[_0xb593('0x10d')]=db['sequelize'][_0xb593('0x14')](_0xb593('0x10e'));db[_0xb593('0x10f')]['hasOne'](db['VoiceMail'],{'as':_0xb593('0x1c'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x111')});db['User']['hasOne'](db[_0xb593('0x10d')],{'as':_0xb593('0x112'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x111')});db['User'][_0xb593('0x113')](db[_0xb593('0x1a')],{'as':_0xb593('0x114'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x2b')],{'as':_0xb593('0x115'),'foreignKey':_0xb593('0x111')});db['User'][_0xb593('0x113')](db['VoiceExtension'],{'as':_0xb593('0x116'),'onDelete':'cascade','hooks':!![]});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x75')],{'as':_0xb593('0x117'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db['CmHopperHistory'],{'as':_0xb593('0x118'),'foreignKey':_0xb593('0x111')});db['User']['hasMany'](db[_0xb593('0x119')],{'as':_0xb593('0x119'),'foreignKey':'UserId'});db['User'][_0xb593('0x113')](db[_0xb593('0x11a')],{'as':_0xb593('0x11b'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x64')],{'as':_0xb593('0x11c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x53')],{'as':_0xb593('0x11d'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x4a')],{'as':'FaxInteractions','foreignKey':_0xb593('0x111')});db['User'][_0xb593('0x113')](db['MailInteraction'],{'as':_0xb593('0x11e'),'foreignKey':'UserId'});db[_0xb593('0x10f')][_0xb593('0x113')](db['WhatsappInteraction'],{'as':_0xb593('0x11f'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x10f')][_0xb593('0x113')](db[_0xb593('0x120')],{'as':_0xb593('0x121'),'foreignKey':_0xb593('0x122')});db[_0xb593('0x10f')][_0xb593('0x123')](db[_0xb593('0xf8')],{'as':_0xb593('0xf8'),'foreignKey':_0xb593('0x124')});db[_0xb593('0x10f')]['belongsToMany'](db[_0xb593('0x6c')],{'as':_0xb593('0x125'),'through':_0xb593('0x126')});db['User']['belongsToMany'](db['CmContact'],{'as':_0xb593('0x127'),'through':_0xb593('0x128')});db[_0xb593('0x10f')]['belongsToMany'](db[_0xb593('0xf6')],{'as':_0xb593('0x129'),'through':_0xb593('0x12a')});db[_0xb593('0x10f')]['belongsToMany'](db['Team'],{'through':_0xb593('0x12b')});db['User'][_0xb593('0x12c')](db[_0xb593('0x3f')],{'as':_0xb593('0x11e'),'through':_0xb593('0x12d')});db['User'][_0xb593('0x12c')](db[_0xb593('0x64')],{'as':'ChatInteractions','through':_0xb593('0x12e')});db[_0xb593('0x10f')]['belongsToMany'](db[_0xb593('0x4a')],{'as':_0xb593('0x12f'),'through':'user_has_fax_interactions'});db['User'][_0xb593('0x12c')](db[_0xb593('0x53')],{'as':_0xb593('0x11d'),'through':_0xb593('0x130')});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x11a')],{'as':_0xb593('0x11b'),'through':'user_has_openchannel_interactions'});db['User'][_0xb593('0x12c')](db[_0xb593('0x100')],{'as':_0xb593('0x11f'),'through':_0xb593('0x131')});db['User']['belongsToMany'](db[_0xb593('0x132')],{'as':_0xb593('0x133'),'through':_0xb593('0x134'),'required':![]});db['User']['belongsToMany'](db[_0xb593('0x135')],{'as':_0xb593('0x136'),'through':_0xb593('0x10b'),'required':![]});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x3c')],{'as':'MailQueues','through':_0xb593('0x137'),'required':![]});db[_0xb593('0x10f')]['belongsToMany'](db[_0xb593('0x6a')],{'as':'ChatQueues','through':_0xb593('0x2d'),'required':![],'hooks':!![]});db[_0xb593('0x10f')][_0xb593('0x12c')](db['FaxQueue'],{'as':'FaxQueues','through':_0xb593('0x138'),'required':![]});db['User']['belongsToMany'](db[_0xb593('0x139')],{'as':_0xb593('0x13a'),'through':_0xb593('0x31'),'required':![]});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x5d')],{'as':_0xb593('0x13b'),'through':'UserOpenchannelQueue','required':![]});db[_0xb593('0x10f')][_0xb593('0x12c')](db['WhatsappQueue'],{'as':_0xb593('0x13c'),'through':_0xb593('0x35'),'required':![]});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0xf6')],{'through':_0xb593('0x12a')});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x13d')],{'as':_0xb593('0x13e'),'through':'user_has_chat_websites'});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x47')],{'as':_0xb593('0x13f'),'through':_0xb593('0x140')});db[_0xb593('0x10f')][_0xb593('0x12c')](db['MailAccount'],{'as':_0xb593('0x141'),'through':'user_has_mail_accounts'});db[_0xb593('0x10f')][_0xb593('0x12c')](db[_0xb593('0x57')],{'as':_0xb593('0x142'),'through':_0xb593('0x143')});db['User'][_0xb593('0x12c')](db['SmsAccount'],{'as':_0xb593('0x144'),'through':_0xb593('0x145')});db['User'][_0xb593('0x12c')](db['WhatsappAccount'],{'as':_0xb593('0x146'),'through':_0xb593('0x147')});db[_0xb593('0x10f')][_0xb593('0x12c')](db['SquareProject'],{'as':_0xb593('0x148'),'through':_0xb593('0x149')});db[_0xb593('0x15')][_0xb593('0x113')](db['VoiceExtension'],{'as':_0xb593('0x14a'),'onDelete':_0xb593('0x110'),'foreignKey':'ChanSpyId'});db[_0xb593('0x14b')][_0xb593('0x113')](db[_0xb593('0x16')],{'onDelete':_0xb593('0x110')});db[_0xb593('0x16')][_0xb593('0x113')](db[_0xb593('0x16')],{'as':_0xb593('0x14c'),'onDelete':_0xb593('0x110')});db['VoiceMusicOnHold'][_0xb593('0x12c')](db[_0xb593('0x14d')],{'as':_0xb593('0x14e'),'through':'moh_has_sounds'});db['VoiceQueue'][_0xb593('0x113')](db[_0xb593('0x2b')],{'as':_0xb593('0x14f'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')][_0xb593('0x113')](db[_0xb593('0x151')],{'as':_0xb593('0x152'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')][_0xb593('0x113')](db[_0xb593('0x75')],{'as':_0xb593('0x117'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')][_0xb593('0x113')](db[_0xb593('0x77')],{'as':_0xb593('0x153'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')]['hasMany'](db[_0xb593('0x119')],{'as':_0xb593('0x119'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')]['hasMany'](db[_0xb593('0x73')],{'as':_0xb593('0x154'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')][_0xb593('0x113')](db[_0xb593('0x155')],{'as':_0xb593('0x156'),'foreignKey':_0xb593('0x150')});db[_0xb593('0x132')][_0xb593('0x123')](db[_0xb593('0x157')],{'as':_0xb593('0x157'),'foreignKey':_0xb593('0x158')});db['VoiceQueue'][_0xb593('0x123')](db[_0xb593('0x157')],{'as':_0xb593('0x159'),'foreignKey':_0xb593('0x15a')});db['VoiceQueue'][_0xb593('0x123')](db['Interval'],{'as':_0xb593('0x15b'),'foreignKey':_0xb593('0x15c')});db[_0xb593('0x132')]['belongsTo'](db[_0xb593('0x15d')],{'as':_0xb593('0x15e'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xb593('0x132')][_0xb593('0x12c')](db[_0xb593('0xf6')],{'as':_0xb593('0x129'),'through':_0xb593('0x15f')});db[_0xb593('0x132')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':'UserVoiceQueue'});db[_0xb593('0x132')]['belongsToMany'](db['Team'],{'as':_0xb593('0x161'),'through':_0xb593('0x108')});db[_0xb593('0x132')][_0xb593('0x12c')](db[_0xb593('0xf6')],{'as':_0xb593('0x162'),'through':'voice_queues_has_cm_blacklists'});db['VoiceRecording']['belongsTo'](db[_0xb593('0x10f')],{'as':_0xb593('0x10f'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x163')]['belongsTo'](db['User'],{'as':_0xb593('0x10f'),'foreignKey':'UserId'});db['VoiceMail']['hasMany'](db[_0xb593('0x164')],{'as':_0xb593('0x165'),'onDelete':_0xb593('0x110'),'foreignKey':'mailboxuser','sourceKey':_0xb593('0x166')});db['VoiceMailMessage'][_0xb593('0x123')](db[_0xb593('0x1c')],{'foreignKey':_0xb593('0x167'),'targetKey':_0xb593('0x166')});db['VoiceCallReport']['hasMany'](db['VoiceQueueReport'],{'as':'QueueCalls','foreignKey':'uniqueid','constraints':![]});db['VoiceCallReport']['hasMany'](db[_0xb593('0x23')],{'as':_0xb593('0x168'),'foreignKey':'uniqueid','constraints':![]});db[_0xb593('0x1f')][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':_0xb593('0x10f'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x1f')][_0xb593('0x123')](db['CmContact'],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x37')][_0xb593('0x123')](db[_0xb593('0x3a')],{'as':_0xb593('0x3a'),'foreignKey':_0xb593('0x16b')});db['MailServerIn'][_0xb593('0x123')](db[_0xb593('0x107')],{'as':_0xb593('0x107'),'foreignKey':'CloudProviderId','onDelete':_0xb593('0x16c')});db[_0xb593('0x16d')][_0xb593('0x123')](db[_0xb593('0x3a')],{'as':_0xb593('0x3a'),'foreignKey':_0xb593('0x16b')});db[_0xb593('0x16d')][_0xb593('0x123')](db[_0xb593('0x107')],{'as':'CloudProvider','foreignKey':_0xb593('0x16e'),'onDelete':'restrict'});db['MailAccount']['hasOne'](db[_0xb593('0x37')],{'as':_0xb593('0x16f'),'onDelete':_0xb593('0x110')});db['MailAccount'][_0xb593('0x170')](db['MailServerOut'],{'as':_0xb593('0x171'),'onDelete':_0xb593('0x110')});db[_0xb593('0x3a')][_0xb593('0x113')](db[_0xb593('0x81')],{'as':_0xb593('0x172'),'foreignKey':'MailAccountId','onDelete':'cascade'});db[_0xb593('0x3a')][_0xb593('0x113')](db[_0xb593('0x7f')],{'as':_0xb593('0x173'),'foreignKey':_0xb593('0x16b')});db[_0xb593('0x3a')][_0xb593('0x113')](db[_0xb593('0x174')],{'as':_0xb593('0x165'),'foreignKey':'MailAccountId'});db[_0xb593('0x3a')][_0xb593('0x113')](db[_0xb593('0x3f')],{'as':_0xb593('0x175')});db[_0xb593('0x3a')][_0xb593('0x113')](db[_0xb593('0x42')],{'as':'Applications'});db[_0xb593('0x3a')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':'ListId'});db[_0xb593('0x3a')][_0xb593('0x123')](db[_0xb593('0x95')],{'as':'Template','foreignKey':_0xb593('0x177')});db[_0xb593('0x3a')][_0xb593('0x123')](db[_0xb593('0x15d')],{'as':_0xb593('0x15e'),'foreignKey':_0xb593('0x178')});db[_0xb593('0x3a')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x179')});db[_0xb593('0x3c')][_0xb593('0x12c')](db['User'],{'as':'Agents','through':_0xb593('0x137')});db['MailQueue'][_0xb593('0x12c')](db['Team'],{'through':_0xb593('0x17a'),'as':_0xb593('0x161')});db[_0xb593('0x3f')][_0xb593('0x113')](db[_0xb593('0x174')],{'as':'Messages','onDelete':'cascade','foreignKey':'MailInteractionId'});db['MailInteraction'][_0xb593('0x123')](db[_0xb593('0x3a')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x16b')});db['MailInteraction'][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x3f')][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db['MailInteraction']['belongsToMany'](db[_0xb593('0x8e')],{'through':'mail_interaction_has_tags','as':_0xb593('0x17d')});db['MailInteraction'][_0xb593('0x12c')](db['Tag'],{'through':_0xb593('0x17e'),'as':_0xb593('0x17f')});db[_0xb593('0x3f')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x180'),'through':_0xb593('0x12d'),'foreignKey':_0xb593('0x181')});db[_0xb593('0x174')][_0xb593('0x113')](db[_0xb593('0xeb')],{'as':'Attachments','onDelete':_0xb593('0x110')});db['MailMessage']['belongsTo'](db[_0xb593('0x10f')],{'as':_0xb593('0x10f')});db[_0xb593('0x174')]['belongsTo'](db['CmContact'],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169')});db[_0xb593('0x174')]['belongsTo'](db['MailInteraction'],{'as':_0xb593('0x182'),'foreignKey':_0xb593('0x181')});db['MailMessage'][_0xb593('0x123')](db[_0xb593('0x3a')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x16b')});db[_0xb593('0x174')][_0xb593('0x123')](db[_0xb593('0x13d')],{'as':'ChatWebsite','foreignKey':_0xb593('0x183')});db[_0xb593('0x174')]['belongsTo'](db[_0xb593('0x68')],{'as':'ChatOfflineMessage','foreignKey':_0xb593('0x184')});db['MailApplication']['belongsTo'](db['User'],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x42')][_0xb593('0x123')](db[_0xb593('0x3c')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x42')][_0xb593('0x123')](db[_0xb593('0x3a')],{'onDelete':_0xb593('0x16c')});db['MailApplication'][_0xb593('0x123')](db['Interval'],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x15c')});db[_0xb593('0x42')][_0xb593('0x123')](db[_0xb593('0x8e')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x185')});db[_0xb593('0x186')][_0xb593('0x123')](db[_0xb593('0x3a')],{});db[_0xb593('0x186')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':'ListId'});db[_0xb593('0x186')]['belongsTo'](db[_0xb593('0x72')],{'as':'Contact','foreignKey':_0xb593('0x16a')});db[_0xb593('0x186')][_0xb593('0x123')](db[_0xb593('0x3f')],{});db[_0xb593('0x186')]['belongsTo'](db[_0xb593('0x174')],{});db[_0xb593('0x186')][_0xb593('0x123')](db['User'],{});db[_0xb593('0x186')]['belongsTo'](db[_0xb593('0x3c')],{});db[_0xb593('0x45')][_0xb593('0x113')](db[_0xb593('0x187')],{'as':_0xb593('0x188'),'onDelete':_0xb593('0x110')});db[_0xb593('0x47')]['hasMany'](db[_0xb593('0x81')],{'as':'Dispositions','foreignKey':_0xb593('0x189'),'onDelete':'cascade'});db[_0xb593('0x47')]['hasMany'](db[_0xb593('0x7f')],{'as':_0xb593('0x173'),'foreignKey':'FaxAccountId'});db['FaxAccount'][_0xb593('0x113')](db[_0xb593('0x4a')],{'as':_0xb593('0x175')});db['FaxAccount'][_0xb593('0x113')](db['FaxApplication'],{'as':'Applications'});db[_0xb593('0x47')][_0xb593('0x113')](db[_0xb593('0x16')],{'as':_0xb593('0x18a'),'onDelete':_0xb593('0x110')});db[_0xb593('0x47')][_0xb593('0x113')](db[_0xb593('0x4c')],{'as':_0xb593('0x165')});db[_0xb593('0x47')][_0xb593('0x123')](db[_0xb593('0x157')],{'as':_0xb593('0x157')});db[_0xb593('0x47')][_0xb593('0x123')](db['CmList'],{'as':_0xb593('0x176'),'foreignKey':'ListId'});db[_0xb593('0x47')][_0xb593('0x123')](db['Pause'],{'as':_0xb593('0x15e'),'foreignKey':'mandatoryDispositionPauseId'});db['FaxAccount'][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x140')});db[_0xb593('0x18b')][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':'restrict'});db[_0xb593('0x18b')][_0xb593('0x123')](db[_0xb593('0x4d')],{'onDelete':'restrict'});db[_0xb593('0x18b')][_0xb593('0x123')](db[_0xb593('0x47')],{'onDelete':_0xb593('0x16c')});db['FaxApplication']['belongsTo'](db['Tag'],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x185')});db['FaxInteraction'][_0xb593('0x113')](db['FaxMessage'],{'as':'Messages','onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x18c')});db[_0xb593('0x4a')][_0xb593('0x123')](db['FaxAccount'],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x189')});db['FaxInteraction'][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x4a')][_0xb593('0x123')](db['User'],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x4a')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x18d'),'as':'Tags'});db[_0xb593('0x4a')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x18d'),'as':'ThroughTags'});db[_0xb593('0x4a')]['belongsToMany'](db[_0xb593('0x10f')],{'as':'Users','through':_0xb593('0x18e'),'foreignKey':_0xb593('0x18c')});db[_0xb593('0x4c')][_0xb593('0x123')](db['User'],{'onDelete':_0xb593('0x110'),'as':'User'});db['FaxMessage'][_0xb593('0x123')](db[_0xb593('0x4a')],{'as':_0xb593('0x182'),'foreignKey':_0xb593('0x18c')});db['FaxMessage'][_0xb593('0x123')](db[_0xb593('0x72')],{'onDelete':'cascade','as':'Contact'});db['FaxMessage'][_0xb593('0x123')](db[_0xb593('0xeb')],{'as':'Attachment','foreignKey':'AttachmentId'});db['FaxMessage'][_0xb593('0x123')](db['FaxAccount'],{'as':_0xb593('0x17b'),'foreignKey':'FaxAccountId'});db['FaxQueue'][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x138')});db['FaxQueue']['belongsToMany'](db['Team'],{'through':'team_has_fax_queues','as':_0xb593('0x161')});db['FaxQueueReport'][_0xb593('0x123')](db[_0xb593('0x47')],{});db[_0xb593('0x4e')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':'List','foreignKey':'ListId'});db[_0xb593('0x4e')]['belongsTo'](db[_0xb593('0x72')],{'as':'Contact','foreignKey':_0xb593('0x16a')});db[_0xb593('0x4e')][_0xb593('0x123')](db['FaxInteraction'],{});db[_0xb593('0x4e')][_0xb593('0x123')](db[_0xb593('0x4c')],{});db[_0xb593('0x4e')][_0xb593('0x123')](db['User'],{});db['FaxQueueReport'][_0xb593('0x123')](db['FaxQueue'],{});db[_0xb593('0x50')][_0xb593('0x113')](db[_0xb593('0x81')],{'as':_0xb593('0x172'),'foreignKey':_0xb593('0x18f'),'onDelete':_0xb593('0x110')});db['SmsAccount'][_0xb593('0x113')](db[_0xb593('0x7f')],{'as':_0xb593('0x173'),'foreignKey':_0xb593('0x18f')});db['SmsAccount'][_0xb593('0x113')](db[_0xb593('0x190')],{'as':_0xb593('0x165'),'foreignKey':_0xb593('0x18f')});db[_0xb593('0x50')][_0xb593('0x113')](db[_0xb593('0x53')],{'as':_0xb593('0x175')});db[_0xb593('0x50')]['hasMany'](db['SmsApplication'],{'as':_0xb593('0x14c')});db['SmsAccount']['belongsTo'](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':_0xb593('0x191')});db[_0xb593('0x50')][_0xb593('0x123')](db[_0xb593('0x15d')],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db[_0xb593('0x50')][_0xb593('0x12c')](db['User'],{'as':_0xb593('0x160'),'through':_0xb593('0x145')});db[_0xb593('0x192')][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x192')][_0xb593('0x123')](db['SmsQueue'],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x192')][_0xb593('0x123')](db[_0xb593('0x50')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x192')][_0xb593('0x123')](db[_0xb593('0x15b')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x15c')});db[_0xb593('0x192')][_0xb593('0x123')](db[_0xb593('0x8e')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x185')});db[_0xb593('0x53')][_0xb593('0x113')](db[_0xb593('0x190')],{'as':_0xb593('0x165'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x193')});db['SmsInteraction'][_0xb593('0x123')](db['SmsAccount'],{'as':'Account','foreignKey':_0xb593('0x18f')});db[_0xb593('0x53')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x53')][_0xb593('0x123')](db['User'],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x53')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':'sms_interaction_has_tags','as':_0xb593('0x17d')});db[_0xb593('0x53')]['belongsToMany'](db[_0xb593('0x8e')],{'through':_0xb593('0x194'),'as':_0xb593('0x17f')});db[_0xb593('0x53')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':'Users','through':_0xb593('0x130'),'foreignKey':_0xb593('0x193')});db['SmsMessage'][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':_0xb593('0x10f')});db['SmsMessage'][_0xb593('0x123')](db['CmContact'],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169')});db[_0xb593('0x190')][_0xb593('0x123')](db[_0xb593('0x53')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x182'),'foreignKey':_0xb593('0x193')});db[_0xb593('0x190')][_0xb593('0x123')](db[_0xb593('0x50')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x18f')});db[_0xb593('0x139')]['belongsToMany'](db[_0xb593('0x10f')],{'as':'Agents','through':'UserSmsQueue','foreignKey':_0xb593('0x195')});db[_0xb593('0x139')]['belongsToMany'](db['Team'],{'through':_0xb593('0x196'),'as':_0xb593('0x161')});db['OpenchannelAccount'][_0xb593('0x113')](db['Disposition'],{'as':_0xb593('0x172'),'foreignKey':'OpenchannelAccountId','onDelete':_0xb593('0x110')});db[_0xb593('0x57')][_0xb593('0x113')](db[_0xb593('0x7f')],{'as':_0xb593('0x173'),'foreignKey':'OpenchannelAccountId'});db[_0xb593('0x57')][_0xb593('0x113')](db['OpenchannelInteraction'],{'as':_0xb593('0x175'),'foreignKey':'OpenchannelAccountId'});db['OpenchannelAccount'][_0xb593('0x113')](db[_0xb593('0x5b')],{'as':_0xb593('0x165'),'foreignKey':_0xb593('0x197')});db[_0xb593('0x57')]['hasMany'](db[_0xb593('0x198')],{'as':_0xb593('0x14c'),'foreignKey':_0xb593('0x197')});db[_0xb593('0x57')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':'ListId'});db[_0xb593('0x57')][_0xb593('0x123')](db[_0xb593('0x15d')],{'as':_0xb593('0x15e'),'foreignKey':_0xb593('0x178')});db[_0xb593('0x57')][_0xb593('0x12c')](db['User'],{'as':'Agents','through':'user_has_openchannel_accounts'});db['OpenchannelApplication'][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0x198')][_0xb593('0x123')](db[_0xb593('0x5d')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x199')});db[_0xb593('0x198')][_0xb593('0x123')](db[_0xb593('0x57')],{'onDelete':_0xb593('0x16c'),'foreignKey':'OpenchannelAccountId'});db[_0xb593('0x198')][_0xb593('0x123')](db[_0xb593('0x15b')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x15c')});db[_0xb593('0x198')][_0xb593('0x123')](db[_0xb593('0x8e')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x185')});db[_0xb593('0x11a')][_0xb593('0x113')](db[_0xb593('0x5b')],{'as':_0xb593('0x165'),'onDelete':_0xb593('0x110'),'foreignKey':'OpenchannelInteractionId'});db[_0xb593('0x11a')][_0xb593('0x123')](db['OpenchannelAccount'],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x197')});db['OpenchannelInteraction'][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db['OpenchannelInteraction'][_0xb593('0x123')](db['User'],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x11a')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x19a'),'as':_0xb593('0x17d')});db[_0xb593('0x11a')]['belongsToMany'](db[_0xb593('0x8e')],{'through':_0xb593('0x19a'),'as':'ThroughTags'});db[_0xb593('0x11a')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':'Users','through':_0xb593('0x19b'),'foreignKey':_0xb593('0x19c')});db['OpenchannelMessage'][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x110'),'as':'User'});db[_0xb593('0x5b')][_0xb593('0x123')](db[_0xb593('0x72')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169')});db[_0xb593('0x5b')][_0xb593('0x123')](db[_0xb593('0x11a')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x182'),'foreignKey':_0xb593('0x19c')});db[_0xb593('0x5b')][_0xb593('0x123')](db[_0xb593('0xeb')],{'as':'Attachment','foreignKey':'AttachmentId'});db[_0xb593('0x5b')]['belongsTo'](db[_0xb593('0x57')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x197')});db['OpenchannelQueue']['belongsToMany'](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x33'),'foreignKey':_0xb593('0x199')});db[_0xb593('0x5d')][_0xb593('0x12c')](db[_0xb593('0xe6')],{'through':_0xb593('0x19d'),'as':_0xb593('0x161')});db[_0xb593('0x13d')][_0xb593('0x113')](db[_0xb593('0x81')],{'as':_0xb593('0x172'),'foreignKey':'ChatWebsiteId','onDelete':_0xb593('0x110')});db[_0xb593('0x13d')]['hasMany'](db['CannedAnswer'],{'as':'Answers','foreignKey':_0xb593('0x183')});db[_0xb593('0x13d')][_0xb593('0x113')](db[_0xb593('0x6e')],{'as':_0xb593('0x19e')});db[_0xb593('0x13d')]['hasMany'](db[_0xb593('0x64')],{'as':_0xb593('0x175')});db[_0xb593('0x13d')]['hasMany'](db[_0xb593('0x62')],{'as':'Applications'});db[_0xb593('0x13d')][_0xb593('0x113')](db[_0xb593('0x66')],{'as':'Messages'});db['ChatWebsite'][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':'ListId'});db['ChatWebsite'][_0xb593('0x123')](db[_0xb593('0x15b')],{'as':_0xb593('0x15b'),'foreignKey':_0xb593('0x15c')});db['ChatWebsite']['belongsTo'](db['MailAccount'],{'as':_0xb593('0x3a'),'foreignKey':_0xb593('0x16b')});db['ChatWebsite'][_0xb593('0x123')](db[_0xb593('0x15d')],{'as':'mandatoryDispositionPause','foreignKey':_0xb593('0x178')});db[_0xb593('0x13d')]['belongsToMany'](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':'user_has_chat_websites'});db[_0xb593('0x60')][_0xb593('0x123')](db[_0xb593('0x57')],{});db['OpenchannelQueueReport'][_0xb593('0x123')](db['CmList'],{'as':'List','foreignKey':_0xb593('0x191')});db[_0xb593('0x60')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':'ContactId'});db[_0xb593('0x60')][_0xb593('0x123')](db[_0xb593('0x11a')],{});db[_0xb593('0x60')]['belongsTo'](db['OpenchannelMessage'],{});db[_0xb593('0x60')][_0xb593('0x123')](db['User'],{});db[_0xb593('0x60')][_0xb593('0x123')](db['OpenchannelQueue'],{});db[_0xb593('0x62')][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':_0xb593('0x19f'),'foreignKey':_0xb593('0x111'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x62')]['belongsTo'](db[_0xb593('0x6a')],{'as':_0xb593('0x1a0'),'foreignKey':'ChatQueueId','onDelete':_0xb593('0x16c')});db[_0xb593('0x62')][_0xb593('0x123')](db[_0xb593('0x13d')],{'as':'Website','foreignKey':_0xb593('0x183'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x62')]['belongsTo'](db[_0xb593('0x8e')],{'onDelete':'restrict','foreignKey':_0xb593('0x185')});db[_0xb593('0x64')]['hasMany'](db[_0xb593('0x66')],{'as':_0xb593('0x165'),'onDelete':'cascade','foreignKey':_0xb593('0x1a1')});db[_0xb593('0x64')]['belongsTo'](db[_0xb593('0x13d')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x183')});db['ChatInteraction'][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x64')][_0xb593('0x123')](db['User'],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x64')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x1a2'),'as':_0xb593('0x17d')});db['ChatInteraction'][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x1a2'),'as':_0xb593('0x17f')});db[_0xb593('0x64')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x180'),'through':_0xb593('0x12e'),'foreignKey':_0xb593('0x1a1')});db[_0xb593('0x66')]['belongsTo'](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x10f')});db[_0xb593('0x66')][_0xb593('0x123')](db[_0xb593('0x72')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db['ChatMessage']['belongsTo'](db['ChatInteraction'],{'onDelete':_0xb593('0x110'),'as':'Interaction','foreignKey':_0xb593('0x1a1')});db[_0xb593('0x66')]['belongsTo'](db[_0xb593('0xeb')],{'as':_0xb593('0xeb'),'foreignKey':_0xb593('0x1a3')});db[_0xb593('0x66')][_0xb593('0x123')](db['ChatWebsite'],{'as':'Account','foreignKey':'ChatWebsiteId'});db['ChatOfflineMessage'][_0xb593('0x113')](db[_0xb593('0xeb')],{'as':_0xb593('0x1a4'),'foreignKey':'ChatOfflineMessageId','onDelete':_0xb593('0x110'),'hooks':!![]});db[_0xb593('0x68')][_0xb593('0x123')](db[_0xb593('0x72')],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x68')][_0xb593('0x123')](db[_0xb593('0x13d')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x183')});db[_0xb593('0x6a')][_0xb593('0x12c')](db['User'],{'as':'Agents','through':'UserChatQueue','hooks':!![]});db[_0xb593('0x6a')]['belongsToMany'](db['Team'],{'through':_0xb593('0x1a5'),'as':_0xb593('0x161')});db[_0xb593('0x6c')]['hasMany'](db[_0xb593('0xd2')],{'as':_0xb593('0x165'),'foreignKey':_0xb593('0x1a6'),'onDelete':_0xb593('0x110')});db['ChatGroup'][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x14f'),'through':_0xb593('0x126')});db[_0xb593('0x6e')]['belongsTo'](db[_0xb593('0x13d')],{'as':'Website','foreignKey':'ChatWebsiteId'});db[_0xb593('0x70')][_0xb593('0x113')](db[_0xb593('0x72')],{'as':_0xb593('0x127'),'foreignKey':_0xb593('0x1a7')});db[_0xb593('0x72')][_0xb593('0x113')](db[_0xb593('0x1a8')],{'as':_0xb593('0x1a9'),'foreignKey':_0xb593('0x1aa')});db['CmContact'][_0xb593('0x113')](db[_0xb593('0x151')],{'as':_0xb593('0x152'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x72')][_0xb593('0x113')](db[_0xb593('0x75')],{'as':_0xb593('0x117'),'foreignKey':_0xb593('0x16a')});db['CmContact'][_0xb593('0x113')](db['CmHopperHistory'],{'as':'HopperHistories','foreignKey':_0xb593('0x16a')});db['CmContact']['hasMany'](db[_0xb593('0x119')],{'as':_0xb593('0x119'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x72')][_0xb593('0x113')](db[_0xb593('0x155')],{'as':_0xb593('0x156'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x72')]['hasMany'](db['OpenchannelInteraction'],{'as':_0xb593('0x11b'),'foreignKey':_0xb593('0x16a'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x72')][_0xb593('0x113')](db[_0xb593('0x64')],{'as':_0xb593('0x11c'),'foreignKey':_0xb593('0x16a'),'onDelete':'restrict'});db['CmContact'][_0xb593('0x113')](db[_0xb593('0x53')],{'as':_0xb593('0x11d'),'foreignKey':_0xb593('0x16a'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x72')][_0xb593('0x113')](db[_0xb593('0x4a')],{'as':_0xb593('0x12f'),'foreignKey':_0xb593('0x16a'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x72')][_0xb593('0x113')](db['MailInteraction'],{'as':_0xb593('0x11e'),'foreignKey':'ContactId','onDelete':_0xb593('0x16c')});db[_0xb593('0x72')][_0xb593('0x123')](db[_0xb593('0x70')],{'as':_0xb593('0x1ab'),'foreignKey':_0xb593('0x1a7')});db[_0xb593('0x72')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':_0xb593('0x191'),'onDelete':_0xb593('0x110')});db['CmContact'][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x180'),'through':_0xb593('0x128')});db[_0xb593('0x72')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'as':_0xb593('0x17d'),'through':'cm_contact_has_tags'});db['CmContact'][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x1ac'),'as':_0xb593('0x17f')});db['CmHopper'][_0xb593('0x113')](db[_0xb593('0x93')],{'as':_0xb593('0x1ad'),'foreignKey':_0xb593('0x1ae')});db[_0xb593('0x151')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a'),'onDelete':_0xb593('0x110')});db['CmHopper'][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':'List','foreignKey':'ListId','onDelete':_0xb593('0x110')});db[_0xb593('0x151')]['belongsTo'](db[_0xb593('0x10f')],{'as':_0xb593('0x19f'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x151')]['belongsTo'](db[_0xb593('0x132')],{'as':_0xb593('0x1a0'),'foreignKey':_0xb593('0x150'),'onDelete':_0xb593('0x110')});db['CmHopper']['belongsTo'](db['Campaign'],{'as':_0xb593('0xe9'),'foreignKey':_0xb593('0x1af'),'onDelete':'cascade'});db[_0xb593('0x151')][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':'Owner','foreignKey':_0xb593('0x1b0')});db[_0xb593('0x73')]['belongsTo'](db[_0xb593('0x72')],{'as':'Contact','foreignKey':'ContactId','onDelete':_0xb593('0x110')});db[_0xb593('0x73')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':'ListId','onDelete':_0xb593('0x110')});db[_0xb593('0x73')][_0xb593('0x123')](db[_0xb593('0x132')],{'as':_0xb593('0x1a0'),'foreignKey':_0xb593('0x150'),'onDelete':'cascade'});db[_0xb593('0x73')]['belongsTo'](db[_0xb593('0xe9')],{'as':_0xb593('0xe9'),'foreignKey':_0xb593('0x1af'),'onDelete':_0xb593('0x110')});db[_0xb593('0x7e')]['hasMany'](db[_0xb593('0x83')],{'as':{'plural':'All','singular':'OneAll'},'foreignKey':_0xb593('0x1b1'),'onDelete':_0xb593('0x110'),'hooks':!![]});db['Automation'][_0xb593('0x113')](db[_0xb593('0x83')],{'as':{'plural':_0xb593('0x1b2'),'singular':_0xb593('0x1b3')},'foreignKey':_0xb593('0x1b4'),'onDelete':_0xb593('0x110'),'hooks':!![]});db[_0xb593('0x7e')][_0xb593('0x113')](db[_0xb593('0x7c')],{'as':_0xb593('0x1b5'),'foreignKey':_0xb593('0x1b6'),'onDelete':_0xb593('0x110'),'hooks':!![]});db[_0xb593('0x81')][_0xb593('0x113')](db['Disposition'],{'as':_0xb593('0x172'),'foreignKey':_0xb593('0x1b7'),'onDelete':_0xb593('0x110')});db[_0xb593('0x15b')]['hasMany'](db[_0xb593('0x15b')],{'as':_0xb593('0x1b8'),'foreignKey':_0xb593('0x15c'),'onDelete':_0xb593('0x110'),'hooks':!![],'required':![]});db['Interval'][_0xb593('0x113')](db['VoiceExtension'],{'as':_0xb593('0x116'),'foreignKey':_0xb593('0x15c'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x15b')][_0xb593('0x113')](db[_0xb593('0x42')],{'as':_0xb593('0x1b9'),'foreignKey':'IntervalId'});db[_0xb593('0x15b')][_0xb593('0x113')](db[_0xb593('0x62')],{'as':'ChatApplications','foreignKey':_0xb593('0x15c')});db[_0xb593('0x15b')][_0xb593('0x113')](db[_0xb593('0x18b')],{'as':_0xb593('0x1ba'),'foreignKey':_0xb593('0x15c')});db[_0xb593('0x15b')][_0xb593('0x113')](db[_0xb593('0x192')],{'as':'SmsApplications','foreignKey':_0xb593('0x15c')});db[_0xb593('0x8b')][_0xb593('0x123')](db[_0xb593('0x3a')],{});db[_0xb593('0x8b')][_0xb593('0x123')](db[_0xb593('0x1bb')],{'foreignKey':_0xb593('0x1bc')});db[_0xb593('0x8b')][_0xb593('0x123')](db[_0xb593('0x9c')],{'foreignKey':_0xb593('0x1bd')});db[_0xb593('0x14d')][_0xb593('0x12c')](db[_0xb593('0x18')],{'as':_0xb593('0x1be'),'through':_0xb593('0x1bf'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x8e')][_0xb593('0x12c')](db['CmContact'],{'through':'cm_contact_has_tags'});db['Tag']['belongsToMany'](db['ChatInteraction'],{'through':'chat_interaction_has_tags'});db[_0xb593('0x8e')][_0xb593('0x12c')](db[_0xb593('0x3f')],{'through':_0xb593('0x17e')});db[_0xb593('0x8e')][_0xb593('0x12c')](db[_0xb593('0x53')],{'through':_0xb593('0x194')});db[_0xb593('0x8e')][_0xb593('0x12c')](db[_0xb593('0x4a')],{'through':_0xb593('0x18d')});db[_0xb593('0x8e')][_0xb593('0x12c')](db[_0xb593('0x11a')],{'through':'openchannel_interaction_has_tags'});db[_0xb593('0x8e')][_0xb593('0x12c')](db['WhatsappInteraction'],{'through':_0xb593('0x1c0')});db[_0xb593('0x1a8')][_0xb593('0x123')](db['ContactItemType'],{'as':_0xb593('0x1c1'),'foreignKey':_0xb593('0x1c2')});db[_0xb593('0x93')]['belongsTo'](db[_0xb593('0x151')],{'as':_0xb593('0x1c3'),'foreignKey':_0xb593('0x1ae')});db[_0xb593('0x1a8')]['belongsTo'](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x1aa')});db[_0xb593('0x1c4')][_0xb593('0x113')](db[_0xb593('0x83')],{'as':{'plural':'AllConditions','singular':_0xb593('0x1c5')},'foreignKey':_0xb593('0x1c6'),'onDelete':_0xb593('0x110'),'hooks':!![]});db[_0xb593('0x1c4')][_0xb593('0x113')](db[_0xb593('0x83')],{'as':{'plural':_0xb593('0x1c7'),'singular':_0xb593('0x1c8')},'foreignKey':_0xb593('0x1c9'),'onDelete':'cascade','hooks':!![]});db[_0xb593('0x1c4')][_0xb593('0x113')](db['Action'],{'as':_0xb593('0x1b5'),'foreignKey':_0xb593('0x1ca'),'onDelete':_0xb593('0x110'),'hooks':!![]});db['AnalyticCustomReport'][_0xb593('0x113')](db[_0xb593('0xa0')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1bd'),'hooks':!![]});db[_0xb593('0x1bb')][_0xb593('0x113')](db[_0xb593('0xa0')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1bc')});db[_0xb593('0x1cc')][_0xb593('0x113')](db[_0xb593('0xa0')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':'MetricId'});db[_0xb593('0xa0')][_0xb593('0x123')](db[_0xb593('0x1cc')],{'foreignKey':_0xb593('0x1cd')});db[_0xb593('0xa3')][_0xb593('0x113')](db['SalesforceConfiguration'],{'as':_0xb593('0x1ce'),'onDelete':'cascade','foreignKey':_0xb593('0x1cf')});db['SalesforceConfiguration']['hasMany'](db[_0xb593('0xa7')],{'as':'Subjects','onDelete':'cascade','foreignKey':_0xb593('0x1d0')});db['SalesforceConfiguration']['hasMany'](db['SalesforceField'],{'as':_0xb593('0x1d1'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xa5')][_0xb593('0x113')](db[_0xb593('0xa7')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xa5')]['belongsTo'](db[_0xb593('0xa3')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0xa7')][_0xb593('0x113')](db[_0xb593('0xa7')],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0xa7')][_0xb593('0x113')](db[_0xb593('0xa7')],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xa7')]['hasMany'](db[_0xb593('0xa7')],{'as':_0xb593('0x1d6'),'foreignKey':'FieldId'});db[_0xb593('0xa7')][_0xb593('0x123')](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':'VariableId'});db[_0xb593('0xa8')][_0xb593('0x113')](db[_0xb593('0x1d7')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1d7')][_0xb593('0x113')](db[_0xb593('0xab')],{'as':_0xb593('0x1d8'),'onDelete':_0xb593('0x110'),'foreignKey':'SubjectId'});db[_0xb593('0x1d7')][_0xb593('0x113')](db['SugarcrmField'],{'as':_0xb593('0x1d1'),'onDelete':_0xb593('0x110'),'foreignKey':'DescriptionId'});db['SugarcrmConfiguration'][_0xb593('0x113')](db[_0xb593('0xab')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d3')});db['SugarcrmConfiguration']['belongsTo'](db[_0xb593('0xa8')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0xab')][_0xb593('0x113')](db['SugarcrmField'],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db['SugarcrmField']['hasMany'](db[_0xb593('0xab')],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xab')][_0xb593('0x113')](db[_0xb593('0xab')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xab')][_0xb593('0x123')](db['Variable'],{'as':_0xb593('0x98'),'foreignKey':_0xb593('0x1d9')});db[_0xb593('0x1da')][_0xb593('0x113')](db[_0xb593('0x1db')],{'as':'Configurations','onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1db')][_0xb593('0x113')](db[_0xb593('0x1dc')],{'as':_0xb593('0x1d8'),'onDelete':'cascade','foreignKey':_0xb593('0x1d0')});db['DeskConfiguration'][_0xb593('0x113')](db['DeskField'],{'as':'Descriptions','onDelete':'cascade','foreignKey':'DescriptionId'});db[_0xb593('0x1db')]['hasMany'](db['DeskField'],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1db')][_0xb593('0x123')](db[_0xb593('0x1da')],{'as':'Account','foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1db')]['belongsToMany'](db[_0xb593('0x8e')],{'through':_0xb593('0x1dd')});db[_0xb593('0x1dc')]['hasMany'](db[_0xb593('0x1dc')],{'as':'Subject','foreignKey':'SubjectId'});db[_0xb593('0x1dc')][_0xb593('0x113')](db[_0xb593('0x1dc')],{'as':'Description','foreignKey':_0xb593('0x1d2')});db[_0xb593('0x1dc')]['hasMany'](db[_0xb593('0x1dc')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1dc')][_0xb593('0x123')](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':'VariableId'});db['ZohoAccount'][_0xb593('0x113')](db[_0xb593('0x1de')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1de')][_0xb593('0x113')](db[_0xb593('0xb2')],{'as':_0xb593('0x1d8'),'onDelete':'cascade','foreignKey':_0xb593('0x1d0')});db[_0xb593('0x1de')][_0xb593('0x113')](db[_0xb593('0xb2')],{'as':_0xb593('0x1d1'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d2')});db['ZohoConfiguration'][_0xb593('0x113')](db[_0xb593('0xb2')],{'as':'Fields','onDelete':'cascade','foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1de')][_0xb593('0x123')](db[_0xb593('0xaf')],{'as':'Account','foreignKey':_0xb593('0x1cf')});db[_0xb593('0xb2')][_0xb593('0x113')](db[_0xb593('0xb2')],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0xb2')][_0xb593('0x113')](db['ZohoField'],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db['ZohoField'][_0xb593('0x113')](db[_0xb593('0xb2')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xb2')]['belongsTo'](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':_0xb593('0x1d9')});db['ZendeskAccount'][_0xb593('0x113')](db[_0xb593('0x1df')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':'AccountId'});db[_0xb593('0x1df')]['hasMany'](db[_0xb593('0xb7')],{'as':_0xb593('0x1d8'),'foreignKey':_0xb593('0x1d0')});db['ZendeskConfiguration']['hasMany'](db['ZendeskField'],{'as':_0xb593('0x1d1'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0x1df')][_0xb593('0x113')](db[_0xb593('0xb7')],{'as':'Fields','foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1df')]['belongsTo'](db[_0xb593('0xb4')],{'as':_0xb593('0x17b'),'foreignKey':'AccountId'});db['ZendeskConfiguration'][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':_0xb593('0x1e0')});db[_0xb593('0xb7')][_0xb593('0x113')](db[_0xb593('0xb7')],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0xb7')][_0xb593('0x113')](db[_0xb593('0xb7')],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db['ZendeskField']['hasMany'](db[_0xb593('0xb7')],{'as':'Field','foreignKey':_0xb593('0x1d3')});db[_0xb593('0xb7')][_0xb593('0x123')](db[_0xb593('0x98')],{'as':'Variable','foreignKey':_0xb593('0x1d9')});db['FreshdeskAccount'][_0xb593('0x113')](db[_0xb593('0x1e1')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':'AccountId'});db[_0xb593('0x1e1')]['hasMany'](db[_0xb593('0xba')],{'as':_0xb593('0x1d8'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0x1e1')]['hasMany'](db[_0xb593('0xba')],{'as':_0xb593('0x1d1'),'onDelete':'cascade','foreignKey':_0xb593('0x1d2')});db[_0xb593('0x1e1')]['hasMany'](db[_0xb593('0xba')],{'as':_0xb593('0x1cb'),'onDelete':'cascade','foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1e1')]['belongsTo'](db['FreshdeskAccount'],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x1cf')});db['FreshdeskConfiguration'][_0xb593('0x12c')](db['Tag'],{'through':_0xb593('0x1e2')});db[_0xb593('0xba')][_0xb593('0x113')](db[_0xb593('0xba')],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0xba')][_0xb593('0x113')](db[_0xb593('0xba')],{'as':_0xb593('0x1d5'),'foreignKey':'DescriptionId'});db[_0xb593('0xba')][_0xb593('0x113')](db[_0xb593('0xba')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xba')][_0xb593('0x123')](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':_0xb593('0x1d9')});db[_0xb593('0xbc')][_0xb593('0x113')](db[_0xb593('0x1e3')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1e3')][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':_0xb593('0x1d8'),'foreignKey':'SubjectId'});db[_0xb593('0x1e3')][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':_0xb593('0x1d1'),'foreignKey':'DescriptionId'});db[_0xb593('0x1e3')][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':'Fields','foreignKey':_0xb593('0x1d3')});db['VtigerConfiguration'][_0xb593('0x123')](db[_0xb593('0xbc')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0xbf')][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':'Subject','foreignKey':_0xb593('0x1d0')});db['VtigerField'][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xbf')][_0xb593('0x113')](db[_0xb593('0xbf')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xbf')]['belongsTo'](db['Variable'],{'as':'Variable','foreignKey':_0xb593('0x1d9')});db[_0xb593('0xc1')][_0xb593('0x113')](db[_0xb593('0x1e4')],{'as':_0xb593('0x1ce'),'onDelete':'cascade','foreignKey':'AccountId'});db['ServicenowConfiguration'][_0xb593('0x113')](db[_0xb593('0x1e5')],{'as':'Subjects','foreignKey':_0xb593('0x1d0')});db[_0xb593('0x1e4')][_0xb593('0x113')](db[_0xb593('0x1e5')],{'as':_0xb593('0x1d1'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0x1e4')][_0xb593('0x113')](db[_0xb593('0x1e5')],{'as':'Fields','foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1e4')]['belongsTo'](db[_0xb593('0xc1')],{'as':_0xb593('0x17b'),'foreignKey':'AccountId'});db[_0xb593('0x1e5')]['hasMany'](db[_0xb593('0x1e5')],{'as':'Subject','foreignKey':'SubjectId'});db[_0xb593('0x1e5')][_0xb593('0x113')](db[_0xb593('0x1e5')],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0x1e5')]['hasMany'](db[_0xb593('0x1e5')],{'as':'Field','foreignKey':_0xb593('0x1d3')});db[_0xb593('0x1e5')]['belongsTo'](db['Variable'],{'as':'Variable','foreignKey':_0xb593('0x1d9')});db[_0xb593('0x1e6')][_0xb593('0x113')](db[_0xb593('0xc6')],{'as':_0xb593('0x1ce'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db['Dynamics365Account']['belongsTo'](db['CloudProvider'],{'as':_0xb593('0x107'),'foreignKey':_0xb593('0x16e')});db[_0xb593('0xc6')][_0xb593('0x113')](db[_0xb593('0xc8')],{'as':_0xb593('0x1d8'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d0')});db['Dynamics365Configuration'][_0xb593('0x113')](db[_0xb593('0xc8')],{'as':_0xb593('0x1d1'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xc6')][_0xb593('0x113')](db[_0xb593('0xc8')],{'as':_0xb593('0x1cb'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xc6')]['belongsTo'](db[_0xb593('0x1e6')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0xc8')][_0xb593('0x113')](db['Dynamics365Field'],{'as':_0xb593('0x1d4'),'foreignKey':_0xb593('0x1d0')});db[_0xb593('0xc8')]['hasMany'](db['Dynamics365Field'],{'as':_0xb593('0x1d5'),'foreignKey':_0xb593('0x1d2')});db[_0xb593('0xc8')][_0xb593('0x113')](db[_0xb593('0xc8')],{'as':_0xb593('0x1d6'),'foreignKey':_0xb593('0x1d3')});db[_0xb593('0xc8')][_0xb593('0x123')](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':_0xb593('0x1d9')});db[_0xb593('0xca')][_0xb593('0x113')](db[_0xb593('0x1e7')],{'as':'Configurations','onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1cf')});db[_0xb593('0x1e7')][_0xb593('0x113')](db[_0xb593('0x1e8')],{'as':_0xb593('0x1d8'),'foreignKey':_0xb593('0x1d0')});db['FreshsalesConfiguration'][_0xb593('0x113')](db[_0xb593('0x1e8')],{'as':_0xb593('0x1d1'),'foreignKey':'DescriptionId'});db[_0xb593('0x1e7')]['hasMany'](db['FreshsalesField'],{'as':_0xb593('0x1cb'),'foreignKey':_0xb593('0x1d3')});db['FreshsalesConfiguration']['belongsTo'](db[_0xb593('0xca')],{'as':_0xb593('0x17b'),'foreignKey':'AccountId'});db[_0xb593('0x1e8')][_0xb593('0x113')](db[_0xb593('0x1e8')],{'as':'Subject','foreignKey':_0xb593('0x1d0')});db[_0xb593('0x1e8')][_0xb593('0x113')](db['FreshsalesField'],{'as':'Description','foreignKey':'DescriptionId'});db['FreshsalesField'][_0xb593('0x113')](db[_0xb593('0x1e8')],{'as':_0xb593('0x1d6'),'foreignKey':'FieldId'});db['FreshsalesField'][_0xb593('0x123')](db[_0xb593('0x98')],{'as':_0xb593('0x98'),'foreignKey':_0xb593('0x1d9')});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0x13d')],{});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':_0xb593('0x176'),'foreignKey':_0xb593('0x191')});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':'ContactId'});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0x64')],{});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0x66')],{});db['ChatQueueReport'][_0xb593('0x123')](db[_0xb593('0x10f')],{});db[_0xb593('0xd0')][_0xb593('0x123')](db[_0xb593('0x6a')],{});db[_0xb593('0xd2')][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x1e9')});db[_0xb593('0xd2')][_0xb593('0x123')](db['User'],{'onDelete':'cascade','foreignKey':'ToId'});db[_0xb593('0x155')]['hasMany'](db[_0xb593('0xd5')],{'foreignKey':_0xb593('0x1ea'),'onDelete':_0xb593('0x110')});db[_0xb593('0x155')][_0xb593('0x113')](db[_0xb593('0xd4')],{'foreignKey':_0xb593('0x1ea'),'onDelete':'cascade'});db[_0xb593('0xd8')][_0xb593('0x123')](db[_0xb593('0x50')],{});db[_0xb593('0xd8')][_0xb593('0x123')](db['CmList'],{'as':'List','foreignKey':'ListId'});db[_0xb593('0xd8')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0xd8')][_0xb593('0x123')](db[_0xb593('0x53')],{});db[_0xb593('0xd8')]['belongsTo'](db[_0xb593('0x190')],{});db['SmsQueueReport'][_0xb593('0x123')](db[_0xb593('0x10f')],{});db[_0xb593('0xd8')][_0xb593('0x123')](db['SmsQueue'],{});db['JscriptyProject'][_0xb593('0x113')](db[_0xb593('0x155')],{'foreignKey':_0xb593('0x1eb')});db['JscriptyProject'][_0xb593('0x113')](db[_0xb593('0xd5')],{'foreignKey':_0xb593('0x1eb')});db['JscriptyProject'][_0xb593('0x113')](db[_0xb593('0xd4')],{'foreignKey':_0xb593('0x1eb')});db[_0xb593('0xe2')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x180'),'through':'user_has_square_projects'});db[_0xb593('0xe6')]['belongsToMany'](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x12b')});db['Team']['belongsToMany'](db['VoiceQueue'],{'through':'TeamVoiceQueue','as':_0xb593('0x133')});db[_0xb593('0xe6')][_0xb593('0x12c')](db['MailQueue'],{'through':'team_has_mail_queues','as':_0xb593('0x1ec')});db[_0xb593('0xe6')]['belongsToMany'](db[_0xb593('0x6a')],{'through':'team_has_chat_queues','as':'ChatQueues'});db['Team'][_0xb593('0x12c')](db[_0xb593('0x4d')],{'through':_0xb593('0x1ed'),'as':_0xb593('0x1ee')});db['Team']['belongsToMany'](db['SmsQueue'],{'through':_0xb593('0x196'),'as':'SmsQueues'});db[_0xb593('0xe6')][_0xb593('0x12c')](db[_0xb593('0x5d')],{'through':_0xb593('0x19d'),'as':'OpenchannelQueues'});db[_0xb593('0xe6')][_0xb593('0x12c')](db[_0xb593('0x105')],{'through':'team_has_whatsapp_queues','as':_0xb593('0x13c')});db['Team']['belongsToMany'](db[_0xb593('0x135')],{'through':_0xb593('0x109'),'as':_0xb593('0x136')});db[_0xb593('0xe9')]['hasMany'](db[_0xb593('0x151')],{'as':_0xb593('0x152'),'foreignKey':_0xb593('0x1af')});db['Campaign']['hasMany'](db[_0xb593('0x75')],{'as':_0xb593('0x117'),'foreignKey':_0xb593('0x1af')});db[_0xb593('0xe9')][_0xb593('0x113')](db[_0xb593('0x77')],{'as':_0xb593('0x153'),'foreignKey':_0xb593('0x1af')});db['Campaign']['hasMany'](db['CmHopperBlack'],{'as':_0xb593('0x154'),'foreignKey':_0xb593('0x1af')});db[_0xb593('0xe9')][_0xb593('0x123')](db['Trunk'],{'as':_0xb593('0x157'),'foreignKey':_0xb593('0x158')});db[_0xb593('0xe9')][_0xb593('0x123')](db['Trunk'],{'as':'TrunkBackup','foreignKey':_0xb593('0x15a')});db['Campaign'][_0xb593('0x123')](db['Interval'],{'as':'Interval','foreignKey':'IntervalId'});db[_0xb593('0xe9')]['belongsTo'](db[_0xb593('0xe2')],{'as':_0xb593('0xe2'),'foreignKey':_0xb593('0x1ef')});db[_0xb593('0xe9')][_0xb593('0x12c')](db[_0xb593('0xf6')],{'as':_0xb593('0x129'),'through':_0xb593('0x1f0')});db[_0xb593('0xe9')][_0xb593('0x12c')](db['CmList'],{'as':_0xb593('0x162'),'through':'campaigns_has_cm_blacklists'});db[_0xb593('0xeb')]['belongsTo'](db[_0xb593('0x68')],{'as':_0xb593('0x68'),'foreignKey':_0xb593('0x184')});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x174')],{});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x3f')],{});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x3a')],{'foreignKey':'FromMailAccountId','as':'FromAccount'});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f1'),'as':_0xb593('0x1f2')});db[_0xb593('0xee')][_0xb593('0x123')](db['User'],{'foreignKey':_0xb593('0x1f3'),'as':_0xb593('0x1f4')});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x3c')],{'foreignKey':'ToMailQueueId','as':'ToQueue'});db[_0xb593('0xee')][_0xb593('0x123')](db[_0xb593('0x3a')],{'foreignKey':_0xb593('0x1f5'),'as':_0xb593('0x1f6')});db['ChatTransferReport'][_0xb593('0x123')](db['ChatMessage'],{});db[_0xb593('0xef')][_0xb593('0x123')](db[_0xb593('0x64')],{});db['ChatTransferReport'][_0xb593('0x123')](db[_0xb593('0x13d')],{'foreignKey':_0xb593('0x1f7'),'as':_0xb593('0x1f8')});db[_0xb593('0xef')][_0xb593('0x123')](db['User'],{'foreignKey':_0xb593('0x1f1'),'as':'FromAgent'});db[_0xb593('0xef')]['belongsTo'](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f3'),'as':_0xb593('0x1f4')});db[_0xb593('0xef')][_0xb593('0x123')](db['ChatQueue'],{'foreignKey':_0xb593('0x1f9'),'as':_0xb593('0x1fa')});db[_0xb593('0xef')][_0xb593('0x123')](db[_0xb593('0x13d')],{'foreignKey':_0xb593('0x1fb'),'as':'ToAccount'});db[_0xb593('0xf1')][_0xb593('0x123')](db['FaxMessage'],{});db[_0xb593('0xf1')]['belongsTo'](db['FaxInteraction'],{});db['FaxTransferReport'][_0xb593('0x123')](db[_0xb593('0x47')],{'foreignKey':'FromFaxAccountId','as':'FromAccount'});db[_0xb593('0xf1')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f1'),'as':_0xb593('0x1f2')});db[_0xb593('0xf1')]['belongsTo'](db[_0xb593('0x10f')],{'foreignKey':'ToUserId','as':_0xb593('0x1f4')});db['FaxTransferReport']['belongsTo'](db[_0xb593('0x4d')],{'foreignKey':_0xb593('0x1fc'),'as':_0xb593('0x1fa')});db[_0xb593('0xf1')][_0xb593('0x123')](db[_0xb593('0x47')],{'foreignKey':_0xb593('0x1fd'),'as':_0xb593('0x1f6')});db[_0xb593('0xf2')][_0xb593('0x123')](db[_0xb593('0x5b')],{});db[_0xb593('0xf2')][_0xb593('0x123')](db['OpenchannelInteraction'],{});db[_0xb593('0xf2')][_0xb593('0x123')](db['OpenchannelAccount'],{'foreignKey':_0xb593('0x1fe'),'as':'FromAccount'});db[_0xb593('0xf2')][_0xb593('0x123')](db['User'],{'foreignKey':_0xb593('0x1f1'),'as':_0xb593('0x1f2')});db[_0xb593('0xf2')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f3'),'as':_0xb593('0x1f4')});db['OpenchannelTransferReport']['belongsTo'](db[_0xb593('0x5d')],{'foreignKey':_0xb593('0x1ff'),'as':'ToQueue'});db[_0xb593('0xf2')]['belongsTo'](db[_0xb593('0x57')],{'foreignKey':_0xb593('0x200'),'as':_0xb593('0x1f6')});db[_0xb593('0xf4')]['belongsTo'](db['SmsMessage'],{});db[_0xb593('0xf4')]['belongsTo'](db[_0xb593('0x53')],{});db[_0xb593('0xf4')][_0xb593('0x123')](db['SmsAccount'],{'foreignKey':_0xb593('0x201'),'as':_0xb593('0x1f8')});db[_0xb593('0xf4')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f1'),'as':_0xb593('0x1f2')});db[_0xb593('0xf4')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f3'),'as':_0xb593('0x1f4')});db[_0xb593('0xf4')][_0xb593('0x123')](db[_0xb593('0x139')],{'foreignKey':_0xb593('0x202'),'as':_0xb593('0x1fa')});db[_0xb593('0xf4')][_0xb593('0x123')](db[_0xb593('0x50')],{'foreignKey':_0xb593('0x203'),'as':_0xb593('0x1f6')});db[_0xb593('0xf6')][_0xb593('0x113')](db['Disposition'],{'as':_0xb593('0x172'),'foreignKey':_0xb593('0x191'),'onDelete':_0xb593('0x110')});db[_0xb593('0xf6')][_0xb593('0x113')](db[_0xb593('0x7a')],{'as':'CustomFields','foreignKey':_0xb593('0x191')});db[_0xb593('0xf6')]['hasMany'](db[_0xb593('0x72')],{'as':'Contacts','onDelete':'cascade','foreignKey':'ListId'});db[_0xb593('0xf6')]['hasMany'](db[_0xb593('0x75')],{'as':_0xb593('0x117'),'foreignKey':_0xb593('0x191')});db['CmList'][_0xb593('0x113')](db[_0xb593('0x77')],{'as':'HopperHistory','foreignKey':_0xb593('0x191')});db[_0xb593('0xf6')][_0xb593('0x113')](db[_0xb593('0x119')],{'as':_0xb593('0x119'),'foreignKey':_0xb593('0x191')});db['CmList'][_0xb593('0x12c')](db[_0xb593('0x132')],{'as':_0xb593('0x204'),'through':_0xb593('0x15f')});db[_0xb593('0xf6')][_0xb593('0x12c')](db['User'],{'as':_0xb593('0x160'),'through':_0xb593('0x12a')});db['VoicePrefix'][_0xb593('0x113')](db[_0xb593('0x16')],{'as':_0xb593('0x116'),'onDelete':_0xb593('0x110')});db[_0xb593('0x135')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x10b')});db['VoicePrefix']['belongsToMany'](db[_0xb593('0xe6')],{'through':_0xb593('0x109'),'as':'Teams'});db[_0xb593('0xf8')]['hasMany'](db[_0xb593('0x10f')],{'as':_0xb593('0x180'),'foreignKey':_0xb593('0x124')});db[_0xb593('0xf8')][_0xb593('0x113')](db[_0xb593('0x205')],{'as':'UserProfileSections','foreignKey':_0xb593('0x124'),'onDelete':'cascade'});db[_0xb593('0x205')][_0xb593('0x113')](db[_0xb593('0xfa')],{'as':_0xb593('0x206'),'foreignKey':_0xb593('0x207'),'onDelete':_0xb593('0x110')});db['WhatsappAccount'][_0xb593('0x113')](db[_0xb593('0x81')],{'as':_0xb593('0x172'),'foreignKey':_0xb593('0x208'),'onDelete':_0xb593('0x110')});db[_0xb593('0xfc')][_0xb593('0x113')](db[_0xb593('0x7f')],{'as':_0xb593('0x173'),'foreignKey':_0xb593('0x208')});db[_0xb593('0xfc')]['hasMany'](db[_0xb593('0x209')],{'as':'Messages','foreignKey':'WhatsappAccountId'});db[_0xb593('0xfc')][_0xb593('0x113')](db['WhatsappInteraction'],{'as':_0xb593('0x175')});db[_0xb593('0xfc')]['hasMany'](db[_0xb593('0xfe')],{'as':_0xb593('0x14c')});db[_0xb593('0xfc')]['belongsTo'](db['CmList'],{'as':_0xb593('0x176'),'foreignKey':_0xb593('0x191')});db[_0xb593('0xfc')][_0xb593('0x123')](db[_0xb593('0x15d')],{'as':_0xb593('0x15e'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xb593('0xfc')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':'Agents','through':_0xb593('0x147')});db['WhatsappApplication'][_0xb593('0x123')](db[_0xb593('0x10f')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0xfe')][_0xb593('0x123')](db[_0xb593('0x105')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0xfe')][_0xb593('0x123')](db[_0xb593('0xfc')],{'onDelete':_0xb593('0x16c')});db[_0xb593('0xfe')][_0xb593('0x123')](db['Interval'],{'onDelete':'restrict','foreignKey':_0xb593('0x15c')});db[_0xb593('0xfe')][_0xb593('0x123')](db[_0xb593('0x8e')],{'onDelete':_0xb593('0x16c'),'foreignKey':_0xb593('0x185')});db[_0xb593('0x100')][_0xb593('0x113')](db[_0xb593('0x209')],{'as':_0xb593('0x165'),'onDelete':_0xb593('0x110'),'foreignKey':_0xb593('0x20a')});db[_0xb593('0x100')][_0xb593('0x123')](db[_0xb593('0xfc')],{'as':_0xb593('0x17b'),'foreignKey':_0xb593('0x208')});db[_0xb593('0x100')][_0xb593('0x123')](db['CmContact'],{'as':_0xb593('0x169'),'foreignKey':'ContactId'});db[_0xb593('0x100')][_0xb593('0x123')](db['User'],{'as':_0xb593('0x17c'),'foreignKey':_0xb593('0x111')});db[_0xb593('0x100')][_0xb593('0x12c')](db[_0xb593('0x8e')],{'through':'whatsapp_interaction_has_tags','as':'Tags'});db['WhatsappInteraction']['belongsToMany'](db['Tag'],{'through':'whatsapp_interaction_has_tags','as':_0xb593('0x17f')});db[_0xb593('0x100')]['belongsToMany'](db['User'],{'as':_0xb593('0x180'),'through':'user_has_whatsapp_interactions','foreignKey':_0xb593('0x20a')});db['WhatsappMessage']['belongsTo'](db[_0xb593('0x10f')],{'as':_0xb593('0x10f')});db[_0xb593('0x209')][_0xb593('0x123')](db['CmContact'],{'onDelete':_0xb593('0x110'),'as':_0xb593('0x169')});db[_0xb593('0x209')]['belongsTo'](db['WhatsappInteraction'],{'onDelete':_0xb593('0x110'),'as':'Interaction','foreignKey':_0xb593('0x20a')});db['WhatsappMessage'][_0xb593('0x123')](db[_0xb593('0xfc')],{'as':_0xb593('0x17b'),'foreignKey':'WhatsappAccountId'});db[_0xb593('0x102')][_0xb593('0x123')](db[_0xb593('0xfc')],{});db[_0xb593('0x102')][_0xb593('0x123')](db[_0xb593('0xf6')],{'as':'List','foreignKey':_0xb593('0x191')});db[_0xb593('0x102')][_0xb593('0x123')](db[_0xb593('0x72')],{'as':_0xb593('0x169'),'foreignKey':_0xb593('0x16a')});db[_0xb593('0x102')]['belongsTo'](db[_0xb593('0x100')],{});db[_0xb593('0x102')][_0xb593('0x123')](db[_0xb593('0x105')],{});db['WhatsappQueueReport'][_0xb593('0x123')](db['WhatsappMessage'],{});db['WhatsappQueueReport'][_0xb593('0x123')](db[_0xb593('0x10f')],{});db[_0xb593('0x104')]['belongsTo'](db['WhatsappMessage'],{});db['WhatsappTransferReport'][_0xb593('0x123')](db[_0xb593('0x100')],{});db['WhatsappTransferReport']['belongsTo'](db[_0xb593('0xfc')],{'foreignKey':_0xb593('0x20b'),'as':_0xb593('0x1f8')});db[_0xb593('0x104')][_0xb593('0x123')](db[_0xb593('0xfc')],{'foreignKey':_0xb593('0x20c'),'as':_0xb593('0x1f6')});db['WhatsappTransferReport']['belongsTo'](db[_0xb593('0x105')],{'foreignKey':_0xb593('0x20d'),'as':_0xb593('0x1fa')});db['WhatsappTransferReport'][_0xb593('0x123')](db['User'],{'foreignKey':_0xb593('0x1f1'),'as':_0xb593('0x1f2')});db[_0xb593('0x104')][_0xb593('0x123')](db[_0xb593('0x10f')],{'foreignKey':_0xb593('0x1f3'),'as':'ToAgent'});db[_0xb593('0x105')][_0xb593('0x12c')](db[_0xb593('0x10f')],{'as':_0xb593('0x160'),'through':_0xb593('0x35'),'foreignKey':_0xb593('0x20e')});db[_0xb593('0x105')][_0xb593('0x12c')](db[_0xb593('0xe6')],{'through':'team_has_whatsapp_queues','as':_0xb593('0x161')});db[_0xb593('0x10d')][_0xb593('0x123')](db[_0xb593('0x10f')],{'as':'user','foreignKey':_0xb593('0x111'),'onDelete':_0xb593('0x110'),'hooks':!![]});db[_0xb593('0x107')][_0xb593('0x170')](db[_0xb593('0x1e6')],{'as':_0xb593('0x1e6'),'onDelete':_0xb593('0x16c')});db[_0xb593('0x107')][_0xb593('0x170')](db[_0xb593('0x37')],{'as':'Imap','onDelete':_0xb593('0x16c')});db[_0xb593('0x107')][_0xb593('0x170')](db['MailServerOut'],{'as':_0xb593('0x171'),'onDelete':_0xb593('0x16c')});module[_0xb593('0x20f')]={'db':db,'dbH':dbH};