Built motion from commit 19a84241.|2.5.34
[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 _0x1e78=['define','Interval','tools_intervals','rewrite','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports'];(function(_0x4c12ec,_0x2e9103){var _0x3ae42c=function(_0x5a728f){while(--_0x5a728f){_0x4c12ec['push'](_0x4c12ec['shift']());}};_0x3ae42c(++_0x2e9103);}(_0x1e78,0x74));var _0x81e7=function(_0x415e40,_0x29184a){_0x415e40=_0x415e40-0x0;var _0x23f173=_0x1e78[_0x415e40];return _0x23f173;};'use strict';var _=require('lodash');var util=require(_0x81e7('0x0'));var logger=require(_0x81e7('0x1'))('api');var moment=require('moment');var BPromise=require(_0x81e7('0x2'));var rp=require(_0x81e7('0x3'));var fs=require('fs');var path=require(_0x81e7('0x4'));var rimraf=require(_0x81e7('0x5'));var config=require(_0x81e7('0x6'));var attributes=require(_0x81e7('0x7'));var extensions=require(_0x81e7('0x8'));module[_0x81e7('0x9')]=function(_0x4eb373,_0x38fb03){return _0x4eb373[_0x81e7('0xa')](_0x81e7('0xb'),attributes,{'tableName':_0x81e7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2cb001,_0x7f2846){extensions[_0x81e7('0xd')](_0x4eb373,_0x2cb001);},'afterBulkCreate':function(_0x131dda,_0xc82590,_0x56b28e){_0x56b28e();extensions[_0x81e7('0xd')](_0x4eb373,_0x131dda[0x0]);},'afterUpdate':function(_0x32bf7e,_0x33811d){extensions[_0x81e7('0xd')](_0x4eb373,_0x32bf7e);},'afterDestroy':function(_0x361d65,_0x16986a){extensions[_0x81e7('0xd')](_0x4eb373,_0x361d65);}}});};