Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / interval / interval.model.js
index d4d150e..d35fe0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x008f=['../../components/extensions/rewrite','iftime','exports','define','Interval','rewrite','interval','string','getIntervals','then','map','ifTime','./interval.attributes'];(function(_0x9d679d,_0x4dd38a){var _0x3ce1dc=function(_0x2cbc68){while(--_0x2cbc68){_0x9d679d['push'](_0x9d679d['shift']());}};_0x3ce1dc(++_0x4dd38a);}(_0x008f,0x1c6));var _0xf008=function(_0x2bbb49,_0x13bc74){_0x2bbb49=_0x2bbb49-0x0;var _0x276690=_0x008f[_0x2bbb49];return _0x276690;};'use strict';var attributes=require(_0xf008('0x0'));var extensions=require(_0xf008('0x1'));var iftime=require('../../utils/iftime')[_0xf008('0x2')];module[_0xf008('0x3')]=function(_0x4174b5){return _0x4174b5[_0xf008('0x4')](_0xf008('0x5'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x3c758c){extensions[_0xf008('0x6')](_0x4174b5,_0x3c758c);},'afterBulkCreate':function(_0x34d1cc,_0x26b8fa,_0x2209fd){_0x2209fd();extensions[_0xf008('0x6')](_0x4174b5,_0x34d1cc[0x0]);},'afterUpdate':function(_0x375c2c){extensions[_0xf008('0x6')](_0x4174b5,_0x375c2c);},'afterDestroy':function(_0x1d45be){extensions[_0xf008('0x6')](_0x4174b5,_0x1d45be);}},'instanceMethods':{'ifTime':function(_0x32d81d=undefined,_0x3408ad=new Date()){if(typeof this[_0xf008('0x7')]===_0xf008('0x8')){return iftime(this['interval'],_0x32d81d,_0x3408ad);}else{return this[_0xf008('0x9')]()[_0xf008('0xa')](function(_0x3940f7){return Promise['all'](_0x3940f7[_0xf008('0xb')](function(_0x21b10e){return _0x21b10e[_0xf008('0xc')](_0x32d81d,_0x3408ad);}));})[_0xf008('0xa')](function(_0x7c53d1){return _0x7c53d1['reduce'](function(_0x36c22e,_0x49e574){return _0x36c22e||_0x49e574;},![]);});}}}});};
\ No newline at end of file
+var _0x62c5=['then','all','map','ifTime','./interval.attributes','../../components/extensions/rewrite','define','Interval','tools_intervals','rewrite','interval','string'];(function(_0x2dba5b,_0x23249b){var _0x1cbdbe=function(_0x53a50a){while(--_0x53a50a){_0x2dba5b['push'](_0x2dba5b['shift']());}};_0x1cbdbe(++_0x23249b);}(_0x62c5,0xb8));var _0x562c=function(_0x163f94,_0x1d0c28){_0x163f94=_0x163f94-0x0;var _0x3a7506=_0x62c5[_0x163f94];return _0x3a7506;};'use strict';var attributes=require(_0x562c('0x0'));var extensions=require(_0x562c('0x1'));var iftime=require('../../utils/iftime')['iftime'];module['exports']=function(_0x5d97c0){return _0x5d97c0[_0x562c('0x2')](_0x562c('0x3'),attributes,{'tableName':_0x562c('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x47cfb5){extensions[_0x562c('0x5')](_0x5d97c0,_0x47cfb5);},'afterBulkCreate':function(_0x48f2c0,_0x53b218,_0x111fba){_0x111fba();extensions[_0x562c('0x5')](_0x5d97c0,_0x48f2c0[0x0]);},'afterUpdate':function(_0x57836c){extensions[_0x562c('0x5')](_0x5d97c0,_0x57836c);},'afterDestroy':function(_0x185524){extensions['rewrite'](_0x5d97c0,_0x185524);}},'instanceMethods':{'ifTime':function(_0x3aca7f=undefined,_0x5aed26=new Date()){if(typeof this[_0x562c('0x6')]===_0x562c('0x7')){return iftime(this[_0x562c('0x6')],_0x3aca7f,_0x5aed26);}else{return this['getIntervals']()[_0x562c('0x8')](function(_0x254fbe){return Promise[_0x562c('0x9')](_0x254fbe[_0x562c('0xa')](function(_0x24c74a){return _0x24c74a[_0x562c('0xb')](_0x3aca7f,_0x5aed26);}));})['then'](function(_0x460fa8){return _0x460fa8['reduce'](function(_0x108190,_0x4fc2e1){return _0x108190||_0x4fc2e1;},![]);});}}}});};
\ No newline at end of file