c1fa0a2614fc2f225eb489ae52e24313888bdb61
[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 _0x55f7=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','../../components/extensions/rewrite','define','Interval','tools_intervals','rewrite'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x55f7,0xe1));var _0x755f=function(_0x3cdb2c,_0x19d637){_0x3cdb2c=_0x3cdb2c-0x0;var _0x355873=_0x55f7[_0x3cdb2c];return _0x355873;};'use strict';var _=require(_0x755f('0x0'));var util=require(_0x755f('0x1'));var logger=require(_0x755f('0x2'))(_0x755f('0x3'));var moment=require(_0x755f('0x4'));var BPromise=require(_0x755f('0x5'));var rp=require(_0x755f('0x6'));var fs=require('fs');var path=require(_0x755f('0x7'));var rimraf=require(_0x755f('0x8'));var config=require(_0x755f('0x9'));var attributes=require('./interval.attributes');var extensions=require(_0x755f('0xa'));module['exports']=function(_0x49c334,_0x3d8980){return _0x49c334[_0x755f('0xb')](_0x755f('0xc'),attributes,{'tableName':_0x755f('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x46b183,_0x4ecbe2){extensions['rewrite'](_0x49c334,_0x46b183);},'afterBulkCreate':function(_0x1b6cd,_0x4448d5,_0x7cafdb){_0x7cafdb();extensions['rewrite'](_0x49c334,_0x1b6cd[0x0]);},'afterUpdate':function(_0xbfe09,_0x2e5138){extensions[_0x755f('0xe')](_0x49c334,_0xbfe09);},'afterDestroy':function(_0x45313c,_0x49369b){extensions[_0x755f('0xe')](_0x49c334,_0x45313c);}}});};