Built motion from commit (unavailable).|2.5.31
[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 _0x9219=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','tools_intervals','rewrite'];(function(_0x2d08c5,_0x2b19f1){var _0x5c71b1=function(_0x1c2af2){while(--_0x1c2af2){_0x2d08c5['push'](_0x2d08c5['shift']());}};_0x5c71b1(++_0x2b19f1);}(_0x9219,0xc0));var _0x9921=function(_0x17ed16,_0x2b0814){_0x17ed16=_0x17ed16-0x0;var _0xd152ba=_0x9219[_0x17ed16];return _0xd152ba;};'use strict';var _=require(_0x9921('0x0'));var util=require(_0x9921('0x1'));var logger=require(_0x9921('0x2'))(_0x9921('0x3'));var moment=require(_0x9921('0x4'));var BPromise=require(_0x9921('0x5'));var rp=require(_0x9921('0x6'));var fs=require('fs');var path=require(_0x9921('0x7'));var rimraf=require(_0x9921('0x8'));var config=require('../../config/environment');var attributes=require(_0x9921('0x9'));var extensions=require(_0x9921('0xa'));module[_0x9921('0xb')]=function(_0x13dbbb,_0x59aaa6){return _0x13dbbb[_0x9921('0xc')](_0x9921('0xd'),attributes,{'tableName':_0x9921('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5b5cb4,_0x27e5bb){extensions[_0x9921('0xf')](_0x13dbbb,_0x5b5cb4);},'afterBulkCreate':function(_0x127a0c,_0x22b3b4,_0x2a41a3){_0x2a41a3();extensions['rewrite'](_0x13dbbb,_0x127a0c[0x0]);},'afterUpdate':function(_0x3145c5,_0x4d9cdf){extensions[_0x9921('0xf')](_0x13dbbb,_0x3145c5);},'afterDestroy':function(_0x23357e,_0x24275d){extensions[_0x9921('0xf')](_0x13dbbb,_0x23357e);}}});};