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 _0x15b2=['SmsInteraction','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define'];(function(_0x3f4568,_0x9eb0ee){var _0xee2340=function(_0xdefabb){while(--_0xdefabb){_0x3f4568['push'](_0x3f4568['shift']());}};_0xee2340(++_0x9eb0ee);}(_0x15b2,0x116));var _0x215b=function(_0x5d9ce1,_0x4a1556){_0x5d9ce1=_0x5d9ce1-0x0;var _0x1fd84e=_0x15b2[_0x5d9ce1];return _0x1fd84e;};'use strict';var _=require('lodash');var util=require(_0x215b('0x0'));var logger=require(_0x215b('0x1'))(_0x215b('0x2'));var moment=require(_0x215b('0x3'));var BPromise=require(_0x215b('0x4'));var rp=require(_0x215b('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x215b('0x6'));var config=require(_0x215b('0x7'));var attributes=require('./smsInteraction.attributes');module[_0x215b('0x8')]=function(_0x3ce6c5,_0x14d0ce){return _0x3ce6c5[_0x215b('0x9')](_0x215b('0xa'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x372648,_0x5bf74b,_0x26eef0){if(_0x372648[_0x215b('0xb')](_0x215b('0xc'))){_0x372648[_0x215b('0xd')]=moment()[_0x215b('0xe')](_0x215b('0xf'));}_0x26eef0(null,_0x372648);}}});};