Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / interval / interval.model.js
index d2520d4..12a297c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe42d=['rewrite','interval','string','then','all','ifTime','reduce','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','tools_intervals'];(function(_0x3e751a,_0x4804ae){var _0x1d5aa1=function(_0x51ec5a){while(--_0x51ec5a){_0x3e751a['push'](_0x3e751a['shift']());}};_0x1d5aa1(++_0x4804ae);}(_0xe42d,0x13f));var _0xde42=function(_0x5a8423,_0x9d598){_0x5a8423=_0x5a8423-0x0;var _0x4bb583=_0xe42d[_0x5a8423];return _0x4bb583;};'use strict';var attributes=require(_0xde42('0x0'));var extensions=require(_0xde42('0x1'));var iftime=require('../../utils/iftime')['iftime'];module[_0xde42('0x2')]=function(_0x3860db){return _0x3860db[_0xde42('0x3')](_0xde42('0x4'),attributes,{'tableName':_0xde42('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x28a787){extensions[_0xde42('0x6')](_0x3860db,_0x28a787);},'afterBulkCreate':function(_0x57fdfb,_0xd56e1d,_0x23ea2b){_0x23ea2b();extensions['rewrite'](_0x3860db,_0x57fdfb[0x0]);},'afterUpdate':function(_0x5ba317){extensions[_0xde42('0x6')](_0x3860db,_0x5ba317);},'afterDestroy':function(_0x3c958d){extensions[_0xde42('0x6')](_0x3860db,_0x3c958d);}},'instanceMethods':{'ifTime':function(_0x64d7c5=undefined,_0xbf1bf8=new Date()){if(typeof this[_0xde42('0x7')]===_0xde42('0x8')){return iftime(this['interval'],_0x64d7c5,_0xbf1bf8);}else{return this['getIntervals']()[_0xde42('0x9')](function(_0x20627f){return Promise[_0xde42('0xa')](_0x20627f['map'](function(_0x2f7b3d){return _0x2f7b3d[_0xde42('0xb')](_0x64d7c5,_0xbf1bf8);}));})['then'](function(_0x5eff1b){return _0x5eff1b[_0xde42('0xc')](function(_0x453545,_0x4a4e01){return _0x453545||_0x4a4e01;},![]);});}}}});};
\ No newline at end of file
+var _0xc479=['Interval','tools_intervals','rewrite','string','interval','getIntervals','then','all','map','ifTime','reduce','./interval.attributes','../../utils/iftime','iftime','exports','define'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc479,0x1bb));var _0x9c47=function(_0x1df6c0,_0x132faa){_0x1df6c0=_0x1df6c0-0x0;var _0x3c0ccb=_0xc479[_0x1df6c0];return _0x3c0ccb;};'use strict';var attributes=require(_0x9c47('0x0'));var extensions=require('../../components/extensions/rewrite');var iftime=require(_0x9c47('0x1'))[_0x9c47('0x2')];module[_0x9c47('0x3')]=function(_0x4c5629){return _0x4c5629[_0x9c47('0x4')](_0x9c47('0x5'),attributes,{'tableName':_0x9c47('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x4b3da9){extensions['rewrite'](_0x4c5629,_0x4b3da9);},'afterBulkCreate':function(_0x141c88,_0x3249fd,_0x4268ea){_0x4268ea();extensions[_0x9c47('0x7')](_0x4c5629,_0x141c88[0x0]);},'afterUpdate':function(_0x1b8925){extensions[_0x9c47('0x7')](_0x4c5629,_0x1b8925);},'afterDestroy':function(_0x3b06ca){extensions['rewrite'](_0x4c5629,_0x3b06ca);}},'instanceMethods':{'ifTime':function(_0xa13c74=undefined,_0xc9fcb6=new Date()){if(typeof this['interval']===_0x9c47('0x8')){return iftime(this[_0x9c47('0x9')],_0xa13c74,_0xc9fcb6);}else{return this[_0x9c47('0xa')]()[_0x9c47('0xb')](function(_0x30f222){return Promise[_0x9c47('0xc')](_0x30f222[_0x9c47('0xd')](function(_0x35938e){return _0x35938e[_0x9c47('0xe')](_0xa13c74,_0xc9fcb6);}));})[_0x9c47('0xb')](function(_0x370816){return _0x370816[_0x9c47('0xf')](function(_0x4eb7d5,_0x223479){return _0x4eb7d5||_0x223479;},![]);});}}}});};
\ No newline at end of file