5735e95239d4dc91203f0a9520bd1d3dcaa6fc20
[motion2.git] / server / api / voiceRecording / voiceRecording.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 _0xcb3d=['MM-DD-YYYY\x20HH:mm','toString','updatedAt','sequelize','exports','extname','getDataValue','value','STRING','setDataValue','channel','membername','split','INTEGER','TEXT','NEW','FLOAT','BOOLEAN','DATE','createdAt','format'];(function(_0x9c2427,_0x17c865){var _0x51984f=function(_0x177af6){while(--_0x177af6){_0x9c2427['push'](_0x9c2427['shift']());}};_0x51984f(++_0x17c865);}(_0xcb3d,0xd5));var _0xdcb3=function(_0x1895b7,_0x21fbc7){_0x1895b7=_0x1895b7-0x0;var _0x1aecdc=_0xcb3d[_0x1895b7];return _0x1aecdc;};'use strict';var Sequelize=require(_0xdcb3('0x0'));var moment=require('moment');var path=require('path');module[_0xdcb3('0x1')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue']('value')?path[_0xdcb3('0x2')](this[_0xdcb3('0x3')](_0xdcb3('0x4'))):undefined;}},'uniqueid':{'type':Sequelize[_0xdcb3('0x5')]},'channel':{'type':Sequelize[_0xdcb3('0x5')],'set':function(_0x1017d8){if(_0x1017d8){this[_0xdcb3('0x6')](_0xdcb3('0x7'),_0x1017d8);this[_0xdcb3('0x6')](_0xdcb3('0x8'),_0x1017d8[_0xdcb3('0x9')](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0xdcb3('0x5')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xdcb3('0x5')]},'connectedlinenum':{'type':Sequelize[_0xdcb3('0x5')]},'connectedlinename':{'type':Sequelize[_0xdcb3('0x5')]},'accountcode':{'type':Sequelize[_0xdcb3('0x5')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xdcb3('0x5')]},'value':{'type':Sequelize[_0xdcb3('0x5')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize[_0xdcb3('0xa')],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize[_0xdcb3('0x5')]},'userDisposition':{'type':Sequelize[_0xdcb3('0x5')]},'userSecondDisposition':{'type':Sequelize[_0xdcb3('0x5')]},'userThirdDisposition':{'type':Sequelize[_0xdcb3('0x5')]},'location':{'type':Sequelize[_0xdcb3('0xb')]},'transcribeName':{'type':Sequelize['STRING']},'transcribeStatus':{'type':Sequelize[_0xdcb3('0x5')],'defaultValue':_0xdcb3('0xc')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0xdcb3('0xb')]},'failureReason':{'type':Sequelize[_0xdcb3('0xb')]},'sentiment':{'type':Sequelize[_0xdcb3('0x5')]},'sPositive':{'type':Sequelize[_0xdcb3('0xd')]},'sNegative':{'type':Sequelize[_0xdcb3('0xd')]},'sNeutral':{'type':Sequelize[_0xdcb3('0xd')]},'sMixed':{'type':Sequelize[_0xdcb3('0xd')]},'tempSentiment':{'type':Sequelize[_0xdcb3('0xe')],'defaultValue':![]},'createdAt':{'type':Sequelize[_0xdcb3('0xf')],'get':function(){return moment(this[_0xdcb3('0x3')](_0xdcb3('0x10')))[_0xdcb3('0x11')](_0xdcb3('0x12'))[_0xdcb3('0x13')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0xdcb3('0x14')))[_0xdcb3('0x11')]('MM-DD-YYYY\x20HH:mm')['toString']();}}};