d5f28309befa084c5c92941c896778dc7f452931
[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 _0x82c4=['moment','bluebird','request-promise','rimraf','./interval.attributes','exports','define','Interval','tools_intervals','rewrite','lodash','util','../../config/logger','api'];(function(_0x27641c,_0x44fa23){var _0x3206ff=function(_0x4dfe12){while(--_0x4dfe12){_0x27641c['push'](_0x27641c['shift']());}};_0x3206ff(++_0x44fa23);}(_0x82c4,0x1ca));var _0x482c=function(_0x150c65,_0x303f38){_0x150c65=_0x150c65-0x0;var _0x4ca489=_0x82c4[_0x150c65];return _0x4ca489;};'use strict';var _=require(_0x482c('0x0'));var util=require(_0x482c('0x1'));var logger=require(_0x482c('0x2'))(_0x482c('0x3'));var moment=require(_0x482c('0x4'));var BPromise=require(_0x482c('0x5'));var rp=require(_0x482c('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x482c('0x7'));var config=require('../../config/environment');var attributes=require(_0x482c('0x8'));var extensions=require('../../components/extensions/rewrite');module[_0x482c('0x9')]=function(_0x5d7c76,_0xfdb92){return _0x5d7c76[_0x482c('0xa')](_0x482c('0xb'),attributes,{'tableName':_0x482c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x3846d8,_0x478bd2){extensions[_0x482c('0xd')](_0x5d7c76,_0x3846d8);},'afterBulkCreate':function(_0x135cc1,_0x3859ad,_0xc59d41){_0xc59d41();extensions[_0x482c('0xd')](_0x5d7c76,_0x135cc1[0x0]);},'afterUpdate':function(_0x17e233,_0x51967f){extensions[_0x482c('0xd')](_0x5d7c76,_0x17e233);},'afterDestroy':function(_0x2ff3a2,_0x1ed3ff){extensions['rewrite'](_0x5d7c76,_0x2ff3a2);}}});};