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