b7a371af262d7b275b1c6665108ec9e30277cdc0
[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 _0x3e74=['path','../../config/environment','exports','value','getDataValue','STRING','replace','setDataValue','INTEGER','subtract','DATE','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','sequelize'];(function(_0x3ec367,_0x1b5f8b){var _0x3f61c7=function(_0x58b5d7){while(--_0x58b5d7){_0x3ec367['push'](_0x3ec367['shift']());}};_0x3f61c7(++_0x1b5f8b);}(_0x3e74,0x175));var _0x43e7=function(_0x48fe27,_0x46763d){_0x48fe27=_0x48fe27-0x0;var _0x2fbb8e=_0x3e74[_0x48fe27];return _0x2fbb8e;};'use strict';var Sequelize=require(_0x43e7('0x0'));var moment=require('moment');var path=require(_0x43e7('0x1'));var config=require(_0x43e7('0x2'));module[_0x43e7('0x3')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue'](_0x43e7('0x4'))?path['extname'](this[_0x43e7('0x5')](_0x43e7('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x43e7('0x6')]},'channel':{'type':Sequelize[_0x43e7('0x6')]},'value':{'type':Sequelize[_0x43e7('0x6')],'set':function(_0x503698){var _0x45a0d1=_0x503698[_0x43e7('0x7')](/\\/g,'/');this[_0x43e7('0x8')](_0x43e7('0x4'),_0x45a0d1);}},'rating':{'type':Sequelize[_0x43e7('0x9')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x212c6c){this['setDataValue']('startedAt',moment()[_0x43e7('0xa')](_0x212c6c,'ms'));this[_0x43e7('0x8')]('closedAt',moment());this[_0x43e7('0x8')]('duration',_0x212c6c);}},'startedAt':{'type':Sequelize[_0x43e7('0xb')],'get':function(){return moment(this[_0x43e7('0x5')]('startedAt'))[_0x43e7('0xc')](_0x43e7('0xd'))[_0x43e7('0xe')]();}},'closedAt':{'type':Sequelize[_0x43e7('0xb')],'get':function(){return moment(this['getDataValue']('closedAt'))[_0x43e7('0xc')](_0x43e7('0xd'))[_0x43e7('0xe')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x43e7('0xf')))[_0x43e7('0xc')](_0x43e7('0xd'))[_0x43e7('0xe')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x43e7('0x10')))[_0x43e7('0xc')](_0x43e7('0xd'))['toString']();}}};