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 _0x93cf=['now','CmContact','bulkCreate','log','contacts1','CmHopper','then','hopper1','contacts2','finished\x20populating','hopper2','catch','util','../mysqldb','push','Innocenzo','Biondo','innocenzo.biondo','@xcally.com'];(function(_0x139493,_0x413d17){var _0x20c519=function(_0x1235a9){while(--_0x1235a9){_0x139493['push'](_0x139493['shift']());}};_0x20c519(++_0x413d17);}(_0x93cf,0x19b));var _0xf93c=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x93cf[_0xa1e3e3];return _0xc980e9;};'use strict';var util=require(_0xf93c('0x0'));var db=require(_0xf93c('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0xf93c('0x2')]({'id':i,'firstName':_0xf93c('0x3')+i,'lastName':_0xf93c('0x4')+i,'phone':0xf879fb460+i,'email':_0xf93c('0x5')+i+_0xf93c('0x6')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0xf93c('0x2')]({'id':i,'active':![],'scheduledat':Date[_0xf93c('0x7')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xf93c('0x7')](),'updatedAt':Date[_0xf93c('0x7')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0xf93c('0x2')]({'id':i,'firstName':_0xf93c('0x3')+i,'lastName':'Biondo'+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+_0xf93c('0x6')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2['push']({'id':i,'active':![],'scheduledat':Date[_0xf93c('0x7')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xf93c('0x7')](),'updatedAt':Date[_0xf93c('0x7')]()});}db[_0xf93c('0x8')]['destroy']({'where':{}})['then'](function(){return db[_0xf93c('0x8')][_0xf93c('0x9')](contacts);})['then'](function(){console[_0xf93c('0xa')]('finished\x20populating',_0xf93c('0xb'));return db[_0xf93c('0xc')]['destroy']({'where':{}});})[_0xf93c('0xd')](function(){return db[_0xf93c('0xc')][_0xf93c('0x9')](hopper);})[_0xf93c('0xd')](function(){console['log']('finished\x20populating',_0xf93c('0xe'));return db[_0xf93c('0x8')][_0xf93c('0x9')](contacts2);})[_0xf93c('0xd')](function(){console[_0xf93c('0xa')]('finished\x20populating',_0xf93c('0xf'));return db[_0xf93c('0xc')][_0xf93c('0x9')](hopper2);})[_0xf93c('0xd')](function(){console[_0xf93c('0xa')](_0xf93c('0x10'),_0xf93c('0x11'));})[_0xf93c('0x12')](function(_0x27e0c6){console[_0xf93c('0xa')](_0x27e0c6);});