Built motion from commit b5413ace.|2.6.9
[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 _0x57ca=['MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','moment','path','exports','VIRTUAL','getDataValue','value','extname','STRING','replace','setDataValue','INTEGER','subtract','closedAt','DATE','startedAt','format'];(function(_0x33dd02,_0x4606de){var _0x293ff1=function(_0x58b6f4){while(--_0x58b6f4){_0x33dd02['push'](_0x33dd02['shift']());}};_0x293ff1(++_0x4606de);}(_0x57ca,0x108));var _0xa57c=function(_0x24e0e9,_0x50b14e){_0x24e0e9=_0x24e0e9-0x0;var _0x1f5aed=_0x57ca[_0x24e0e9];return _0x1f5aed;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xa57c('0x0'));var path=require(_0xa57c('0x1'));var config=require('../../config/environment');module[_0xa57c('0x2')]={'format':{'type':Sequelize[_0xa57c('0x3')],'get':function(){return this[_0xa57c('0x4')](_0xa57c('0x5'))?path[_0xa57c('0x6')](this['getDataValue'](_0xa57c('0x5'))):undefined;}},'interactionid':{'type':Sequelize[_0xa57c('0x7')]},'channel':{'type':Sequelize[_0xa57c('0x7')]},'value':{'type':Sequelize[_0xa57c('0x7')],'set':function(_0xbdfffb){var _0x314574=_0xbdfffb[_0xa57c('0x8')](/\\/g,'/');this[_0xa57c('0x9')]('value',_0x314574);}},'rating':{'type':Sequelize[_0xa57c('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x46ba92){this[_0xa57c('0x9')]('startedAt',moment()[_0xa57c('0xb')](_0x46ba92,'ms'));this['setDataValue'](_0xa57c('0xc'),moment());this[_0xa57c('0x9')]('duration',_0x46ba92);}},'startedAt':{'type':Sequelize[_0xa57c('0xd')],'get':function(){return moment(this['getDataValue'](_0xa57c('0xe')))[_0xa57c('0xf')](_0xa57c('0x10'))[_0xa57c('0x11')]();}},'closedAt':{'type':Sequelize[_0xa57c('0xd')],'get':function(){return moment(this['getDataValue'](_0xa57c('0xc')))['format'](_0xa57c('0x10'))[_0xa57c('0x11')]();}},'createdAt':{'type':Sequelize[_0xa57c('0xd')],'get':function(){return moment(this[_0xa57c('0x4')](_0xa57c('0x12')))[_0xa57c('0xf')](_0xa57c('0x10'))['toString']();}},'updatedAt':{'type':Sequelize[_0xa57c('0xd')],'get':function(){return moment(this[_0xa57c('0x4')](_0xa57c('0x13')))['format'](_0xa57c('0x10'))['toString']();}}};