Built motion from commit (unavailable).|2.4.4
[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 _0x3db8=['../../config/environment','./interval.attributes','exports','define','Interval','tools_intervals','rewrite','util','api','moment','request-promise','rimraf'];(function(_0x4a4d88,_0x2be95a){var _0x479329=function(_0x37bb8e){while(--_0x37bb8e){_0x4a4d88['push'](_0x4a4d88['shift']());}};_0x479329(++_0x2be95a);}(_0x3db8,0x14b));var _0x83db=function(_0xa4d6ae,_0x516961){_0xa4d6ae=_0xa4d6ae-0x0;var _0x5e7673=_0x3db8[_0xa4d6ae];return _0x5e7673;};'use strict';var _=require('lodash');var util=require(_0x83db('0x0'));var logger=require('../../config/logger')(_0x83db('0x1'));var moment=require(_0x83db('0x2'));var BPromise=require('bluebird');var rp=require(_0x83db('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x83db('0x4'));var config=require(_0x83db('0x5'));var attributes=require(_0x83db('0x6'));var extensions=require('../../components/extensions/rewrite');module[_0x83db('0x7')]=function(_0x1fe3e6,_0x426ff7){return _0x1fe3e6[_0x83db('0x8')](_0x83db('0x9'),attributes,{'tableName':_0x83db('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1ebb3d,_0x5302ab){extensions[_0x83db('0xb')](_0x1fe3e6,_0x1ebb3d);},'afterBulkCreate':function(_0xf97e95,_0x3c18ae,_0x44812e){_0x44812e();extensions['rewrite'](_0x1fe3e6,_0xf97e95[0x0]);},'afterUpdate':function(_0x2c79fb,_0x3b1822){extensions[_0x83db('0xb')](_0x1fe3e6,_0x2c79fb);},'afterDestroy':function(_0x44f192,_0x3b37f8){extensions[_0x83db('0xb')](_0x1fe3e6,_0x44f192);}}});};