Built motion from commit (unavailable).|2.5.2
[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 _0x380a=['../../components/extensions/rewrite','exports','Interval','rewrite','lodash','util','../../config/logger','moment','path','./interval.attributes'];(function(_0xb98c00,_0x2834dc){var _0x498f49=function(_0x38dc43){while(--_0x38dc43){_0xb98c00['push'](_0xb98c00['shift']());}};_0x498f49(++_0x2834dc);}(_0x380a,0x16c));var _0xa380=function(_0x26d9b3,_0x591f4e){_0x26d9b3=_0x26d9b3-0x0;var _0x15c226=_0x380a[_0x26d9b3];return _0x15c226;};'use strict';var _=require(_0xa380('0x0'));var util=require(_0xa380('0x1'));var logger=require(_0xa380('0x2'))('api');var moment=require(_0xa380('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xa380('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa380('0x5'));var extensions=require(_0xa380('0x6'));module[_0xa380('0x7')]=function(_0x5bba9d,_0x570db0){return _0x5bba9d['define'](_0xa380('0x8'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5cfb5e,_0x43b8c9){extensions[_0xa380('0x9')](_0x5bba9d,_0x5cfb5e);},'afterBulkCreate':function(_0x49ea22,_0xe15b4c,_0x4b251f){_0x4b251f();extensions['rewrite'](_0x5bba9d,_0x49ea22[0x0]);},'afterUpdate':function(_0x515dfc,_0x2cab96){extensions[_0xa380('0x9')](_0x5bba9d,_0x515dfc);},'afterDestroy':function(_0x5ac7b9,_0x5934d9){extensions[_0xa380('0x9')](_0x5bba9d,_0x5ac7b9);}}});};