Built motion from commit 753c950e.|2.5.42
[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 _0x6fad=['path','../../config/environment','exports','getDataValue','extname','value','STRING','replace','setDataValue','INTEGER','startedAt','subtract','closedAt','DATE','MM-DD-YYYY\x20HH:mm','toString','format','sequelize','moment'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0x6fad,0x17a));var _0xd6fa=function(_0x18bbf3,_0x534e5c){_0x18bbf3=_0x18bbf3-0x0;var _0xce70bd=_0x6fad[_0x18bbf3];return _0xce70bd;};'use strict';var Sequelize=require(_0xd6fa('0x0'));var moment=require(_0xd6fa('0x1'));var path=require(_0xd6fa('0x2'));var config=require(_0xd6fa('0x3'));module[_0xd6fa('0x4')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0xd6fa('0x5')]('value')?path[_0xd6fa('0x6')](this['getDataValue'](_0xd6fa('0x7'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xd6fa('0x8')]},'value':{'type':Sequelize[_0xd6fa('0x8')],'set':function(_0x2ed68a){var _0x1d5e36=_0x2ed68a[_0xd6fa('0x9')](/\\/g,'/');this[_0xd6fa('0xa')](_0xd6fa('0x7'),_0x1d5e36);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xd6fa('0xb')],'set':function(_0x48092f){this[_0xd6fa('0xa')](_0xd6fa('0xc'),moment()[_0xd6fa('0xd')](_0x48092f,'ms'));this[_0xd6fa('0xa')](_0xd6fa('0xe'),moment());this['setDataValue']('duration',_0x48092f);}},'startedAt':{'type':Sequelize[_0xd6fa('0xf')],'get':function(){return moment(this[_0xd6fa('0x5')](_0xd6fa('0xc')))['format'](_0xd6fa('0x10'))[_0xd6fa('0x11')]();}},'closedAt':{'type':Sequelize[_0xd6fa('0xf')],'get':function(){return moment(this[_0xd6fa('0x5')](_0xd6fa('0xe')))[_0xd6fa('0x12')](_0xd6fa('0x10'))['toString']();}},'createdAt':{'type':Sequelize[_0xd6fa('0xf')],'get':function(){return moment(this['getDataValue']('createdAt'))[_0xd6fa('0x12')](_0xd6fa('0x10'))['toString']();}},'updatedAt':{'type':Sequelize[_0xd6fa('0xf')],'get':function(){return moment(this[_0xd6fa('0x5')]('updatedAt'))[_0xd6fa('0x12')](_0xd6fa('0x10'))[_0xd6fa('0x11')]();}}};