19c5b0a1392e790b88133947cb19c1572a3184b3
[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 _0xce14=['DATE','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','moment','../../config/environment','exports','getDataValue','value','extname','STRING','setDataValue','INTEGER','startedAt','subtract','closedAt','duration'];(function(_0x4c971c,_0x12a9f0){var _0x3ecffc=function(_0x5586ba){while(--_0x5586ba){_0x4c971c['push'](_0x4c971c['shift']());}};_0x3ecffc(++_0x12a9f0);}(_0xce14,0x17f));var _0x4ce1=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0xce14[_0x465028];return _0xb783d4;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x4ce1('0x0'));var path=require('path');var config=require(_0x4ce1('0x1'));module[_0x4ce1('0x2')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x4ce1('0x3')](_0x4ce1('0x4'))?path[_0x4ce1('0x5')](this[_0x4ce1('0x3')](_0x4ce1('0x4'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x4ce1('0x6')]},'value':{'type':Sequelize[_0x4ce1('0x6')],'set':function(_0x1f603d){var _0x2b9923=_0x1f603d['replace'](/\\/g,'/');this[_0x4ce1('0x7')](_0x4ce1('0x4'),_0x2b9923);}},'rating':{'type':Sequelize[_0x4ce1('0x8')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x1b5bd8){this[_0x4ce1('0x7')](_0x4ce1('0x9'),moment()[_0x4ce1('0xa')](_0x1b5bd8,'ms'));this['setDataValue'](_0x4ce1('0xb'),moment());this[_0x4ce1('0x7')](_0x4ce1('0xc'),_0x1b5bd8);}},'startedAt':{'type':Sequelize[_0x4ce1('0xd')],'get':function(){return moment(this['getDataValue'](_0x4ce1('0x9')))[_0x4ce1('0xe')](_0x4ce1('0xf'))[_0x4ce1('0x10')]();}},'closedAt':{'type':Sequelize[_0x4ce1('0xd')],'get':function(){return moment(this[_0x4ce1('0x3')](_0x4ce1('0xb')))[_0x4ce1('0xe')](_0x4ce1('0xf'))[_0x4ce1('0x10')]();}},'createdAt':{'type':Sequelize[_0x4ce1('0xd')],'get':function(){return moment(this['getDataValue'](_0x4ce1('0x11')))['format'](_0x4ce1('0xf'))[_0x4ce1('0x10')]();}},'updatedAt':{'type':Sequelize[_0x4ce1('0xd')],'get':function(){return moment(this[_0x4ce1('0x3')]('updatedAt'))[_0x4ce1('0xe')]('MM-DD-YYYY\x20HH:mm')['toString']();}}};