Built motion from commit (unavailable).|2.2.2
[motion2.git] / server / api / squareReport / squareReport.controller.js
index c18ea2f..4e3efa3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3529=['sendStatus','status','json','offset','set','Content-Range','apply','reject','save','update','destroy','end','error','stack','name','send','index','SquareReport','rawAttributes','model','keys','query','dateStart','dateEnd','intersection','attributes','fields','length','hasOwnProperty','limit','sort','where','filters','pick','day','add','merge','filter','map','type','key','VIRTUAL','field','options','count','then','includeAll','include','findAll','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','querystring','papaparse','ioredis','../../config/logger','api','../../config/utils','../../mysqldb'];(function(_0x4bde2a,_0x2430cf){var _0x5e581f=function(_0x207315){while(--_0x207315){_0x4bde2a['push'](_0x4bde2a['shift']());}};_0x5e581f(++_0x2430cf);}(_0x3529,0xd4));var _0x9352=function(_0x3311ae,_0x362cee){_0x3311ae=_0x3311ae-0x0;var _0x107949=_0x3529[_0x3311ae];return _0x107949;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x9352('0x0'));var rimraf=require(_0x9352('0x1'));var zipdir=require(_0x9352('0x2'));var jsonpatch=require(_0x9352('0x3'));var rp=require(_0x9352('0x4'));var moment=require(_0x9352('0x5'));var BPromise=require(_0x9352('0x6'));var Mustache=require(_0x9352('0x7'));var util=require(_0x9352('0x8'));var path=require(_0x9352('0x9'));var sox=require(_0x9352('0xa'));var csv=require(_0x9352('0xb'));var ejs=require(_0x9352('0xc'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x9352('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x9352('0xe'));var toCsv=require(_0x9352('0xb'));var querystring=require(_0x9352('0xf'));var Papa=require(_0x9352('0x10'));var Redis=require(_0x9352('0x11'));var qs=require('../../components/parsers/qs');var logger=require(_0x9352('0x12'))(_0x9352('0x13'));var utils=require(_0x9352('0x14'));var config=require('../../config/environment');var db=require(_0x9352('0x15'))['db'];function respondWithStatusCode(_0x57fa75,_0x3d55ac){_0x3d55ac=_0x3d55ac||0xcc;return function(_0x29f8c1){if(_0x29f8c1){return _0x57fa75[_0x9352('0x16')](_0x3d55ac);}return _0x57fa75[_0x9352('0x17')](_0x3d55ac)['end']();};}function respondWithResult(_0x15c35d,_0x3cef14){_0x3cef14=_0x3cef14||0xc8;return function(_0x16d6de){if(_0x16d6de){return _0x15c35d['status'](_0x3cef14)[_0x9352('0x18')](_0x16d6de);}};}function respondWithFilteredResult(_0x35a5ed,_0x579985){return function(_0x464ab5){if(_0x464ab5){var _0x9c7739=_0x464ab5['count'],_0x26fd10=_0x579985[_0x9352('0x19')],_0x10dd25=_0x579985['offset']+_0x579985['limit'],_0x36f983;if(_0x10dd25>=_0x9c7739){_0x10dd25=_0x9c7739;_0x36f983=0xc8;}else{_0x36f983=0xce;}_0x35a5ed['status'](_0x36f983);return _0x35a5ed[_0x9352('0x1a')](_0x9352('0x1b'),_0x26fd10+'-'+_0x10dd25+'/'+_0x9c7739)[_0x9352('0x18')](_0x464ab5);}return null;};}function patchUpdates(_0x1568d3){return function(_0x37755b){try{jsonpatch[_0x9352('0x1c')](_0x37755b,_0x1568d3,!![]);}catch(_0x4462fe){return BPromise[_0x9352('0x1d')](_0x4462fe);}return _0x37755b[_0x9352('0x1e')]();};}function saveUpdates(_0xdb704,_0x3932f4){return function(_0x2e7196){if(_0x2e7196){return _0x2e7196[_0x9352('0x1f')](_0xdb704)['then'](function(_0x5aa4c4){return _0x5aa4c4;});}return null;};}function removeEntity(_0x53d151,_0x4ff596){return function(_0x180a5a){if(_0x180a5a){return _0x180a5a[_0x9352('0x20')]()['then'](function(){_0x53d151[_0x9352('0x17')](0xcc)[_0x9352('0x21')]();});}};}function handleEntityNotFound(_0x538135,_0x123ab8){return function(_0x5506eb){if(!_0x5506eb){_0x538135[_0x9352('0x16')](0x194);}return _0x5506eb;};}function handleError(_0x319fdd,_0x298b4a){_0x298b4a=_0x298b4a||0x1f4;return function(_0x23058a){logger[_0x9352('0x22')](_0x23058a[_0x9352('0x23')]);if(_0x23058a['name']){delete _0x23058a[_0x9352('0x24')];}_0x319fdd[_0x9352('0x17')](_0x298b4a)[_0x9352('0x25')](_0x23058a);};}exports[_0x9352('0x26')]=function(_0x32e744,_0x433f56){var _0x358c81={},_0x21baaa={},_0x3c3deb={'count':0x0,'rows':[]};var _0x593e5d=db[_0x9352('0x27')][_0x9352('0x28')];_0x21baaa[_0x9352('0x29')]=_[_0x9352('0x2a')](_0x593e5d);var _0x77b463={'dateStart':_0x32e744[_0x9352('0x2b')][_0x9352('0x2c')],'dateEnd':_0x32e744[_0x9352('0x2b')]['dateEnd']};delete _0x32e744['query'][_0x9352('0x2c')];delete _0x32e744[_0x9352('0x2b')][_0x9352('0x2d')];_0x21baaa[_0x9352('0x2b')]=_[_0x9352('0x2a')](_0x32e744['query']);_0x21baaa['filters']=_[_0x9352('0x2e')](_0x21baaa[_0x9352('0x29')],_0x21baaa[_0x9352('0x2b')]);_0x358c81[_0x9352('0x2f')]=_[_0x9352('0x2e')](_0x21baaa['model'],qs[_0x9352('0x30')](_0x32e744[_0x9352('0x2b')][_0x9352('0x30')]));_0x358c81['attributes']=_0x358c81[_0x9352('0x2f')][_0x9352('0x31')]?_0x358c81[_0x9352('0x2f')]:_0x21baaa[_0x9352('0x29')];if(!_0x32e744[_0x9352('0x2b')][_0x9352('0x32')]('nolimit')){_0x358c81[_0x9352('0x33')]=qs[_0x9352('0x33')](_0x32e744[_0x9352('0x2b')][_0x9352('0x33')]);_0x358c81[_0x9352('0x19')]=qs[_0x9352('0x19')](_0x32e744['query']['offset']);}_0x358c81['order']=qs[_0x9352('0x34')](_0x32e744[_0x9352('0x2b')][_0x9352('0x34')]);_0x358c81[_0x9352('0x35')]=qs[_0x9352('0x36')](_[_0x9352('0x37')](_0x32e744[_0x9352('0x2b')],_0x21baaa['filters']));if(_0x77b463[_0x9352('0x2c')]){if(_0x77b463['dateEnd']){_0x77b463[_0x9352('0x2d')]=moment(_0x77b463[_0x9352('0x2d')])['add'](0x1,_0x9352('0x38'));}else{_0x77b463['dateEnd']=moment(_0x77b463['dateStart'])[_0x9352('0x39')](0x1,_0x9352('0x38'));}_[_0x9352('0x3a')](_0x358c81[_0x9352('0x35')],{'createdAt':{'$gte':_0x77b463[_0x9352('0x2c')],'$lte':_0x77b463['dateEnd']}});}if(_0x32e744['query'][_0x9352('0x3b')]){_0x358c81[_0x9352('0x35')]=_[_0x9352('0x3a')](_0x358c81[_0x9352('0x35')],{'$or':_[_0x9352('0x3c')](_0x593e5d,function(_0x5067a2){if(_0x5067a2[_0x9352('0x3d')][_0x9352('0x3e')]!==_0x9352('0x3f')){var _0xd9b707={};_0xd9b707[_0x5067a2[_0x9352('0x40')]]={'$like':'%'+_0x32e744[_0x9352('0x2b')][_0x9352('0x3b')]+'%'};return _0xd9b707;}})});}_0x358c81=_[_0x9352('0x3a')]({},_0x358c81,_0x32e744[_0x9352('0x41')]);var _0x1258ba={'where':_0x358c81[_0x9352('0x35')]};return db[_0x9352('0x27')][_0x9352('0x42')](_0x1258ba)[_0x9352('0x43')](function(_0x4562ab){_0x3c3deb[_0x9352('0x42')]=_0x4562ab;if(_0x32e744['query'][_0x9352('0x44')]){_0x358c81[_0x9352('0x45')]=[{'all':!![]}];}return db['SquareReport'][_0x9352('0x46')](_0x358c81);})[_0x9352('0x43')](function(_0x18acf3){_0x3c3deb['rows']=_0x18acf3;return _0x3c3deb;})['then'](respondWithFilteredResult(_0x433f56,_0x358c81))[_0x9352('0x47')](handleError(_0x433f56,null));};exports[_0x9352('0x48')]=function(_0x562561,_0x22d58d){var _0x95e6c1={'raw':!![],'where':{'id':_0x562561[_0x9352('0x49')]['id']}},_0x65c998={};_0x65c998['model']=_[_0x9352('0x2a')](db['SquareReport'][_0x9352('0x28')]);_0x65c998[_0x9352('0x2b')]=_[_0x9352('0x2a')](_0x562561[_0x9352('0x2b')]);_0x65c998[_0x9352('0x36')]=_['intersection'](_0x65c998['model'],_0x65c998[_0x9352('0x2b')]);_0x95e6c1[_0x9352('0x2f')]=_['intersection'](_0x65c998['model'],qs[_0x9352('0x30')](_0x562561[_0x9352('0x2b')]['fields']));_0x95e6c1['attributes']=_0x95e6c1[_0x9352('0x2f')][_0x9352('0x31')]?_0x95e6c1[_0x9352('0x2f')]:_0x65c998['model'];if(_0x562561['query'][_0x9352('0x44')]){_0x95e6c1[_0x9352('0x45')]=[{'all':!![]}];}_0x95e6c1=_[_0x9352('0x3a')]({},_0x95e6c1,_0x562561['options']);return db['SquareReport'][_0x9352('0x4a')](_0x95e6c1)[_0x9352('0x43')](handleEntityNotFound(_0x22d58d,null))['then'](respondWithResult(_0x22d58d,null))[_0x9352('0x47')](handleError(_0x22d58d,null));};exports['create']=function(_0x37a55d,_0x545675){return db['SquareReport'][_0x9352('0x4b')](_0x37a55d[_0x9352('0x4c')],{})[_0x9352('0x43')](respondWithResult(_0x545675,0xc9))['catch'](handleError(_0x545675,null));};exports[_0x9352('0x1f')]=function(_0x3073f0,_0x4f8716){if(_0x3073f0[_0x9352('0x4c')]['id']){delete _0x3073f0['body']['id'];}return db['SquareReport'][_0x9352('0x4a')]({'where':{'id':_0x3073f0[_0x9352('0x49')]['id']}})[_0x9352('0x43')](handleEntityNotFound(_0x4f8716,null))[_0x9352('0x43')](saveUpdates(_0x3073f0[_0x9352('0x4c')],null))['then'](respondWithResult(_0x4f8716,null))[_0x9352('0x47')](handleError(_0x4f8716,null));};exports[_0x9352('0x20')]=function(_0x5f48c2,_0x53d7ae){return db[_0x9352('0x27')][_0x9352('0x4a')]({'where':{'id':_0x5f48c2['params']['id']}})['then'](handleEntityNotFound(_0x53d7ae,null))[_0x9352('0x43')](removeEntity(_0x53d7ae,null))[_0x9352('0x47')](handleError(_0x53d7ae,null));};exports[_0x9352('0x4d')]=function(_0x215b81,_0x260822){return db[_0x9352('0x27')][_0x9352('0x4d')]()[_0x9352('0x43')](respondWithResult(_0x260822,null))[_0x9352('0x47')](handleError(_0x260822,null));};
\ No newline at end of file
+var _0x7ccb=['nolimit','order','sort','where','add','day','merge','map','type','key','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','length','find','body','describe','html-pdf','rimraf','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','SquareReport','rawAttributes','model','query','dateEnd','dateStart','keys','filters','attributes','intersection','fields','hasOwnProperty'];(function(_0x5817e6,_0x44a2d0){var _0x51916a=function(_0x1a56e3){while(--_0x1a56e3){_0x5817e6['push'](_0x5817e6['shift']());}};_0x51916a(++_0x44a2d0);}(_0x7ccb,0x1de));var _0xb7cc=function(_0x54dcad,_0x554f46){_0x54dcad=_0x54dcad-0x0;var _0x537c56=_0x7ccb[_0x54dcad];return _0x537c56;};'use strict';var pdf=require(_0xb7cc('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xb7cc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb7cc('0x2'));var rp=require(_0xb7cc('0x3'));var moment=require(_0xb7cc('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xb7cc('0x5'));var path=require(_0xb7cc('0x6'));var sox=require(_0xb7cc('0x7'));var csv=require(_0xb7cc('0x8'));var ejs=require(_0xb7cc('0x9'));var fs=require('fs');var _=require(_0xb7cc('0xa'));var squel=require(_0xb7cc('0xb'));var crypto=require(_0xb7cc('0xc'));var jsforce=require(_0xb7cc('0xd'));var deskjs=require(_0xb7cc('0xe'));var toCsv=require(_0xb7cc('0x8'));var querystring=require(_0xb7cc('0xf'));var Papa=require('papaparse');var Redis=require(_0xb7cc('0x10'));var qs=require(_0xb7cc('0x11'));var logger=require(_0xb7cc('0x12'))(_0xb7cc('0x13'));var utils=require(_0xb7cc('0x14'));var config=require(_0xb7cc('0x15'));var db=require(_0xb7cc('0x16'))['db'];function respondWithStatusCode(_0x366094,_0x4e574a){_0x4e574a=_0x4e574a||0xcc;return function(_0x4157a6){if(_0x4157a6){return _0x366094[_0xb7cc('0x17')](_0x4e574a);}return _0x366094[_0xb7cc('0x18')](_0x4e574a)[_0xb7cc('0x19')]();};}function respondWithResult(_0x5a0fb8,_0x8720f){_0x8720f=_0x8720f||0xc8;return function(_0x3e97a2){if(_0x3e97a2){return _0x5a0fb8[_0xb7cc('0x18')](_0x8720f)[_0xb7cc('0x1a')](_0x3e97a2);}};}function respondWithFilteredResult(_0x24ef6b,_0x3a4e6e){return function(_0x43ae8e){if(_0x43ae8e){var _0x1fe9bb=_0x43ae8e[_0xb7cc('0x1b')],_0x459bc7=_0x3a4e6e['offset'],_0x45f16b=_0x3a4e6e[_0xb7cc('0x1c')]+_0x3a4e6e[_0xb7cc('0x1d')],_0x2a1d87;if(_0x45f16b>=_0x1fe9bb){_0x45f16b=_0x1fe9bb;_0x2a1d87=0xc8;}else{_0x2a1d87=0xce;}_0x24ef6b['status'](_0x2a1d87);return _0x24ef6b[_0xb7cc('0x1e')](_0xb7cc('0x1f'),_0x459bc7+'-'+_0x45f16b+'/'+_0x1fe9bb)[_0xb7cc('0x1a')](_0x43ae8e);}return null;};}function patchUpdates(_0x11a463){return function(_0x2dab86){try{jsonpatch[_0xb7cc('0x20')](_0x2dab86,_0x11a463,!![]);}catch(_0x37a251){return BPromise[_0xb7cc('0x21')](_0x37a251);}return _0x2dab86[_0xb7cc('0x22')]();};}function saveUpdates(_0x50d65a,_0x13fd69){return function(_0x3ef3af){if(_0x3ef3af){return _0x3ef3af[_0xb7cc('0x23')](_0x50d65a)[_0xb7cc('0x24')](function(_0x26a9a3){return _0x26a9a3;});}return null;};}function removeEntity(_0x100b7a,_0x34b491){return function(_0x32e29e){if(_0x32e29e){return _0x32e29e[_0xb7cc('0x25')]()['then'](function(){_0x100b7a[_0xb7cc('0x18')](0xcc)[_0xb7cc('0x19')]();});}};}function handleEntityNotFound(_0x100c25,_0x5553ca){return function(_0x2309ce){if(!_0x2309ce){_0x100c25[_0xb7cc('0x17')](0x194);}return _0x2309ce;};}function handleError(_0x4f4ad0,_0x374664){_0x374664=_0x374664||0x1f4;return function(_0x5e343b){logger[_0xb7cc('0x26')](_0x5e343b[_0xb7cc('0x27')]);if(_0x5e343b[_0xb7cc('0x28')]){delete _0x5e343b['name'];}_0x4f4ad0[_0xb7cc('0x18')](_0x374664)[_0xb7cc('0x29')](_0x5e343b);};}exports['index']=function(_0x6ad98c,_0x43ec29){var _0x2e5855={},_0x4e0a05={},_0x4678ef={'count':0x0,'rows':[]};var _0x3a77c5=db[_0xb7cc('0x2a')][_0xb7cc('0x2b')];_0x4e0a05[_0xb7cc('0x2c')]=_['keys'](_0x3a77c5);var _0x2a3ccd={'dateStart':_0x6ad98c[_0xb7cc('0x2d')]['dateStart'],'dateEnd':_0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x2e')]};delete _0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x2f')];delete _0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x2e')];_0x4e0a05['query']=_[_0xb7cc('0x30')](_0x6ad98c['query']);_0x4e0a05[_0xb7cc('0x31')]=_['intersection'](_0x4e0a05[_0xb7cc('0x2c')],_0x4e0a05['query']);_0x2e5855[_0xb7cc('0x32')]=_[_0xb7cc('0x33')](_0x4e0a05[_0xb7cc('0x2c')],qs[_0xb7cc('0x34')](_0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x34')]));_0x2e5855['attributes']=_0x2e5855['attributes']['length']?_0x2e5855[_0xb7cc('0x32')]:_0x4e0a05[_0xb7cc('0x2c')];if(!_0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x35')](_0xb7cc('0x36'))){_0x2e5855[_0xb7cc('0x1d')]=qs[_0xb7cc('0x1d')](_0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x1d')]);_0x2e5855['offset']=qs[_0xb7cc('0x1c')](_0x6ad98c[_0xb7cc('0x2d')]['offset']);}_0x2e5855[_0xb7cc('0x37')]=qs[_0xb7cc('0x38')](_0x6ad98c[_0xb7cc('0x2d')]['sort']);_0x2e5855[_0xb7cc('0x39')]=qs[_0xb7cc('0x31')](_['pick'](_0x6ad98c[_0xb7cc('0x2d')],_0x4e0a05[_0xb7cc('0x31')]));if(_0x2a3ccd['dateStart']){if(_0x2a3ccd[_0xb7cc('0x2e')]){_0x2a3ccd[_0xb7cc('0x2e')]=moment(_0x2a3ccd[_0xb7cc('0x2e')])[_0xb7cc('0x3a')](0x1,_0xb7cc('0x3b'));}else{_0x2a3ccd['dateEnd']=moment(_0x2a3ccd[_0xb7cc('0x2f')])['add'](0x1,_0xb7cc('0x3b'));}_[_0xb7cc('0x3c')](_0x2e5855[_0xb7cc('0x39')],{'createdAt':{'$gte':_0x2a3ccd[_0xb7cc('0x2f')],'$lte':_0x2a3ccd['dateEnd']}});}if(_0x6ad98c['query']['filter']){_0x2e5855[_0xb7cc('0x39')]=_[_0xb7cc('0x3c')](_0x2e5855[_0xb7cc('0x39')],{'$or':_[_0xb7cc('0x3d')](_0x3a77c5,function(_0x577445){if(_0x577445[_0xb7cc('0x3e')][_0xb7cc('0x3f')]!==_0xb7cc('0x40')){var _0x431048={};_0x431048[_0x577445['field']]={'$like':'%'+_0x6ad98c['query']['filter']+'%'};return _0x431048;}})});}_0x2e5855=_[_0xb7cc('0x3c')]({},_0x2e5855,_0x6ad98c[_0xb7cc('0x41')]);var _0x42942a={'where':_0x2e5855[_0xb7cc('0x39')]};return db[_0xb7cc('0x2a')][_0xb7cc('0x1b')](_0x42942a)[_0xb7cc('0x24')](function(_0x13f4a8){_0x4678ef[_0xb7cc('0x1b')]=_0x13f4a8;if(_0x6ad98c[_0xb7cc('0x2d')][_0xb7cc('0x42')]){_0x2e5855[_0xb7cc('0x43')]=[{'all':!![]}];}return db['SquareReport'][_0xb7cc('0x44')](_0x2e5855);})[_0xb7cc('0x24')](function(_0x2e46ad){_0x4678ef[_0xb7cc('0x45')]=_0x2e46ad;return _0x4678ef;})[_0xb7cc('0x24')](respondWithFilteredResult(_0x43ec29,_0x2e5855))[_0xb7cc('0x46')](handleError(_0x43ec29,null));};exports['show']=function(_0x49569a,_0x1f6722){var _0xf81ce9={'raw':!![],'where':{'id':_0x49569a[_0xb7cc('0x47')]['id']}},_0x4094a0={};_0x4094a0[_0xb7cc('0x2c')]=_[_0xb7cc('0x30')](db[_0xb7cc('0x2a')][_0xb7cc('0x2b')]);_0x4094a0[_0xb7cc('0x2d')]=_[_0xb7cc('0x30')](_0x49569a[_0xb7cc('0x2d')]);_0x4094a0[_0xb7cc('0x31')]=_[_0xb7cc('0x33')](_0x4094a0['model'],_0x4094a0[_0xb7cc('0x2d')]);_0xf81ce9['attributes']=_[_0xb7cc('0x33')](_0x4094a0['model'],qs[_0xb7cc('0x34')](_0x49569a[_0xb7cc('0x2d')][_0xb7cc('0x34')]));_0xf81ce9[_0xb7cc('0x32')]=_0xf81ce9[_0xb7cc('0x32')][_0xb7cc('0x48')]?_0xf81ce9[_0xb7cc('0x32')]:_0x4094a0['model'];if(_0x49569a[_0xb7cc('0x2d')][_0xb7cc('0x42')]){_0xf81ce9[_0xb7cc('0x43')]=[{'all':!![]}];}_0xf81ce9=_['merge']({},_0xf81ce9,_0x49569a[_0xb7cc('0x41')]);return db[_0xb7cc('0x2a')][_0xb7cc('0x49')](_0xf81ce9)[_0xb7cc('0x24')](handleEntityNotFound(_0x1f6722,null))[_0xb7cc('0x24')](respondWithResult(_0x1f6722,null))['catch'](handleError(_0x1f6722,null));};exports['create']=function(_0x509298,_0x2ec904){return db['SquareReport']['create'](_0x509298['body'],{})['then'](respondWithResult(_0x2ec904,0xc9))[_0xb7cc('0x46')](handleError(_0x2ec904,null));};exports[_0xb7cc('0x23')]=function(_0x86bf46,_0x10348e){if(_0x86bf46[_0xb7cc('0x4a')]['id']){delete _0x86bf46[_0xb7cc('0x4a')]['id'];}return db['SquareReport'][_0xb7cc('0x49')]({'where':{'id':_0x86bf46[_0xb7cc('0x47')]['id']}})[_0xb7cc('0x24')](handleEntityNotFound(_0x10348e,null))[_0xb7cc('0x24')](saveUpdates(_0x86bf46[_0xb7cc('0x4a')],null))[_0xb7cc('0x24')](respondWithResult(_0x10348e,null))[_0xb7cc('0x46')](handleError(_0x10348e,null));};exports[_0xb7cc('0x25')]=function(_0x250610,_0x112a73){return db[_0xb7cc('0x2a')][_0xb7cc('0x49')]({'where':{'id':_0x250610[_0xb7cc('0x47')]['id']}})[_0xb7cc('0x24')](handleEntityNotFound(_0x112a73,null))['then'](removeEntity(_0x112a73,null))[_0xb7cc('0x46')](handleError(_0x112a73,null));};exports['describe']=function(_0x4d854e,_0x31d4f7){return db['SquareReport'][_0xb7cc('0x4b')]()['then'](respondWithResult(_0x31d4f7,null))[_0xb7cc('0x46')](handleError(_0x31d4f7,null));};
\ No newline at end of file