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