a3b7b254c54f450777c652c561a42e5a9415ae32
[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 _0x2bc6=['Interval','tools_intervals','rewrite','lodash','util','../../config/logger','path','../../config/environment','./interval.attributes','exports','define'];(function(_0xd24abc,_0x4cd25f){var _0x2dcbfa=function(_0x502eaa){while(--_0x502eaa){_0xd24abc['push'](_0xd24abc['shift']());}};_0x2dcbfa(++_0x4cd25f);}(_0x2bc6,0x163));var _0x62bc=function(_0x1792ae,_0x3738a3){_0x1792ae=_0x1792ae-0x0;var _0x379871=_0x2bc6[_0x1792ae];return _0x379871;};'use strict';var _=require(_0x62bc('0x0'));var util=require(_0x62bc('0x1'));var logger=require(_0x62bc('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x62bc('0x3'));var rimraf=require('rimraf');var config=require(_0x62bc('0x4'));var attributes=require(_0x62bc('0x5'));var extensions=require('../../components/extensions/rewrite');module[_0x62bc('0x6')]=function(_0x450cb6,_0x40af10){return _0x450cb6[_0x62bc('0x7')](_0x62bc('0x8'),attributes,{'tableName':_0x62bc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5bedeb,_0x441722){extensions[_0x62bc('0xa')](_0x450cb6,_0x5bedeb);},'afterBulkCreate':function(_0x1917e1,_0x306bac,_0x481da1){_0x481da1();extensions[_0x62bc('0xa')](_0x450cb6,_0x1917e1[0x0]);},'afterUpdate':function(_0x107bf9,_0x1e3a57){extensions['rewrite'](_0x450cb6,_0x107bf9);},'afterDestroy':function(_0x422fd1,_0x22e6c8){extensions[_0x62bc('0xa')](_0x450cb6,_0x422fd1);}}});};