d010572fde15edb25e8950f746894c7606692fb7
[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 _0x222f=['lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','../../components/extensions/rewrite','Interval','tools_intervals','rewrite'];(function(_0xa14321,_0xec78a0){var _0x370207=function(_0x1a7a78){while(--_0x1a7a78){_0xa14321['push'](_0xa14321['shift']());}};_0x370207(++_0xec78a0);}(_0x222f,0x1a4));var _0xf222=function(_0x133f69,_0x2d4632){_0x133f69=_0x133f69-0x0;var _0x3b67bb=_0x222f[_0x133f69];return _0x3b67bb;};'use strict';var _=require(_0xf222('0x0'));var util=require(_0xf222('0x1'));var logger=require(_0xf222('0x2'))(_0xf222('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xf222('0x4'));var fs=require('fs');var path=require(_0xf222('0x5'));var rimraf=require(_0xf222('0x6'));var config=require(_0xf222('0x7'));var attributes=require('./interval.attributes');var extensions=require(_0xf222('0x8'));module['exports']=function(_0x112e6d,_0x26f129){return _0x112e6d['define'](_0xf222('0x9'),attributes,{'tableName':_0xf222('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x4aceb4,_0x31c027){extensions[_0xf222('0xb')](_0x112e6d,_0x4aceb4);},'afterBulkCreate':function(_0x878804,_0x2eb41f,_0x46ccfe){_0x46ccfe();extensions[_0xf222('0xb')](_0x112e6d,_0x878804[0x0]);},'afterUpdate':function(_0x47d55a,_0x2e29ad){extensions[_0xf222('0xb')](_0x112e6d,_0x47d55a);},'afterDestroy':function(_0x226dbd,_0x182bc3){extensions['rewrite'](_0x112e6d,_0x226dbd);}}});};