Built motion from commit 10af8726.|2.6.34
[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 _0x4b17=['path','exports','VIRTUAL','value','STRING','replace','INTEGER','setDataValue','subtract','duration','DATE','getDataValue','format','toString','createdAt','MM-DD-YYYY\x20HH:mm','sequelize'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0x4b17,0x10f));var _0x74b1=function(_0x3aeb36,_0x312dc9){_0x3aeb36=_0x3aeb36-0x0;var _0xa2ef21=_0x4b17[_0x3aeb36];return _0xa2ef21;};'use strict';var Sequelize=require(_0x74b1('0x0'));var moment=require('moment');var path=require(_0x74b1('0x1'));var config=require('../../config/environment');module[_0x74b1('0x2')]={'format':{'type':Sequelize[_0x74b1('0x3')],'get':function(){return this['getDataValue'](_0x74b1('0x4'))?path['extname'](this['getDataValue'](_0x74b1('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x74b1('0x5')]},'channel':{'type':Sequelize[_0x74b1('0x5')]},'value':{'type':Sequelize[_0x74b1('0x5')],'set':function(_0x371c3b){var _0x191d2b=_0x371c3b[_0x74b1('0x6')](/\\/g,'/');this['setDataValue'](_0x74b1('0x4'),_0x191d2b);}},'rating':{'type':Sequelize[_0x74b1('0x7')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x74b1('0x7')],'set':function(_0x25382b){this[_0x74b1('0x8')]('startedAt',moment()[_0x74b1('0x9')](_0x25382b,'ms'));this[_0x74b1('0x8')]('closedAt',moment());this[_0x74b1('0x8')](_0x74b1('0xa'),_0x25382b);}},'startedAt':{'type':Sequelize[_0x74b1('0xb')],'get':function(){return moment(this[_0x74b1('0xc')]('startedAt'))[_0x74b1('0xd')]('MM-DD-YYYY\x20HH:mm')['toString']();}},'closedAt':{'type':Sequelize[_0x74b1('0xb')],'get':function(){return moment(this[_0x74b1('0xc')]('closedAt'))['format']('MM-DD-YYYY\x20HH:mm')[_0x74b1('0xe')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x74b1('0xf')))[_0x74b1('0xd')](_0x74b1('0x10'))[_0x74b1('0xe')]();}},'updatedAt':{'type':Sequelize[_0x74b1('0xb')],'get':function(){return moment(this[_0x74b1('0xc')]('updatedAt'))[_0x74b1('0xd')](_0x74b1('0x10'))[_0x74b1('0xe')]();}}};