Built motion from commit (unavailable).|2.5.21
[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 _0xae24=['value','STRING','setDataValue','subtract','closedAt','DATE','getDataValue','startedAt','MM-DD-YYYY\x20HH:mm','toString','format','updatedAt','sequelize','path','exports','VIRTUAL','extname'];(function(_0x57b026,_0x25b298){var _0x5024de=function(_0x5075ff){while(--_0x5075ff){_0x57b026['push'](_0x57b026['shift']());}};_0x5024de(++_0x25b298);}(_0xae24,0x182));var _0x4ae2=function(_0xc5be16,_0x371ce1){_0xc5be16=_0xc5be16-0x0;var _0x46ab9d=_0xae24[_0xc5be16];return _0x46ab9d;};'use strict';var Sequelize=require(_0x4ae2('0x0'));var moment=require('moment');var path=require(_0x4ae2('0x1'));var config=require('../../config/environment');module[_0x4ae2('0x2')]={'format':{'type':Sequelize[_0x4ae2('0x3')],'get':function(){return this['getDataValue']('value')?path[_0x4ae2('0x4')](this['getDataValue'](_0x4ae2('0x5'))):undefined;}},'interactionid':{'type':Sequelize[_0x4ae2('0x6')]},'channel':{'type':Sequelize[_0x4ae2('0x6')]},'value':{'type':Sequelize[_0x4ae2('0x6')],'set':function(_0x428054){var _0x307247=_0x428054['replace'](/\\/g,'/');this['setDataValue'](_0x4ae2('0x5'),_0x307247);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0xb5587a){this[_0x4ae2('0x7')]('startedAt',moment()[_0x4ae2('0x8')](_0xb5587a,'ms'));this[_0x4ae2('0x7')](_0x4ae2('0x9'),moment());this[_0x4ae2('0x7')]('duration',_0xb5587a);}},'startedAt':{'type':Sequelize[_0x4ae2('0xa')],'get':function(){return moment(this[_0x4ae2('0xb')](_0x4ae2('0xc')))['format'](_0x4ae2('0xd'))[_0x4ae2('0xe')]();}},'closedAt':{'type':Sequelize[_0x4ae2('0xa')],'get':function(){return moment(this[_0x4ae2('0xb')](_0x4ae2('0x9')))[_0x4ae2('0xf')](_0x4ae2('0xd'))[_0x4ae2('0xe')]();}},'createdAt':{'type':Sequelize[_0x4ae2('0xa')],'get':function(){return moment(this['getDataValue']('createdAt'))['format'](_0x4ae2('0xd'))[_0x4ae2('0xe')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x4ae2('0xb')](_0x4ae2('0x10')))[_0x4ae2('0xf')](_0x4ae2('0xd'))[_0x4ae2('0xe')]();}}};