Built motion from commit 97f2f211.|2.6.31
[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 _0x04fa=['STRING','setDataValue','closedAt','duration','startedAt','MM-DD-YYYY\x20HH:mm','toString','format','DATE','createdAt','updatedAt','moment','path','../../config/environment','exports','VIRTUAL','value','getDataValue'];(function(_0x471d74,_0x3935d3){var _0x3fc223=function(_0xa0242c){while(--_0xa0242c){_0x471d74['push'](_0x471d74['shift']());}};_0x3fc223(++_0x3935d3);}(_0x04fa,0x119));var _0xa04f=function(_0xf531bd,_0x4c55bb){_0xf531bd=_0xf531bd-0x0;var _0x30cc36=_0x04fa[_0xf531bd];return _0x30cc36;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xa04f('0x0'));var path=require(_0xa04f('0x1'));var config=require(_0xa04f('0x2'));module[_0xa04f('0x3')]={'format':{'type':Sequelize[_0xa04f('0x4')],'get':function(){return this['getDataValue'](_0xa04f('0x5'))?path['extname'](this[_0xa04f('0x6')](_0xa04f('0x5'))):undefined;}},'interactionid':{'type':Sequelize[_0xa04f('0x7')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0xa04f('0x7')],'set':function(_0x2c521c){var _0x315771=_0x2c521c['replace'](/\\/g,'/');this[_0xa04f('0x8')]('value',_0x315771);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x5ea498){this[_0xa04f('0x8')]('startedAt',moment()['subtract'](_0x5ea498,'ms'));this[_0xa04f('0x8')](_0xa04f('0x9'),moment());this['setDataValue'](_0xa04f('0xa'),_0x5ea498);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xa04f('0x6')](_0xa04f('0xb')))['format'](_0xa04f('0xc'))[_0xa04f('0xd')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue']('closedAt'))[_0xa04f('0xe')](_0xa04f('0xc'))[_0xa04f('0xd')]();}},'createdAt':{'type':Sequelize[_0xa04f('0xf')],'get':function(){return moment(this[_0xa04f('0x6')](_0xa04f('0x10')))['format'](_0xa04f('0xc'))[_0xa04f('0xd')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xa04f('0x6')](_0xa04f('0x11')))[_0xa04f('0xe')](_0xa04f('0xc'))['toString']();}}};