910a83929c0d8bfe83ac8cde4da813334fee64db
[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 _0xa6e1=['updatedAt','sequelize','moment','path','../../config/environment','exports','getDataValue','value','extname','STRING','setDataValue','INTEGER','startedAt','subtract','closedAt','format','MM-DD-YYYY\x20HH:mm','toString','DATE','createdAt'];(function(_0x16cf57,_0x47118f){var _0x2d5416=function(_0x1bbc60){while(--_0x1bbc60){_0x16cf57['push'](_0x16cf57['shift']());}};_0x2d5416(++_0x47118f);}(_0xa6e1,0x12d));var _0x1a6e=function(_0x114c9c,_0x5031f5){_0x114c9c=_0x114c9c-0x0;var _0x2f9c46=_0xa6e1[_0x114c9c];return _0x2f9c46;};'use strict';var Sequelize=require(_0x1a6e('0x0'));var moment=require(_0x1a6e('0x1'));var path=require(_0x1a6e('0x2'));var config=require(_0x1a6e('0x3'));module[_0x1a6e('0x4')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x1a6e('0x5')](_0x1a6e('0x6'))?path[_0x1a6e('0x7')](this[_0x1a6e('0x5')](_0x1a6e('0x6'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x1a6e('0x8')]},'value':{'type':Sequelize[_0x1a6e('0x8')],'set':function(_0x20df50){var _0x3b4a83=_0x20df50['replace'](/\\/g,'/');this[_0x1a6e('0x9')](_0x1a6e('0x6'),_0x3b4a83);}},'rating':{'type':Sequelize[_0x1a6e('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x1a6e('0xa')],'set':function(_0xb3d3d4){this[_0x1a6e('0x9')](_0x1a6e('0xb'),moment()[_0x1a6e('0xc')](_0xb3d3d4,'ms'));this[_0x1a6e('0x9')](_0x1a6e('0xd'),moment());this[_0x1a6e('0x9')]('duration',_0xb3d3d4);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x1a6e('0x5')](_0x1a6e('0xb')))[_0x1a6e('0xe')](_0x1a6e('0xf'))[_0x1a6e('0x10')]();}},'closedAt':{'type':Sequelize[_0x1a6e('0x11')],'get':function(){return moment(this[_0x1a6e('0x5')](_0x1a6e('0xd')))[_0x1a6e('0xe')]('MM-DD-YYYY\x20HH:mm')[_0x1a6e('0x10')]();}},'createdAt':{'type':Sequelize[_0x1a6e('0x11')],'get':function(){return moment(this['getDataValue'](_0x1a6e('0x12')))[_0x1a6e('0xe')]('MM-DD-YYYY\x20HH:mm')['toString']();}},'updatedAt':{'type':Sequelize[_0x1a6e('0x11')],'get':function(){return moment(this[_0x1a6e('0x5')](_0x1a6e('0x13')))[_0x1a6e('0xe')](_0x1a6e('0xf'))[_0x1a6e('0x10')]();}}};