Built motion from commit (unavailable).|2.5.1
[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 _0x68f9=['../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','tools_intervals','rewrite','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x5ea0ad,_0x4d925a){var _0x9bc01d=function(_0x32f54a){while(--_0x32f54a){_0x5ea0ad['push'](_0x5ea0ad['shift']());}};_0x9bc01d(++_0x4d925a);}(_0x68f9,0xca));var _0x968f=function(_0x4de38a,_0x2442d3){_0x4de38a=_0x4de38a-0x0;var _0x2b3563=_0x68f9[_0x4de38a];return _0x2b3563;};'use strict';var _=require(_0x968f('0x0'));var util=require(_0x968f('0x1'));var logger=require(_0x968f('0x2'))(_0x968f('0x3'));var moment=require(_0x968f('0x4'));var BPromise=require(_0x968f('0x5'));var rp=require(_0x968f('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x968f('0x7'));var config=require(_0x968f('0x8'));var attributes=require(_0x968f('0x9'));var extensions=require(_0x968f('0xa'));module[_0x968f('0xb')]=function(_0x493f8,_0x5214b6){return _0x493f8[_0x968f('0xc')]('Interval',attributes,{'tableName':_0x968f('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x352cae,_0x22d382){extensions['rewrite'](_0x493f8,_0x352cae);},'afterBulkCreate':function(_0x1a812c,_0x71e295,_0x22d1d8){_0x22d1d8();extensions[_0x968f('0xe')](_0x493f8,_0x1a812c[0x0]);},'afterUpdate':function(_0x2b712c,_0x14c646){extensions[_0x968f('0xe')](_0x493f8,_0x2b712c);},'afterDestroy':function(_0x5203a8,_0x4f88b3){extensions[_0x968f('0xe')](_0x493f8,_0x5203a8);}}});};