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