ab548623fb9a597c4e44c69e56405f8432e9795c
[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 _0x88c3=['subtract','duration','DATE','startedAt','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','sequelize','path','VIRTUAL','extname','getDataValue','value','STRING','replace','setDataValue','INTEGER'];(function(_0x4dab14,_0x164ea0){var _0xf41aa=function(_0x305d50){while(--_0x305d50){_0x4dab14['push'](_0x4dab14['shift']());}};_0xf41aa(++_0x164ea0);}(_0x88c3,0x1ee));var _0x388c=function(_0x5f4265,_0x1e15fd){_0x5f4265=_0x5f4265-0x0;var _0xda65c6=_0x88c3[_0x5f4265];return _0xda65c6;};'use strict';var Sequelize=require(_0x388c('0x0'));var moment=require('moment');var path=require(_0x388c('0x1'));var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize[_0x388c('0x2')],'get':function(){return this['getDataValue']('value')?path[_0x388c('0x3')](this[_0x388c('0x4')](_0x388c('0x5'))):undefined;}},'interactionid':{'type':Sequelize[_0x388c('0x6')]},'channel':{'type':Sequelize[_0x388c('0x6')]},'value':{'type':Sequelize[_0x388c('0x6')],'set':function(_0x5a1c0d){var _0x3e79d8=_0x5a1c0d[_0x388c('0x7')](/\\/g,'/');this[_0x388c('0x8')](_0x388c('0x5'),_0x3e79d8);}},'rating':{'type':Sequelize[_0x388c('0x9')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x388c('0x9')],'set':function(_0x2debe9){this[_0x388c('0x8')]('startedAt',moment()[_0x388c('0xa')](_0x2debe9,'ms'));this['setDataValue']('closedAt',moment());this[_0x388c('0x8')](_0x388c('0xb'),_0x2debe9);}},'startedAt':{'type':Sequelize[_0x388c('0xc')],'get':function(){return moment(this[_0x388c('0x4')](_0x388c('0xd')))[_0x388c('0xe')](_0x388c('0xf'))[_0x388c('0x10')]();}},'closedAt':{'type':Sequelize[_0x388c('0xc')],'get':function(){return moment(this['getDataValue']('closedAt'))['format'](_0x388c('0xf'))[_0x388c('0x10')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x388c('0x4')](_0x388c('0x11')))['format']('MM-DD-YYYY\x20HH:mm')[_0x388c('0x10')]();}},'updatedAt':{'type':Sequelize[_0x388c('0xc')],'get':function(){return moment(this[_0x388c('0x4')]('updatedAt'))[_0x388c('0xe')]('MM-DD-YYYY\x20HH:mm')[_0x388c('0x10')]();}}};