02c25e26438995364730dae5b7075376505b24a1
[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 _0x8303=['path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','tools_intervals','rewrite','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x381d20,_0xd4b3c){var _0x2c998a=function(_0x452821){while(--_0x452821){_0x381d20['push'](_0x381d20['shift']());}};_0x2c998a(++_0xd4b3c);}(_0x8303,0xaa));var _0x3830=function(_0x3e6e10,_0x256a3b){_0x3e6e10=_0x3e6e10-0x0;var _0x25d0ca=_0x8303[_0x3e6e10];return _0x25d0ca;};'use strict';var _=require(_0x3830('0x0'));var util=require('util');var logger=require(_0x3830('0x1'))(_0x3830('0x2'));var moment=require(_0x3830('0x3'));var BPromise=require(_0x3830('0x4'));var rp=require(_0x3830('0x5'));var fs=require('fs');var path=require(_0x3830('0x6'));var rimraf=require(_0x3830('0x7'));var config=require(_0x3830('0x8'));var attributes=require(_0x3830('0x9'));var extensions=require(_0x3830('0xa'));module[_0x3830('0xb')]=function(_0x34b99e,_0x27bb67){return _0x34b99e[_0x3830('0xc')](_0x3830('0xd'),attributes,{'tableName':_0x3830('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1e458e,_0x5c53d5){extensions['rewrite'](_0x34b99e,_0x1e458e);},'afterBulkCreate':function(_0x477a59,_0xb9cdd9,_0x307af0){_0x307af0();extensions['rewrite'](_0x34b99e,_0x477a59[0x0]);},'afterUpdate':function(_0x7e3f4f,_0x336219){extensions[_0x3830('0xf')](_0x34b99e,_0x7e3f4f);},'afterDestroy':function(_0x48b595,_0x2b5bad){extensions['rewrite'](_0x34b99e,_0x48b595);}}});};