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