513650d0787de476166f0686c754023a27458d92
[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 _0x0cee=['bluebird','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','tools_intervals','rewrite','lodash','util','../../config/logger','api','moment'];(function(_0x480843,_0x8121e6){var _0x1d5cd9=function(_0x54ca2a){while(--_0x54ca2a){_0x480843['push'](_0x480843['shift']());}};_0x1d5cd9(++_0x8121e6);}(_0x0cee,0x12f));var _0xe0ce=function(_0x3d775a,_0x1658bb){_0x3d775a=_0x3d775a-0x0;var _0xa350a0=_0x0cee[_0x3d775a];return _0xa350a0;};'use strict';var _=require(_0xe0ce('0x0'));var util=require(_0xe0ce('0x1'));var logger=require(_0xe0ce('0x2'))(_0xe0ce('0x3'));var moment=require(_0xe0ce('0x4'));var BPromise=require(_0xe0ce('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xe0ce('0x6'));var config=require(_0xe0ce('0x7'));var attributes=require(_0xe0ce('0x8'));var extensions=require(_0xe0ce('0x9'));module[_0xe0ce('0xa')]=function(_0x1ce646,_0x64f82c){return _0x1ce646[_0xe0ce('0xb')]('Interval',attributes,{'tableName':_0xe0ce('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2fa936,_0x52f779){extensions[_0xe0ce('0xd')](_0x1ce646,_0x2fa936);},'afterBulkCreate':function(_0x94afeb,_0x4532e3,_0x429a83){_0x429a83();extensions['rewrite'](_0x1ce646,_0x94afeb[0x0]);},'afterUpdate':function(_0x48a0a4,_0x5cf1d8){extensions[_0xe0ce('0xd')](_0x1ce646,_0x48a0a4);},'afterDestroy':function(_0x441e01,_0x31f014){extensions[_0xe0ce('0xd')](_0x1ce646,_0x441e01);}}});};