Built motion from commit eddce310.|2.6.12
[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 _0x28f2=['MM-DD-YYYY\x20HH:mm','toString','createdAt','sequelize','moment','path','../../config/environment','exports','getDataValue','value','extname','STRING','replace','setDataValue','INTEGER','startedAt','closedAt','duration','DATE','format'];(function(_0x25cdb9,_0x4d338f){var _0x2ce804=function(_0xd1eb7e){while(--_0xd1eb7e){_0x25cdb9['push'](_0x25cdb9['shift']());}};_0x2ce804(++_0x4d338f);}(_0x28f2,0x193));var _0x228f=function(_0x361461,_0x4aa846){_0x361461=_0x361461-0x0;var _0xcbc5b9=_0x28f2[_0x361461];return _0xcbc5b9;};'use strict';var Sequelize=require(_0x228f('0x0'));var moment=require(_0x228f('0x1'));var path=require(_0x228f('0x2'));var config=require(_0x228f('0x3'));module[_0x228f('0x4')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x228f('0x5')](_0x228f('0x6'))?path[_0x228f('0x7')](this[_0x228f('0x5')](_0x228f('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0x228f('0x8')]},'channel':{'type':Sequelize[_0x228f('0x8')]},'value':{'type':Sequelize['STRING'],'set':function(_0x10da58){var _0x4a4a44=_0x10da58[_0x228f('0x9')](/\\/g,'/');this[_0x228f('0xa')](_0x228f('0x6'),_0x4a4a44);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x228f('0xb')],'set':function(_0x4d0038){this[_0x228f('0xa')](_0x228f('0xc'),moment()['subtract'](_0x4d0038,'ms'));this[_0x228f('0xa')](_0x228f('0xd'),moment());this[_0x228f('0xa')](_0x228f('0xe'),_0x4d0038);}},'startedAt':{'type':Sequelize[_0x228f('0xf')],'get':function(){return moment(this['getDataValue'](_0x228f('0xc')))[_0x228f('0x10')](_0x228f('0x11'))[_0x228f('0x12')]();}},'closedAt':{'type':Sequelize[_0x228f('0xf')],'get':function(){return moment(this[_0x228f('0x5')](_0x228f('0xd')))[_0x228f('0x10')]('MM-DD-YYYY\x20HH:mm')[_0x228f('0x12')]();}},'createdAt':{'type':Sequelize[_0x228f('0xf')],'get':function(){return moment(this[_0x228f('0x5')](_0x228f('0x13')))[_0x228f('0x10')](_0x228f('0x11'))[_0x228f('0x12')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x228f('0x5')]('updatedAt'))[_0x228f('0x10')](_0x228f('0x11'))[_0x228f('0x12')]();}}};