Built motion from commit 3d3e98f2.|2.6.29
[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(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0x79e2,0x1c3));var _0x279e=function(_0x45bd81,_0x26da6d){_0x45bd81=_0x45bd81-0x0;var _0x27792e=_0x79e2[_0x45bd81];return _0x27792e;};'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']();}}};