fe082232dd30a4b9d2639192a99021d0429ed74d
[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 _0x3e22=['duration','startedAt','format','MM-DD-YYYY\x20HH:mm','toString','DATE','createdAt','updatedAt','moment','../../config/environment','exports','VIRTUAL','getDataValue','value','STRING','replace','INTEGER','setDataValue','subtract','closedAt'];(function(_0x36a073,_0x2ce3ce){var _0xc9762b=function(_0x416bfe){while(--_0x416bfe){_0x36a073['push'](_0x36a073['shift']());}};_0xc9762b(++_0x2ce3ce);}(_0x3e22,0xa8));var _0x23e2=function(_0x360f17,_0xf88d45){_0x360f17=_0x360f17-0x0;var _0x128eb3=_0x3e22[_0x360f17];return _0x128eb3;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x23e2('0x0'));var path=require('path');var config=require(_0x23e2('0x1'));module[_0x23e2('0x2')]={'format':{'type':Sequelize[_0x23e2('0x3')],'get':function(){return this[_0x23e2('0x4')]('value')?path['extname'](this[_0x23e2('0x4')](_0x23e2('0x5'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x23e2('0x6')]},'value':{'type':Sequelize[_0x23e2('0x6')],'set':function(_0x3a8351){var _0x927fbb=_0x3a8351[_0x23e2('0x7')](/\\/g,'/');this['setDataValue'](_0x23e2('0x5'),_0x927fbb);}},'rating':{'type':Sequelize[_0x23e2('0x8')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x23e2('0x8')],'set':function(_0x75da0a){this[_0x23e2('0x9')]('startedAt',moment()[_0x23e2('0xa')](_0x75da0a,'ms'));this[_0x23e2('0x9')](_0x23e2('0xb'),moment());this[_0x23e2('0x9')](_0x23e2('0xc'),_0x75da0a);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x23e2('0xd')))[_0x23e2('0xe')](_0x23e2('0xf'))[_0x23e2('0x10')]();}},'closedAt':{'type':Sequelize[_0x23e2('0x11')],'get':function(){return moment(this[_0x23e2('0x4')](_0x23e2('0xb')))[_0x23e2('0xe')](_0x23e2('0xf'))[_0x23e2('0x10')]();}},'createdAt':{'type':Sequelize[_0x23e2('0x11')],'get':function(){return moment(this[_0x23e2('0x4')](_0x23e2('0x12')))[_0x23e2('0xe')]('MM-DD-YYYY\x20HH:mm')[_0x23e2('0x10')]();}},'updatedAt':{'type':Sequelize[_0x23e2('0x11')],'get':function(){return moment(this[_0x23e2('0x4')](_0x23e2('0x13')))[_0x23e2('0xe')](_0x23e2('0xf'))[_0x23e2('0x10')]();}}};