Built motion from commit (unavailable).|2.6.0
[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 _0xfaa4=['../../config/environment','./interval.attributes','exports','rewrite','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x3555e7,_0x2cbf65){var _0x1482b0=function(_0x3abb56){while(--_0x3abb56){_0x3555e7['push'](_0x3555e7['shift']());}};_0x1482b0(++_0x2cbf65);}(_0xfaa4,0x1a8));var _0x4faa=function(_0x3dbd0a,_0x7a4c64){_0x3dbd0a=_0x3dbd0a-0x0;var _0x523dc5=_0xfaa4[_0x3dbd0a];return _0x523dc5;};'use strict';var _=require(_0x4faa('0x0'));var util=require(_0x4faa('0x1'));var logger=require(_0x4faa('0x2'))(_0x4faa('0x3'));var moment=require(_0x4faa('0x4'));var BPromise=require(_0x4faa('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4faa('0x6'));var rimraf=require(_0x4faa('0x7'));var config=require(_0x4faa('0x8'));var attributes=require(_0x4faa('0x9'));var extensions=require('../../components/extensions/rewrite');module[_0x4faa('0xa')]=function(_0x6df371,_0xa46a7d){return _0x6df371['define']('Interval',attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x159843,_0xa0edee){extensions[_0x4faa('0xb')](_0x6df371,_0x159843);},'afterBulkCreate':function(_0x4dd4d4,_0x37dad5,_0x383778){_0x383778();extensions[_0x4faa('0xb')](_0x6df371,_0x4dd4d4[0x0]);},'afterUpdate':function(_0x13f5e6,_0xa3aa72){extensions['rewrite'](_0x6df371,_0x13f5e6);},'afterDestroy':function(_0x58cbac,_0xbdf751){extensions[_0x4faa('0xb')](_0x6df371,_0x58cbac);}}});};