Built motion from commit f7863d46.|2.5.41
[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 _0xeb04=['Interval','rewrite','util','api','bluebird','request-promise','path','rimraf','./interval.attributes','../../components/extensions/rewrite','exports','define'];(function(_0x590a9e,_0x40fe49){var _0x5855cc=function(_0xa3a832){while(--_0xa3a832){_0x590a9e['push'](_0x590a9e['shift']());}};_0x5855cc(++_0x40fe49);}(_0xeb04,0x12e));var _0x4eb0=function(_0x8caca3,_0x3160c7){_0x8caca3=_0x8caca3-0x0;var _0x2f4434=_0xeb04[_0x8caca3];return _0x2f4434;};'use strict';var _=require('lodash');var util=require(_0x4eb0('0x0'));var logger=require('../../config/logger')(_0x4eb0('0x1'));var moment=require('moment');var BPromise=require(_0x4eb0('0x2'));var rp=require(_0x4eb0('0x3'));var fs=require('fs');var path=require(_0x4eb0('0x4'));var rimraf=require(_0x4eb0('0x5'));var config=require('../../config/environment');var attributes=require(_0x4eb0('0x6'));var extensions=require(_0x4eb0('0x7'));module[_0x4eb0('0x8')]=function(_0x24c146,_0x1ae9a1){return _0x24c146[_0x4eb0('0x9')](_0x4eb0('0xa'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5f5390,_0xe96a9a){extensions[_0x4eb0('0xb')](_0x24c146,_0x5f5390);},'afterBulkCreate':function(_0x3437f0,_0x12398e,_0x10a9b1){_0x10a9b1();extensions['rewrite'](_0x24c146,_0x3437f0[0x0]);},'afterUpdate':function(_0x2b5d66,_0x559aee){extensions[_0x4eb0('0xb')](_0x24c146,_0x2b5d66);},'afterDestroy':function(_0x71b631,_0x3477e8){extensions[_0x4eb0('0xb')](_0x24c146,_0x71b631);}}});};