Built motion from commit (unavailable).|2.3.1
[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 _0x0c7a=['rewrite','lodash','../../config/logger','moment','bluebird','request-promise','../../components/extensions/rewrite','exports','define','Interval','tools_intervals'];(function(_0x2101bd,_0x24dbd1){var _0x4afc0d=function(_0x29951c){while(--_0x29951c){_0x2101bd['push'](_0x2101bd['shift']());}};_0x4afc0d(++_0x24dbd1);}(_0x0c7a,0x1a3));var _0xa0c7=function(_0x6e4d83,_0x2435d8){_0x6e4d83=_0x6e4d83-0x0;var _0x3ce968=_0x0c7a[_0x6e4d83];return _0x3ce968;};'use strict';var _=require(_0xa0c7('0x0'));var util=require('util');var logger=require(_0xa0c7('0x1'))('api');var moment=require(_0xa0c7('0x2'));var BPromise=require(_0xa0c7('0x3'));var rp=require(_0xa0c7('0x4'));var attributes=require('./interval.attributes');var extensions=require(_0xa0c7('0x5'));module[_0xa0c7('0x6')]=function(_0x341d6b,_0x53f8b3){return _0x341d6b[_0xa0c7('0x7')](_0xa0c7('0x8'),attributes,{'tableName':_0xa0c7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x7fb922,_0x180e45){extensions[_0xa0c7('0xa')](_0x341d6b,_0x7fb922);},'afterBulkCreate':function(_0x9de770,_0x3841e0,_0x141741){_0x141741();extensions['rewrite'](_0x341d6b,_0x9de770[0x0]);},'afterUpdate':function(_0x31d33d,_0x5f2823){extensions[_0xa0c7('0xa')](_0x341d6b,_0x31d33d);},'afterDestroy':function(_0x541dae,_0x2abd20){extensions[_0xa0c7('0xa')](_0x341d6b,_0x541dae);}}});};