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 _0x5f70=['./faxInteraction.attributes','exports','FaxInteraction','fax_interactions','changed','closed','closedAt','format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x135cf6,_0x15285a){var _0x52bf11=function(_0x1038b1){while(--_0x1038b1){_0x135cf6['push'](_0x135cf6['shift']());}};_0x52bf11(++_0x15285a);}(_0x5f70,0x15e));var _0x05f7=function(_0x5de485,_0x2e7349){_0x5de485=_0x5de485-0x0;var _0x2137f5=_0x5f70[_0x5de485];return _0x2137f5;};'use strict';var _=require(_0x05f7('0x0'));var util=require(_0x05f7('0x1'));var logger=require(_0x05f7('0x2'))(_0x05f7('0x3'));var moment=require(_0x05f7('0x4'));var BPromise=require(_0x05f7('0x5'));var rp=require(_0x05f7('0x6'));var fs=require('fs');var path=require(_0x05f7('0x7'));var rimraf=require(_0x05f7('0x8'));var config=require(_0x05f7('0x9'));var attributes=require(_0x05f7('0xa'));module[_0x05f7('0xb')]=function(_0x53014c,_0x5f53d7){return _0x53014c['define'](_0x05f7('0xc'),attributes,{'tableName':_0x05f7('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x390560,_0x356bf5,_0x251498){if(_0x390560[_0x05f7('0xe')](_0x05f7('0xf'))){_0x390560[_0x05f7('0x10')]=moment()[_0x05f7('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x251498(null,_0x390560);}}});};