0fe5a7213b648674c401f2f0754c228e5d34ed07
[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 _0x5b47=['sequelize','moment','value','extname','getDataValue','STRING','setDataValue','INTEGER','startedAt','subtract','DATE','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt'];(function(_0x3de873,_0x174b5f){var _0x380b8c=function(_0x313dea){while(--_0x313dea){_0x3de873['push'](_0x3de873['shift']());}};_0x380b8c(++_0x174b5f);}(_0x5b47,0x120));var _0x75b4=function(_0x232dc4,_0x2da492){_0x232dc4=_0x232dc4-0x0;var _0x1b626d=_0x5b47[_0x232dc4];return _0x1b626d;};'use strict';var Sequelize=require(_0x75b4('0x0'));var moment=require(_0x75b4('0x1'));var path=require('path');var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue'](_0x75b4('0x2'))?path[_0x75b4('0x3')](this[_0x75b4('0x4')](_0x75b4('0x2'))):undefined;}},'interactionid':{'type':Sequelize[_0x75b4('0x5')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize['STRING'],'set':function(_0x53dcb0){var _0x1f1e33=_0x53dcb0['replace'](/\\/g,'/');this[_0x75b4('0x6')](_0x75b4('0x2'),_0x1f1e33);}},'rating':{'type':Sequelize[_0x75b4('0x7')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x75b4('0x7')],'set':function(_0x127e77){this[_0x75b4('0x6')](_0x75b4('0x8'),moment()[_0x75b4('0x9')](_0x127e77,'ms'));this[_0x75b4('0x6')]('closedAt',moment());this[_0x75b4('0x6')]('duration',_0x127e77);}},'startedAt':{'type':Sequelize[_0x75b4('0xa')],'get':function(){return moment(this[_0x75b4('0x4')](_0x75b4('0x8')))[_0x75b4('0xb')](_0x75b4('0xc'))[_0x75b4('0xd')]();}},'closedAt':{'type':Sequelize[_0x75b4('0xa')],'get':function(){return moment(this[_0x75b4('0x4')]('closedAt'))['format']('MM-DD-YYYY\x20HH:mm')[_0x75b4('0xd')]();}},'createdAt':{'type':Sequelize[_0x75b4('0xa')],'get':function(){return moment(this['getDataValue'](_0x75b4('0xe')))[_0x75b4('0xb')](_0x75b4('0xc'))['toString']();}},'updatedAt':{'type':Sequelize[_0x75b4('0xa')],'get':function(){return moment(this[_0x75b4('0x4')](_0x75b4('0xf')))[_0x75b4('0xb')]('MM-DD-YYYY\x20HH:mm')[_0x75b4('0xd')]();}}};