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 _0x87bc=['toString','updatedAt','sequelize','moment','../../config/environment','getDataValue','extname','STRING','value','INTEGER','setDataValue','startedAt','subtract','closedAt','DATE','format','MM-DD-YYYY\x20HH:mm'];(function(_0x95942,_0x85da80){var _0x6d7f81=function(_0x510549){while(--_0x510549){_0x95942['push'](_0x95942['shift']());}};_0x6d7f81(++_0x85da80);}(_0x87bc,0x189));var _0xc87b=function(_0xa869ce,_0x548c53){_0xa869ce=_0xa869ce-0x0;var _0x4d277f=_0x87bc[_0xa869ce];return _0x4d277f;};'use strict';var Sequelize=require(_0xc87b('0x0'));var moment=require(_0xc87b('0x1'));var path=require('path');var config=require(_0xc87b('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0xc87b('0x3')]('value')?path[_0xc87b('0x4')](this['getDataValue']('value')):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xc87b('0x5')]},'value':{'type':Sequelize[_0xc87b('0x5')],'set':function(_0x402aac){var _0x5d1813=_0x402aac['replace'](/\\/g,'/');this['setDataValue'](_0xc87b('0x6'),_0x5d1813);}},'rating':{'type':Sequelize[_0xc87b('0x7')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xc87b('0x7')],'set':function(_0x19b571){this[_0xc87b('0x8')](_0xc87b('0x9'),moment()[_0xc87b('0xa')](_0x19b571,'ms'));this[_0xc87b('0x8')](_0xc87b('0xb'),moment());this['setDataValue']('duration',_0x19b571);}},'startedAt':{'type':Sequelize[_0xc87b('0xc')],'get':function(){return moment(this['getDataValue'](_0xc87b('0x9')))[_0xc87b('0xd')](_0xc87b('0xe'))[_0xc87b('0xf')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xc87b('0x3')]('closedAt'))[_0xc87b('0xd')](_0xc87b('0xe'))['toString']();}},'createdAt':{'type':Sequelize[_0xc87b('0xc')],'get':function(){return moment(this[_0xc87b('0x3')]('createdAt'))[_0xc87b('0xd')](_0xc87b('0xe'))[_0xc87b('0xf')]();}},'updatedAt':{'type':Sequelize[_0xc87b('0xc')],'get':function(){return moment(this[_0xc87b('0x3')](_0xc87b('0x10')))[_0xc87b('0xd')](_0xc87b('0xe'))['toString']();}}};