1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xd44d=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','bluebird','path','rimraf','./faxInteraction.attributes','exports','FaxInteraction','fax_interactions','changed','closedAt'];(function(_0x19c71e,_0x513c5b){var _0xf7df9b=function(_0x367349){while(--_0x367349){_0x19c71e['push'](_0x19c71e['shift']());}};_0xf7df9b(++_0x513c5b);}(_0xd44d,0x1b5));var _0xdd44=function(_0x8d817,_0x1429e5){_0x8d817=_0x8d817-0x0;var _0x1e8458=_0xd44d[_0x8d817];return _0x1e8458;};'use strict';var _=require(_0xdd44('0x0'));var util=require(_0xdd44('0x1'));var logger=require(_0xdd44('0x2'))('api');var moment=require(_0xdd44('0x3'));var BPromise=require(_0xdd44('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdd44('0x5'));var rimraf=require(_0xdd44('0x6'));var config=require('../../config/environment');var attributes=require(_0xdd44('0x7'));module[_0xdd44('0x8')]=function(_0x5886b8,_0x4f1d28){return _0x5886b8['define'](_0xdd44('0x9'),attributes,{'tableName':_0xdd44('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x59ec38,_0x8b2fa5,_0x22c5c5){if(_0x59ec38[_0xdd44('0xb')]('closed')){_0x59ec38[_0xdd44('0xc')]=moment()[_0xdd44('0xd')](_0xdd44('0xe'));}_0x22c5c5(null,_0x59ec38);}}});};