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