ab49a8429a13c20c7b56232d7bd681683980b77c
[motion2.git] / server / api / screenRecording / screenRecording.attributes.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xaf60=['value','STRING','replace','setDataValue','INTEGER','startedAt','format','toString','DATE','createdAt','MM-DD-YYYY\x20HH:mm','sequelize','moment','path','VIRTUAL','extname','getDataValue'];(function(_0xed97f3,_0x1b4657){var _0x52f921=function(_0x5009e0){while(--_0x5009e0){_0xed97f3['push'](_0xed97f3['shift']());}};_0x52f921(++_0x1b4657);}(_0xaf60,0x82));var _0x0af6=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0xaf60[_0xbca1b1];return _0x4e1686;};'use strict';var Sequelize=require(_0x0af6('0x0'));var moment=require(_0x0af6('0x1'));var path=require(_0x0af6('0x2'));var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize[_0x0af6('0x3')],'get':function(){return this['getDataValue']('value')?path[_0x0af6('0x4')](this[_0x0af6('0x5')](_0x0af6('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0x0af6('0x7')]},'channel':{'type':Sequelize[_0x0af6('0x7')]},'value':{'type':Sequelize[_0x0af6('0x7')],'set':function(_0x2eb218){var _0x52c997=_0x2eb218[_0x0af6('0x8')](/\\/g,'/');this[_0x0af6('0x9')]('value',_0x52c997);}},'rating':{'type':Sequelize[_0x0af6('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x0af6('0xa')],'set':function(_0xe9d01a){this['setDataValue']('startedAt',moment()['subtract'](_0xe9d01a,'ms'));this[_0x0af6('0x9')]('closedAt',moment());this[_0x0af6('0x9')]('duration',_0xe9d01a);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0af6('0x5')](_0x0af6('0xb')))[_0x0af6('0xc')]('MM-DD-YYYY\x20HH:mm')[_0x0af6('0xd')]();}},'closedAt':{'type':Sequelize[_0x0af6('0xe')],'get':function(){return moment(this[_0x0af6('0x5')]('closedAt'))[_0x0af6('0xc')]('MM-DD-YYYY\x20HH:mm')[_0x0af6('0xd')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0af6('0x5')](_0x0af6('0xf')))[_0x0af6('0xc')](_0x0af6('0x10'))['toString']();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue']('updatedAt'))['format'](_0x0af6('0x10'))[_0x0af6('0xd')]();}}};