673581bba6c8ab401378b09378d26dbb3bc23afc
[motion2.git] / server / api / faxInteraction / faxInteraction.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 _0x48e6=['rimraf','../../config/environment','./faxInteraction.attributes','exports','FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','request-promise','path'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x48e6,0x170));var _0x648e=function(_0x1a5a53,_0x4fbf03){_0x1a5a53=_0x1a5a53-0x0;var _0x565c2d=_0x48e6[_0x1a5a53];return _0x565c2d;};'use strict';var _=require(_0x648e('0x0'));var util=require('util');var logger=require(_0x648e('0x1'))(_0x648e('0x2'));var moment=require(_0x648e('0x3'));var BPromise=require('bluebird');var rp=require(_0x648e('0x4'));var fs=require('fs');var path=require(_0x648e('0x5'));var rimraf=require(_0x648e('0x6'));var config=require(_0x648e('0x7'));var attributes=require(_0x648e('0x8'));module[_0x648e('0x9')]=function(_0x2c878f,_0x340bfa){return _0x2c878f['define'](_0x648e('0xa'),attributes,{'tableName':_0x648e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x243cf0,_0x1c91b2,_0x27f1a6){if(_0x243cf0[_0x648e('0xc')](_0x648e('0xd'))){_0x243cf0[_0x648e('0xe')]=moment()[_0x648e('0xf')](_0x648e('0x10'));}_0x27f1a6(null,_0x243cf0);}}});};