90994d03de0df56bf9834105609b213a7fa99b31
[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 _0x4b84=['createdAt','sequelize','moment','exports','value','extname','getDataValue','STRING','setDataValue','INTEGER','subtract','closedAt','duration','DATE','format','MM-DD-YYYY\x20HH:mm','toString'];(function(_0x4aa716,_0x5320a0){var _0x332982=function(_0x2088c3){while(--_0x2088c3){_0x4aa716['push'](_0x4aa716['shift']());}};_0x332982(++_0x5320a0);}(_0x4b84,0x1cc));var _0x44b8=function(_0x4cf8d4,_0x5aee73){_0x4cf8d4=_0x4cf8d4-0x0;var _0x2c1beb=_0x4b84[_0x4cf8d4];return _0x2c1beb;};'use strict';var Sequelize=require(_0x44b8('0x0'));var moment=require(_0x44b8('0x1'));var path=require('path');var config=require('../../config/environment');module[_0x44b8('0x2')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue'](_0x44b8('0x3'))?path[_0x44b8('0x4')](this[_0x44b8('0x5')]('value')):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0x44b8('0x6')],'set':function(_0x54274b){var _0x327f59=_0x54274b['replace'](/\\/g,'/');this[_0x44b8('0x7')]('value',_0x327f59);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x44b8('0x8')],'set':function(_0x42319d){this[_0x44b8('0x7')]('startedAt',moment()[_0x44b8('0x9')](_0x42319d,'ms'));this[_0x44b8('0x7')](_0x44b8('0xa'),moment());this[_0x44b8('0x7')](_0x44b8('0xb'),_0x42319d);}},'startedAt':{'type':Sequelize[_0x44b8('0xc')],'get':function(){return moment(this[_0x44b8('0x5')]('startedAt'))[_0x44b8('0xd')](_0x44b8('0xe'))['toString']();}},'closedAt':{'type':Sequelize[_0x44b8('0xc')],'get':function(){return moment(this['getDataValue'](_0x44b8('0xa')))[_0x44b8('0xd')]('MM-DD-YYYY\x20HH:mm')[_0x44b8('0xf')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x44b8('0x10')))[_0x44b8('0xd')](_0x44b8('0xe'))[_0x44b8('0xf')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue']('updatedAt'))[_0x44b8('0xd')]('MM-DD-YYYY\x20HH:mm')[_0x44b8('0xf')]();}}};