Built motion from commit (unavailable).|2.5.4
[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 _0x833b=['../../components/extensions/rewrite','exports','define','Interval','tools_intervals','rewrite','util','api','bluebird','path','rimraf','../../config/environment','./interval.attributes'];(function(_0x2da995,_0x4d2210){var _0x216482=function(_0xfb8de2){while(--_0xfb8de2){_0x2da995['push'](_0x2da995['shift']());}};_0x216482(++_0x4d2210);}(_0x833b,0x131));var _0xb833=function(_0x819464,_0x46fc91){_0x819464=_0x819464-0x0;var _0x49dcc0=_0x833b[_0x819464];return _0x49dcc0;};'use strict';var _=require('lodash');var util=require(_0xb833('0x0'));var logger=require('../../config/logger')(_0xb833('0x1'));var moment=require('moment');var BPromise=require(_0xb833('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb833('0x3'));var rimraf=require(_0xb833('0x4'));var config=require(_0xb833('0x5'));var attributes=require(_0xb833('0x6'));var extensions=require(_0xb833('0x7'));module[_0xb833('0x8')]=function(_0x4422a2,_0x4eaff4){return _0x4422a2[_0xb833('0x9')](_0xb833('0xa'),attributes,{'tableName':_0xb833('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2525aa,_0x3b74c4){extensions[_0xb833('0xc')](_0x4422a2,_0x2525aa);},'afterBulkCreate':function(_0x26cbf6,_0x50cb16,_0x1660db){_0x1660db();extensions['rewrite'](_0x4422a2,_0x26cbf6[0x0]);},'afterUpdate':function(_0x55ab06,_0x2dc315){extensions[_0xb833('0xc')](_0x4422a2,_0x55ab06);},'afterDestroy':function(_0x193b4d,_0x492017){extensions['rewrite'](_0x4422a2,_0x193b4d);}}});};