Built motion from commit (unavailable).|2.0.77
[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 _0x510e=['bluebird','request-promise','exports','define','tools_intervals','rewrite','util','../../config/logger','api','moment'];(function(_0x2094eb,_0x234a56){var _0x36e9af=function(_0x2e6285){while(--_0x2e6285){_0x2094eb['push'](_0x2094eb['shift']());}};_0x36e9af(++_0x234a56);}(_0x510e,0x132));var _0xe510=function(_0x53abe5,_0x33a9e5){_0x53abe5=_0x53abe5-0x0;var _0xc1c37e=_0x510e[_0x53abe5];return _0xc1c37e;};'use strict';var _=require('lodash');var util=require(_0xe510('0x0'));var logger=require(_0xe510('0x1'))(_0xe510('0x2'));var moment=require(_0xe510('0x3'));var BPromise=require(_0xe510('0x4'));var rp=require(_0xe510('0x5'));var attributes=require('./interval.attributes');var extensions=require('../../components/extensions/rewrite');module[_0xe510('0x6')]=function(_0x2e5003,_0x334971){return _0x2e5003[_0xe510('0x7')]('Interval',attributes,{'tableName':_0xe510('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x14c656,_0x526f9c){extensions[_0xe510('0x9')](_0x2e5003,_0x14c656);},'afterBulkCreate':function(_0x5ca4a6,_0x5a8dba,_0x14a4f4){_0x14a4f4();extensions[_0xe510('0x9')](_0x2e5003,_0x5ca4a6[0x0]);},'afterUpdate':function(_0x377363,_0x4d8cd2){extensions[_0xe510('0x9')](_0x2e5003,_0x377363);},'afterDestroy':function(_0x31242a,_0x1e9b3e){extensions[_0xe510('0x9')](_0x2e5003,_0x31242a);}}});};