c198f37bbbdbee60a20e4b71b1d1a8162979df4d
[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 _0x9532=['moment','bluebird','path','rimraf','./interval.attributes','exports','Interval','rewrite','lodash','util','../../config/logger','api'];(function(_0x59f0dc,_0x1e2497){var _0x5b5445=function(_0x57ca91){while(--_0x57ca91){_0x59f0dc['push'](_0x59f0dc['shift']());}};_0x5b5445(++_0x1e2497);}(_0x9532,0x8c));var _0x2953=function(_0x555748,_0x4c6ba4){_0x555748=_0x555748-0x0;var _0x2d43fe=_0x9532[_0x555748];return _0x2d43fe;};'use strict';var _=require(_0x2953('0x0'));var util=require(_0x2953('0x1'));var logger=require(_0x2953('0x2'))(_0x2953('0x3'));var moment=require(_0x2953('0x4'));var BPromise=require(_0x2953('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2953('0x6'));var rimraf=require(_0x2953('0x7'));var config=require('../../config/environment');var attributes=require(_0x2953('0x8'));var extensions=require('../../components/extensions/rewrite');module[_0x2953('0x9')]=function(_0x451c3c,_0x5b2aea){return _0x451c3c['define'](_0x2953('0xa'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x49f180,_0x422b1a){extensions['rewrite'](_0x451c3c,_0x49f180);},'afterBulkCreate':function(_0xc5c60f,_0x14e355,_0x20d976){_0x20d976();extensions[_0x2953('0xb')](_0x451c3c,_0xc5c60f[0x0]);},'afterUpdate':function(_0x4c9cd8,_0x22d73c){extensions[_0x2953('0xb')](_0x451c3c,_0x4c9cd8);},'afterDestroy':function(_0x3b6153,_0x2cecce){extensions[_0x2953('0xb')](_0x451c3c,_0x3b6153);}}});};