6b029c9bd36090c7481c905d5356a50da9d94eb8
[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 _0xe1bf=['rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','define','tools_intervals','rewrite','util','api','moment','bluebird','request-promise'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xe1bf,0x67));var _0xfe1b=function(_0x50f876,_0x4953af){_0x50f876=_0x50f876-0x0;var _0x5bf693=_0xe1bf[_0x50f876];return _0x5bf693;};'use strict';var _=require('lodash');var util=require(_0xfe1b('0x0'));var logger=require('../../config/logger')(_0xfe1b('0x1'));var moment=require(_0xfe1b('0x2'));var BPromise=require(_0xfe1b('0x3'));var rp=require(_0xfe1b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfe1b('0x5'));var config=require(_0xfe1b('0x6'));var attributes=require(_0xfe1b('0x7'));var extensions=require(_0xfe1b('0x8'));module['exports']=function(_0x41d69f,_0x25a3ae){return _0x41d69f[_0xfe1b('0x9')]('Interval',attributes,{'tableName':_0xfe1b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x3fe148,_0x411299){extensions[_0xfe1b('0xb')](_0x41d69f,_0x3fe148);},'afterBulkCreate':function(_0x446abc,_0x493180,_0xc0301e){_0xc0301e();extensions[_0xfe1b('0xb')](_0x41d69f,_0x446abc[0x0]);},'afterUpdate':function(_0x2a2e2d,_0xa28356){extensions[_0xfe1b('0xb')](_0x41d69f,_0x2a2e2d);},'afterDestroy':function(_0x4693ce,_0x2bb8c0){extensions[_0xfe1b('0xb')](_0x41d69f,_0x4693ce);}}});};