Built motion from commit 47436d59.|2.6.7
[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 _0x79e2=['setDataValue','INTEGER','subtract','duration','DATE','startedAt','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','sequelize','path','../../config/environment','exports','getDataValue','extname','value','STRING','replace'];(function(_0x5d80de,_0x2cf15d){var _0x1c7556=function(_0x5bd806){while(--_0x5bd806){_0x5d80de['push'](_0x5d80de['shift']());}};_0x1c7556(++_0x2cf15d);}(_0x79e2,0x1c3));var _0x279e=function(_0x2fcea5,_0x3df3c4){_0x2fcea5=_0x2fcea5-0x0;var _0x12592e=_0x79e2[_0x2fcea5];return _0x12592e;};'use strict';var Sequelize=require(_0x279e('0x0'));var moment=require('moment');var path=require(_0x279e('0x1'));var config=require(_0x279e('0x2'));module[_0x279e('0x3')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x279e('0x4')]('value')?path[_0x279e('0x5')](this[_0x279e('0x4')](_0x279e('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0x279e('0x7')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize['STRING'],'set':function(_0x1c6b6f){var _0x26c072=_0x1c6b6f[_0x279e('0x8')](/\\/g,'/');this[_0x279e('0x9')](_0x279e('0x6'),_0x26c072);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x279e('0xa')],'set':function(_0x1ec1b7){this[_0x279e('0x9')]('startedAt',moment()[_0x279e('0xb')](_0x1ec1b7,'ms'));this[_0x279e('0x9')]('closedAt',moment());this[_0x279e('0x9')](_0x279e('0xc'),_0x1ec1b7);}},'startedAt':{'type':Sequelize[_0x279e('0xd')],'get':function(){return moment(this[_0x279e('0x4')](_0x279e('0xe')))[_0x279e('0xf')](_0x279e('0x10'))[_0x279e('0x11')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x279e('0x4')]('closedAt'))[_0x279e('0xf')](_0x279e('0x10'))[_0x279e('0x11')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x279e('0x4')](_0x279e('0x12')))[_0x279e('0xf')]('MM-DD-YYYY\x20HH:mm')[_0x279e('0x11')]();}},'updatedAt':{'type':Sequelize[_0x279e('0xd')],'get':function(){return moment(this[_0x279e('0x4')](_0x279e('0x13')))[_0x279e('0xf')](_0x279e('0x10'))['toString']();}}};