Built motion from commit (unavailable).|2.5.3
[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 _0xe739=['moment','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','define','tools_intervals','rewrite','lodash','../../config/logger','api'];(function(_0xf6ff4,_0x18f087){var _0x73bea0=function(_0x326385){while(--_0x326385){_0xf6ff4['push'](_0xf6ff4['shift']());}};_0x73bea0(++_0x18f087);}(_0xe739,0x105));var _0x9e73=function(_0x4d2094,_0x586657){_0x4d2094=_0x4d2094-0x0;var _0x5562df=_0xe739[_0x4d2094];return _0x5562df;};'use strict';var _=require(_0x9e73('0x0'));var util=require('util');var logger=require(_0x9e73('0x1'))(_0x9e73('0x2'));var moment=require(_0x9e73('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x9e73('0x4'));var config=require(_0x9e73('0x5'));var attributes=require(_0x9e73('0x6'));var extensions=require(_0x9e73('0x7'));module['exports']=function(_0x3db8fa,_0x26cb5b){return _0x3db8fa[_0x9e73('0x8')]('Interval',attributes,{'tableName':_0x9e73('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1ee042,_0x471872){extensions[_0x9e73('0xa')](_0x3db8fa,_0x1ee042);},'afterBulkCreate':function(_0x14de8a,_0x2edd7b,_0x52393d){_0x52393d();extensions[_0x9e73('0xa')](_0x3db8fa,_0x14de8a[0x0]);},'afterUpdate':function(_0x5f06cb,_0x55b0c8){extensions[_0x9e73('0xa')](_0x3db8fa,_0x5f06cb);},'afterDestroy':function(_0x530e27,_0x186b89){extensions[_0x9e73('0xa')](_0x3db8fa,_0x530e27);}}});};