Built motion from commit 85328c08.|2.5.50
[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 _0xc63e=['request-promise','path','../../config/environment','./interval.attributes','../../components/extensions/rewrite','define','rewrite','lodash','util','../../config/logger','moment','bluebird'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0xc63e,0x1db));var _0xec63=function(_0x102f97,_0x5bda2f){_0x102f97=_0x102f97-0x0;var _0xd22058=_0xc63e[_0x102f97];return _0xd22058;};'use strict';var _=require(_0xec63('0x0'));var util=require(_0xec63('0x1'));var logger=require(_0xec63('0x2'))('api');var moment=require(_0xec63('0x3'));var BPromise=require(_0xec63('0x4'));var rp=require(_0xec63('0x5'));var fs=require('fs');var path=require(_0xec63('0x6'));var rimraf=require('rimraf');var config=require(_0xec63('0x7'));var attributes=require(_0xec63('0x8'));var extensions=require(_0xec63('0x9'));module['exports']=function(_0x5b92ea,_0x17a464){return _0x5b92ea[_0xec63('0xa')]('Interval',attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x518241,_0x2e1391){extensions[_0xec63('0xb')](_0x5b92ea,_0x518241);},'afterBulkCreate':function(_0x87be03,_0x5c268a,_0x182cb7){_0x182cb7();extensions['rewrite'](_0x5b92ea,_0x87be03[0x0]);},'afterUpdate':function(_0x6801f3,_0x590e5a){extensions[_0xec63('0xb')](_0x5b92ea,_0x6801f3);},'afterDestroy':function(_0x82a23e,_0x4f9922){extensions[_0xec63('0xb')](_0x5b92ea,_0x82a23e);}}});};