3af89b7e37494857499de1105331020978ec75a9
[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 _0xebca=['./interval.attributes','exports','define','tools_intervals','rewrite','lodash','util','api','bluebird','request-promise','rimraf'];(function(_0x1a8aa9,_0x1a2307){var _0x44382e=function(_0x51efeb){while(--_0x51efeb){_0x1a8aa9['push'](_0x1a8aa9['shift']());}};_0x44382e(++_0x1a2307);}(_0xebca,0x1f4));var _0xaebc=function(_0x1d0b80,_0x41fc24){_0x1d0b80=_0x1d0b80-0x0;var _0x35d642=_0xebca[_0x1d0b80];return _0x35d642;};'use strict';var _=require(_0xaebc('0x0'));var util=require(_0xaebc('0x1'));var logger=require('../../config/logger')(_0xaebc('0x2'));var moment=require('moment');var BPromise=require(_0xaebc('0x3'));var rp=require(_0xaebc('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xaebc('0x5'));var config=require('../../config/environment');var attributes=require(_0xaebc('0x6'));var extensions=require('../../components/extensions/rewrite');module[_0xaebc('0x7')]=function(_0x5edb25,_0x192910){return _0x5edb25[_0xaebc('0x8')]('Interval',attributes,{'tableName':_0xaebc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2bcfdb,_0x1f7980){extensions[_0xaebc('0xa')](_0x5edb25,_0x2bcfdb);},'afterBulkCreate':function(_0x2ac8be,_0x304644,_0x11f100){_0x11f100();extensions[_0xaebc('0xa')](_0x5edb25,_0x2ac8be[0x0]);},'afterUpdate':function(_0x5e47a2,_0x10f867){extensions[_0xaebc('0xa')](_0x5edb25,_0x5e47a2);},'afterDestroy':function(_0x3227c3,_0x24fdfc){extensions[_0xaebc('0xa')](_0x5edb25,_0x3227c3);}}});};