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 _0x28ec=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closed','closedAt'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x28ec,0x92));var _0xc28e=function(_0x45d937,_0x9cb187){_0x45d937=_0x45d937-0x0;var _0x115bf8=_0x28ec[_0x45d937];return _0x115bf8;};'use strict';var _=require(_0xc28e('0x0'));var util=require(_0xc28e('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xc28e('0x2'));var rp=require(_0xc28e('0x3'));var fs=require('fs');var path=require(_0xc28e('0x4'));var rimraf=require(_0xc28e('0x5'));var config=require(_0xc28e('0x6'));var attributes=require(_0xc28e('0x7'));module['exports']=function(_0x488cad,_0x5ce271){return _0x488cad[_0xc28e('0x8')](_0xc28e('0x9'),attributes,{'tableName':_0xc28e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5f3880,_0x97219c,_0x27d564){if(_0x5f3880[_0xc28e('0xb')](_0xc28e('0xc'))){_0x5f3880[_0xc28e('0xd')]=moment()[_0xc28e('0xe')](_0xc28e('0xf'));}_0x27d564(null,_0x5f3880);}}});};