1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xcbed=['now','@xcally.com','CmContact','destroy','bulkCreate','finished\x20populating','CmHopper','then','contacts2','log','hopper2','util','../mysqldb','push','Innocenzo','Biondo','innocenzo.biondo'];(function(_0x903228,_0x42c429){var _0xcec81d=function(_0x4da97a){while(--_0x4da97a){_0x903228['push'](_0x903228['shift']());}};_0xcec81d(++_0x42c429);}(_0xcbed,0x14e));var _0xdcbe=function(_0x3946df,_0x476eed){_0x3946df=_0x3946df-0x0;var _0x3b1daf=_0xcbed[_0x3946df];return _0x3b1daf;};'use strict';var util=require(_0xdcbe('0x0'));var db=require(_0xdcbe('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0xdcbe('0x2')]({'id':i,'firstName':_0xdcbe('0x3')+i,'lastName':_0xdcbe('0x4')+i,'phone':0xf879fb460+i,'email':_0xdcbe('0x5')+i+'@xcally.com'});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date[_0xdcbe('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xdcbe('0x6')](),'updatedAt':Date[_0xdcbe('0x6')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0xdcbe('0x2')]({'id':i,'firstName':_0xdcbe('0x3')+i,'lastName':_0xdcbe('0x4')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+_0xdcbe('0x7')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0xdcbe('0x2')]({'id':i,'active':![],'scheduledat':Date[_0xdcbe('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xdcbe('0x6')](),'updatedAt':Date[_0xdcbe('0x6')]()});}db[_0xdcbe('0x8')][_0xdcbe('0x9')]({'where':{}})['then'](function(){return db['CmContact'][_0xdcbe('0xa')](contacts);})['then'](function(){console['log'](_0xdcbe('0xb'),'contacts1');return db[_0xdcbe('0xc')][_0xdcbe('0x9')]({'where':{}});})[_0xdcbe('0xd')](function(){return db[_0xdcbe('0xc')][_0xdcbe('0xa')](hopper);})[_0xdcbe('0xd')](function(){console['log'](_0xdcbe('0xb'),'hopper1');return db[_0xdcbe('0x8')][_0xdcbe('0xa')](contacts2);})[_0xdcbe('0xd')](function(){console['log'](_0xdcbe('0xb'),_0xdcbe('0xe'));return db['CmHopper'][_0xdcbe('0xa')](hopper2);})['then'](function(){console[_0xdcbe('0xf')]('finished\x20populating',_0xdcbe('0x10'));})['catch'](function(_0x7f718c){console[_0xdcbe('0xf')](_0x7f718c);});