Built motion from commit 0d14f64c.|2.6.34
[motion2.git] / server / api / team / team.model.js
index 61c083a..b06ca2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x383f=['Whatsapp','resolve','all','Queues','then','map','catch','exports','Team','teams','Chat','Fax','Mail','Openchannel','Sms'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x383f,0x15c));var _0xf383=function(_0x513847,_0x5ee9e3){_0x513847=_0x513847-0x0;var _0x3390ae=_0x383f[_0x513847];return _0x3390ae;};'use strict';var _=require('lodash');var attributes=require('./team.attributes');function getQueuesByChannel(_0x258af8,_0x465b35){var _0x3370a7='get'+_0x465b35+_0xf383('0x0');return _0x258af8[_0x3370a7]()[_0xf383('0x1')](function(_0x207ae0){return _[_0xf383('0x2')](_0x207ae0,function(_0xa2eba8){_0xa2eba8['setDataValue']('channel',_0x465b35);return _0xa2eba8;});})[_0xf383('0x3')](function(_0x54de1a){throw _0x54de1a;});}module[_0xf383('0x4')]=function(_0x5dde44){return _0x5dde44['define'](_0xf383('0x5'),attributes,{'tableName':_0xf383('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x5aae99=this;var _0x138038=[_0xf383('0x7'),_0xf383('0x8'),_0xf383('0x9'),_0xf383('0xa'),_0xf383('0xb'),'Voice',_0xf383('0xc')];return Promise[_0xf383('0xd')]()[_0xf383('0x1')](function(){var _0x16092a=_[_0xf383('0x2')](_0x138038,function(_0x36ac92){return getQueuesByChannel(_0x5aae99,_0x36ac92);});return Promise[_0xf383('0xe')](_0x16092a);})['catch'](function(_0x1900b9){throw _0x1900b9;});}}});};
\ No newline at end of file
+var _0x06fe=['Team','Fax','Mail','Openchannel','Sms','catch','lodash','./team.attributes','Queues','then','map','exports','define'];(function(_0x384207,_0x4e2b68){var _0xbc41bc=function(_0x1ff5e9){while(--_0x1ff5e9){_0x384207['push'](_0x384207['shift']());}};_0xbc41bc(++_0x4e2b68);}(_0x06fe,0x1c0));var _0xe06f=function(_0x33c70e,_0xd8cb0b){_0x33c70e=_0x33c70e-0x0;var _0x5a33e5=_0x06fe[_0x33c70e];return _0x5a33e5;};'use strict';var _=require(_0xe06f('0x0'));var attributes=require(_0xe06f('0x1'));function getQueuesByChannel(_0x5bd58f,_0x3b5802){var _0x2e3143='get'+_0x3b5802+_0xe06f('0x2');return _0x5bd58f[_0x2e3143]()[_0xe06f('0x3')](function(_0x8b087d){return _[_0xe06f('0x4')](_0x8b087d,function(_0xc62649){_0xc62649['setDataValue']('channel',_0x3b5802);return _0xc62649;});})['catch'](function(_0x5e5845){throw _0x5e5845;});}module[_0xe06f('0x5')]=function(_0xf4965c){return _0xf4965c[_0xe06f('0x6')](_0xe06f('0x7'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x516c5a=this;var _0x3b6b44=['Chat',_0xe06f('0x8'),_0xe06f('0x9'),_0xe06f('0xa'),_0xe06f('0xb'),'Voice','Whatsapp'];return Promise['resolve']()[_0xe06f('0x3')](function(){var _0x1d1cac=_[_0xe06f('0x4')](_0x3b6b44,function(_0x4137ec){return getQueuesByChannel(_0x516c5a,_0x4137ec);});return Promise['all'](_0x1d1cac);})[_0xe06f('0xc')](function(_0x1938e5){throw _0x1938e5;});}}});};
\ No newline at end of file