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 _0xfa26=['util','bluebird','request-promise','path','rimraf','../../config/environment','define','FaxInteraction','fax_interactions','closed','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfa26,0x150));var _0x6fa2=function(_0x5be410,_0x5cc023){_0x5be410=_0x5be410-0x0;var _0x5b7f06=_0xfa26[_0x5be410];return _0x5b7f06;};'use strict';var _=require('lodash');var util=require(_0x6fa2('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x6fa2('0x1'));var rp=require(_0x6fa2('0x2'));var fs=require('fs');var path=require(_0x6fa2('0x3'));var rimraf=require(_0x6fa2('0x4'));var config=require(_0x6fa2('0x5'));var attributes=require('./faxInteraction.attributes');module['exports']=function(_0x359622,_0x57fd3b){return _0x359622[_0x6fa2('0x6')](_0x6fa2('0x7'),attributes,{'tableName':_0x6fa2('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x434ea5,_0x3c85e8,_0x4a5421){if(_0x434ea5['changed'](_0x6fa2('0x9'))){_0x434ea5['closedAt']=moment()[_0x6fa2('0xa')](_0x6fa2('0xb'));}_0x4a5421(null,_0x434ea5);}}});};