Built motion from commit (unavailable).|2.5.8
[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 _0x180f=['request-promise','path','rimraf','../../config/environment','./interval.attributes','exports','Interval','tools_intervals','rewrite','lodash','util','api','moment'];(function(_0x4fbfd9,_0x3ab91a){var _0x31dc94=function(_0x11e53b){while(--_0x11e53b){_0x4fbfd9['push'](_0x4fbfd9['shift']());}};_0x31dc94(++_0x3ab91a);}(_0x180f,0xf3));var _0xf180=function(_0x33c1b1,_0x2355fb){_0x33c1b1=_0x33c1b1-0x0;var _0x2c2037=_0x180f[_0x33c1b1];return _0x2c2037;};'use strict';var _=require(_0xf180('0x0'));var util=require(_0xf180('0x1'));var logger=require('../../config/logger')(_0xf180('0x2'));var moment=require(_0xf180('0x3'));var BPromise=require('bluebird');var rp=require(_0xf180('0x4'));var fs=require('fs');var path=require(_0xf180('0x5'));var rimraf=require(_0xf180('0x6'));var config=require(_0xf180('0x7'));var attributes=require(_0xf180('0x8'));var extensions=require('../../components/extensions/rewrite');module[_0xf180('0x9')]=function(_0x3c6552,_0x513113){return _0x3c6552['define'](_0xf180('0xa'),attributes,{'tableName':_0xf180('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x342a02,_0x3865c5){extensions[_0xf180('0xc')](_0x3c6552,_0x342a02);},'afterBulkCreate':function(_0x4390be,_0x2e85d1,_0x376190){_0x376190();extensions[_0xf180('0xc')](_0x3c6552,_0x4390be[0x0]);},'afterUpdate':function(_0x5a242b,_0x43d390){extensions[_0xf180('0xc')](_0x3c6552,_0x5a242b);},'afterDestroy':function(_0x7e6bf4,_0x18bde3){extensions[_0xf180('0xc')](_0x3c6552,_0x7e6bf4);}}});};