Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / interval / interval.model.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x153f=['api','moment','bluebird','request-promise','rimraf','./interval.attributes','../../components/extensions/rewrite','exports','Interval','tools_intervals','rewrite','lodash','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x153f,0x15b));var _0xf153=function(_0x446f73,_0x15ee80){_0x446f73=_0x446f73-0x0;var _0x472cd0=_0x153f[_0x446f73];return _0x472cd0;};'use strict';var _=require(_0xf153('0x0'));var util=require(_0xf153('0x1'));var logger=require(_0xf153('0x2'))(_0xf153('0x3'));var moment=require(_0xf153('0x4'));var BPromise=require(_0xf153('0x5'));var rp=require(_0xf153('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf153('0x7'));var config=require('../../config/environment');var attributes=require(_0xf153('0x8'));var extensions=require(_0xf153('0x9'));module[_0xf153('0xa')]=function(_0xafd987,_0x21f432){return _0xafd987['define'](_0xf153('0xb'),attributes,{'tableName':_0xf153('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x224f88,_0x5f6cb5){extensions[_0xf153('0xd')](_0xafd987,_0x224f88);},'afterBulkCreate':function(_0x3e7a82,_0x44845c,_0x15a18b){_0x15a18b();extensions[_0xf153('0xd')](_0xafd987,_0x3e7a82[0x0]);},'afterUpdate':function(_0xeaccb0,_0x5c8ae9){extensions[_0xf153('0xd')](_0xafd987,_0xeaccb0);},'afterDestroy':function(_0x1c8de7,_0x2bea70){extensions['rewrite'](_0xafd987,_0x1c8de7);}}});};