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 _0x5c5a=['subtract','duration','DATE','format','toString','closedAt','MM-DD-YYYY\x20HH:mm','createdAt','moment','path','../../config/environment','VIRTUAL','getDataValue','value','extname','STRING','replace','INTEGER','setDataValue','startedAt'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x5c5a,0x198));var _0xa5c5=function(_0x4a0c35,_0x3218ab){_0x4a0c35=_0x4a0c35-0x0;var _0x318b08=_0x5c5a[_0x4a0c35];return _0x318b08;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xa5c5('0x0'));var path=require(_0xa5c5('0x1'));var config=require(_0xa5c5('0x2'));module['exports']={'format':{'type':Sequelize[_0xa5c5('0x3')],'get':function(){return this[_0xa5c5('0x4')](_0xa5c5('0x5'))?path[_0xa5c5('0x6')](this['getDataValue'](_0xa5c5('0x5'))):undefined;}},'interactionid':{'type':Sequelize[_0xa5c5('0x7')]},'channel':{'type':Sequelize[_0xa5c5('0x7')]},'value':{'type':Sequelize['STRING'],'set':function(_0x249017){var _0x53d781=_0x249017[_0xa5c5('0x8')](/\\/g,'/');this['setDataValue'](_0xa5c5('0x5'),_0x53d781);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xa5c5('0x9')],'set':function(_0x5219f6){this[_0xa5c5('0xa')](_0xa5c5('0xb'),moment()[_0xa5c5('0xc')](_0x5219f6,'ms'));this['setDataValue']('closedAt',moment());this['setDataValue'](_0xa5c5('0xd'),_0x5219f6);}},'startedAt':{'type':Sequelize[_0xa5c5('0xe')],'get':function(){return moment(this[_0xa5c5('0x4')](_0xa5c5('0xb')))[_0xa5c5('0xf')]('MM-DD-YYYY\x20HH:mm')[_0xa5c5('0x10')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xa5c5('0x4')](_0xa5c5('0x11')))['format'](_0xa5c5('0x12'))[_0xa5c5('0x10')]();}},'createdAt':{'type':Sequelize[_0xa5c5('0xe')],'get':function(){return moment(this[_0xa5c5('0x4')](_0xa5c5('0x13')))[_0xa5c5('0xf')](_0xa5c5('0x12'))['toString']();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xa5c5('0x4')]('updatedAt'))[_0xa5c5('0xf')](_0xa5c5('0x12'))['toString']();}}};