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 _0x1be6=['util','../../config/logger','api','bluebird','request-promise','../../config/environment','./openchannelInteraction.attributes','OpenchannelInteraction','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash'];(function(_0x5ed93c,_0x2906d3){var _0x4e8de8=function(_0x46afa6){while(--_0x46afa6){_0x5ed93c['push'](_0x5ed93c['shift']());}};_0x4e8de8(++_0x2906d3);}(_0x1be6,0x8f));var _0x61be=function(_0x97264,_0x5db8a7){_0x97264=_0x97264-0x0;var _0x4c3d58=_0x1be6[_0x97264];return _0x4c3d58;};'use strict';var _=require(_0x61be('0x0'));var util=require(_0x61be('0x1'));var logger=require(_0x61be('0x2'))(_0x61be('0x3'));var moment=require('moment');var BPromise=require(_0x61be('0x4'));var rp=require(_0x61be('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x61be('0x6'));var attributes=require(_0x61be('0x7'));module['exports']=function(_0x2d4001,_0x176e04){return _0x2d4001['define'](_0x61be('0x8'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x61be('0x9'),'collate':_0x61be('0xa'),'hooks':{'beforeUpdate':function(_0x2853a6,_0x1f4f9c,_0x56ab67){if(_0x2853a6[_0x61be('0xb')](_0x61be('0xc'))){_0x2853a6[_0x61be('0xd')]=moment()[_0x61be('0xe')](_0x61be('0xf'));}_0x56ab67(null,_0x2853a6);}}});};