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 _0x1fc4=['utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x359e4f,_0x25efbe){var _0x3d0d31=function(_0x5b9420){while(--_0x5b9420){_0x359e4f['push'](_0x359e4f['shift']());}};_0x3d0d31(++_0x25efbe);}(_0x1fc4,0x1b2));var _0x41fc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1fc4[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x41fc('0x0'));var util=require('util');var logger=require(_0x41fc('0x1'))('api');var moment=require('moment');var BPromise=require(_0x41fc('0x2'));var rp=require(_0x41fc('0x3'));var fs=require('fs');var path=require(_0x41fc('0x4'));var rimraf=require(_0x41fc('0x5'));var config=require(_0x41fc('0x6'));var attributes=require(_0x41fc('0x7'));module[_0x41fc('0x8')]=function(_0x256856,_0x5c3860){return _0x256856[_0x41fc('0x9')](_0x41fc('0xa'),attributes,{'tableName':_0x41fc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x542ca1,_0xb3ae81,_0x5bb617){if(_0x542ca1[_0x41fc('0xc')]('closed')){_0x542ca1[_0x41fc('0xd')]=moment()[_0x41fc('0xe')](_0x41fc('0xf'));}_0x5bb617(null,_0x542ca1);}},'charset':_0x41fc('0x10'),'collate':_0x41fc('0x11')});};