Built motion from commit 753c950e.|2.5.42
[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 _0x3bf0=['moment','bluebird','request-promise','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','tools_intervals','rewrite','lodash','util','../../config/logger','api'];(function(_0x5a3548,_0x493765){var _0x291237=function(_0x5eb634){while(--_0x5eb634){_0x5a3548['push'](_0x5a3548['shift']());}};_0x291237(++_0x493765);}(_0x3bf0,0x83));var _0x03bf=function(_0x231d50,_0x31c43c){_0x231d50=_0x231d50-0x0;var _0x22a105=_0x3bf0[_0x231d50];return _0x22a105;};'use strict';var _=require(_0x03bf('0x0'));var util=require(_0x03bf('0x1'));var logger=require(_0x03bf('0x2'))(_0x03bf('0x3'));var moment=require(_0x03bf('0x4'));var BPromise=require(_0x03bf('0x5'));var rp=require(_0x03bf('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x03bf('0x7'));var config=require(_0x03bf('0x8'));var attributes=require(_0x03bf('0x9'));var extensions=require(_0x03bf('0xa'));module[_0x03bf('0xb')]=function(_0x534e38,_0x2c37c7){return _0x534e38[_0x03bf('0xc')]('Interval',attributes,{'tableName':_0x03bf('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x143717,_0x151297){extensions['rewrite'](_0x534e38,_0x143717);},'afterBulkCreate':function(_0x126981,_0x3ddbb8,_0x3946e5){_0x3946e5();extensions[_0x03bf('0xe')](_0x534e38,_0x126981[0x0]);},'afterUpdate':function(_0x374024,_0xee1a5e){extensions[_0x03bf('0xe')](_0x534e38,_0x374024);},'afterDestroy':function(_0x33152f,_0x325495){extensions[_0x03bf('0xe')](_0x534e38,_0x33152f);}}});};