Built motion from commit (unavailable).|2.5.4
[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 _0x4e61=['exports','define','Interval','tools_intervals','rewrite','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite'];(function(_0x16d1b6,_0x5912db){var _0x2ca1f5=function(_0x219bda){while(--_0x219bda){_0x16d1b6['push'](_0x16d1b6['shift']());}};_0x2ca1f5(++_0x5912db);}(_0x4e61,0x8c));var _0x14e6=function(_0x420d8d,_0x78b67f){_0x420d8d=_0x420d8d-0x0;var _0x4865d7=_0x4e61[_0x420d8d];return _0x4865d7;};'use strict';var _=require(_0x14e6('0x0'));var util=require(_0x14e6('0x1'));var logger=require(_0x14e6('0x2'))('api');var moment=require('moment');var BPromise=require(_0x14e6('0x3'));var rp=require(_0x14e6('0x4'));var fs=require('fs');var path=require(_0x14e6('0x5'));var rimraf=require(_0x14e6('0x6'));var config=require(_0x14e6('0x7'));var attributes=require(_0x14e6('0x8'));var extensions=require(_0x14e6('0x9'));module[_0x14e6('0xa')]=function(_0x78f960,_0x9f9c31){return _0x78f960[_0x14e6('0xb')](_0x14e6('0xc'),attributes,{'tableName':_0x14e6('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1200e5,_0x24326b){extensions[_0x14e6('0xe')](_0x78f960,_0x1200e5);},'afterBulkCreate':function(_0x17eeed,_0x40ce5d,_0x4bc647){_0x4bc647();extensions[_0x14e6('0xe')](_0x78f960,_0x17eeed[0x0]);},'afterUpdate':function(_0x473ed2,_0x1ae9be){extensions[_0x14e6('0xe')](_0x78f960,_0x473ed2);},'afterDestroy':function(_0x536468,_0x57e88a){extensions['rewrite'](_0x78f960,_0x536468);}}});};