Built motion from commit (unavailable).|2.5.14
[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 _0x4fd9=['rewrite','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval'];(function(_0x9b8282,_0xf57681){var _0x399fc9=function(_0x383615){while(--_0x383615){_0x9b8282['push'](_0x9b8282['shift']());}};_0x399fc9(++_0xf57681);}(_0x4fd9,0xf1));var _0x94fd=function(_0x597ef6,_0x3c76fa){_0x597ef6=_0x597ef6-0x0;var _0x541b74=_0x4fd9[_0x597ef6];return _0x541b74;};'use strict';var _=require(_0x94fd('0x0'));var util=require(_0x94fd('0x1'));var logger=require(_0x94fd('0x2'))(_0x94fd('0x3'));var moment=require('moment');var BPromise=require(_0x94fd('0x4'));var rp=require(_0x94fd('0x5'));var fs=require('fs');var path=require(_0x94fd('0x6'));var rimraf=require(_0x94fd('0x7'));var config=require(_0x94fd('0x8'));var attributes=require(_0x94fd('0x9'));var extensions=require(_0x94fd('0xa'));module[_0x94fd('0xb')]=function(_0x38413f,_0x347e0b){return _0x38413f[_0x94fd('0xc')](_0x94fd('0xd'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x51ccfc,_0x28115b){extensions['rewrite'](_0x38413f,_0x51ccfc);},'afterBulkCreate':function(_0x275b82,_0x57ea90,_0x36a3c7){_0x36a3c7();extensions['rewrite'](_0x38413f,_0x275b82[0x0]);},'afterUpdate':function(_0x3a5a89,_0x315600){extensions['rewrite'](_0x38413f,_0x3a5a89);},'afterDestroy':function(_0x32ecee,_0x406d5a){extensions[_0x94fd('0xe')](_0x38413f,_0x32ecee);}}});};