7cd78672ce31abcc5c277148c30e668662f20514
[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 _0x959e=['rewrite','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','../../components/extensions/rewrite','define','Interval'];(function(_0x3792e6,_0x32bd91){var _0x441e44=function(_0x357478){while(--_0x357478){_0x3792e6['push'](_0x3792e6['shift']());}};_0x441e44(++_0x32bd91);}(_0x959e,0x1e2));var _0xe959=function(_0x1da527,_0x2dc953){_0x1da527=_0x1da527-0x0;var _0x40fc7c=_0x959e[_0x1da527];return _0x40fc7c;};'use strict';var _=require(_0xe959('0x0'));var util=require(_0xe959('0x1'));var logger=require(_0xe959('0x2'))('api');var moment=require(_0xe959('0x3'));var BPromise=require(_0xe959('0x4'));var rp=require(_0xe959('0x5'));var fs=require('fs');var path=require(_0xe959('0x6'));var rimraf=require(_0xe959('0x7'));var config=require(_0xe959('0x8'));var attributes=require('./interval.attributes');var extensions=require(_0xe959('0x9'));module['exports']=function(_0x29a59a,_0xd2bb6e){return _0x29a59a[_0xe959('0xa')](_0xe959('0xb'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x4ecd72,_0x257fc7){extensions['rewrite'](_0x29a59a,_0x4ecd72);},'afterBulkCreate':function(_0x4de475,_0x200c5d,_0x264816){_0x264816();extensions[_0xe959('0xc')](_0x29a59a,_0x4de475[0x0]);},'afterUpdate':function(_0x507982,_0x1caf58){extensions[_0xe959('0xc')](_0x29a59a,_0x507982);},'afterDestroy':function(_0x42c3fd,_0x58ca1c){extensions[_0xe959('0xc')](_0x29a59a,_0x42c3fd);}}});};