Built motion from commit (unavailable).|2.5.5
[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 _0xe99c=['define','Interval','tools_intervals','rewrite','lodash','../../config/logger','api','moment','bluebird','request-promise','path','./interval.attributes','exports'];(function(_0x2bebf1,_0xf3b228){var _0xd2cddb=function(_0x2f7bcb){while(--_0x2f7bcb){_0x2bebf1['push'](_0x2bebf1['shift']());}};_0xd2cddb(++_0xf3b228);}(_0xe99c,0x197));var _0xce99=function(_0x1a61b0,_0x554554){_0x1a61b0=_0x1a61b0-0x0;var _0x164b0d=_0xe99c[_0x1a61b0];return _0x164b0d;};'use strict';var _=require(_0xce99('0x0'));var util=require('util');var logger=require(_0xce99('0x1'))(_0xce99('0x2'));var moment=require(_0xce99('0x3'));var BPromise=require(_0xce99('0x4'));var rp=require(_0xce99('0x5'));var fs=require('fs');var path=require(_0xce99('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xce99('0x7'));var extensions=require('../../components/extensions/rewrite');module[_0xce99('0x8')]=function(_0x58e2aa,_0x3755dd){return _0x58e2aa[_0xce99('0x9')](_0xce99('0xa'),attributes,{'tableName':_0xce99('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x39df1c,_0x3675ef){extensions[_0xce99('0xc')](_0x58e2aa,_0x39df1c);},'afterBulkCreate':function(_0x48aa48,_0x5727f2,_0x3ceb6f){_0x3ceb6f();extensions[_0xce99('0xc')](_0x58e2aa,_0x48aa48[0x0]);},'afterUpdate':function(_0x4c7423,_0x26ac93){extensions[_0xce99('0xc')](_0x58e2aa,_0x4c7423);},'afterDestroy':function(_0x136e38,_0x57a7f0){extensions[_0xce99('0xc')](_0x58e2aa,_0x136e38);}}});};