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