134e18e064c01ef9f71682b8418813f04663ceff
[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 _0xe14b=['replace','INTEGER','setDataValue','startedAt','closedAt','DATE','getDataValue','format','MM-DD-YYYY\x20HH:mm','toString','updatedAt','sequelize','moment','exports','VIRTUAL','value','STRING'];(function(_0x49b95,_0x40371){var _0xa3d29d=function(_0x3854c5){while(--_0x3854c5){_0x49b95['push'](_0x49b95['shift']());}};_0xa3d29d(++_0x40371);}(_0xe14b,0x93));var _0xbe14=function(_0x2fb37b,_0x5c1a95){_0x2fb37b=_0x2fb37b-0x0;var _0x4d5040=_0xe14b[_0x2fb37b];return _0x4d5040;};'use strict';var Sequelize=require(_0xbe14('0x0'));var moment=require(_0xbe14('0x1'));var path=require('path');var config=require('../../config/environment');module[_0xbe14('0x2')]={'format':{'type':Sequelize[_0xbe14('0x3')],'get':function(){return this['getDataValue'](_0xbe14('0x4'))?path['extname'](this['getDataValue'](_0xbe14('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0xbe14('0x5')]},'channel':{'type':Sequelize[_0xbe14('0x5')]},'value':{'type':Sequelize[_0xbe14('0x5')],'set':function(_0x1d9ade){var _0x39387e=_0x1d9ade[_0xbe14('0x6')](/\\/g,'/');this['setDataValue']('value',_0x39387e);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xbe14('0x7')],'set':function(_0x6fceff){this[_0xbe14('0x8')](_0xbe14('0x9'),moment()['subtract'](_0x6fceff,'ms'));this['setDataValue'](_0xbe14('0xa'),moment());this[_0xbe14('0x8')]('duration',_0x6fceff);}},'startedAt':{'type':Sequelize[_0xbe14('0xb')],'get':function(){return moment(this[_0xbe14('0xc')](_0xbe14('0x9')))[_0xbe14('0xd')](_0xbe14('0xe'))[_0xbe14('0xf')]();}},'closedAt':{'type':Sequelize[_0xbe14('0xb')],'get':function(){return moment(this[_0xbe14('0xc')](_0xbe14('0xa')))[_0xbe14('0xd')](_0xbe14('0xe'))[_0xbe14('0xf')]();}},'createdAt':{'type':Sequelize[_0xbe14('0xb')],'get':function(){return moment(this['getDataValue']('createdAt'))[_0xbe14('0xd')](_0xbe14('0xe'))[_0xbe14('0xf')]();}},'updatedAt':{'type':Sequelize[_0xbe14('0xb')],'get':function(){return moment(this['getDataValue'](_0xbe14('0x10')))[_0xbe14('0xd')](_0xbe14('0xe'))[_0xbe14('0xf')]();}}};