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 _0xef43=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','define','ChatInteraction','chat_interactions','changed'];(function(_0x46ec32,_0x1e842f){var _0x338f60=function(_0x10e02c){while(--_0x10e02c){_0x46ec32['push'](_0x46ec32['shift']());}};_0x338f60(++_0x1e842f);}(_0xef43,0xd6));var _0x3ef4=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xef43[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require(_0x3ef4('0x0'));var logger=require(_0x3ef4('0x1'))(_0x3ef4('0x2'));var moment=require(_0x3ef4('0x3'));var BPromise=require(_0x3ef4('0x4'));var rp=require(_0x3ef4('0x5'));var fs=require('fs');var path=require(_0x3ef4('0x6'));var rimraf=require(_0x3ef4('0x7'));var config=require(_0x3ef4('0x8'));var attributes=require(_0x3ef4('0x9'));module['exports']=function(_0x220632,_0x22c907){return _0x220632[_0x3ef4('0xa')](_0x3ef4('0xb'),attributes,{'tableName':_0x3ef4('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1d18d2,_0x4baefd,_0x2011c6){if(_0x1d18d2[_0x3ef4('0xd')](_0x3ef4('0xe'))){_0x1d18d2[_0x3ef4('0xf')]=moment()[_0x3ef4('0x10')](_0x3ef4('0x11'));}_0x2011c6(null,_0x1d18d2);}},'charset':_0x3ef4('0x12'),'collate':'utf8mb4_unicode_ci'});};