38 lines
962 B
JavaScript
38 lines
962 B
JavaScript
"use strict";
|
|
/**
|
|
* Value object for ticket item.
|
|
*
|
|
* @constructor
|
|
*/
|
|
function HistoryVO() {
|
|
this.type = '';
|
|
this.ticketType = '';
|
|
this.summary = '';
|
|
this.id = '';
|
|
this.displayId = '';
|
|
this.priority = '';
|
|
this.articleId = '';
|
|
this.title = '';
|
|
this.serviceName = '';
|
|
}
|
|
HistoryVO.prototype = Object.create(BaseVO.prototype);
|
|
HistoryVO.prototype.constructor = HistoryVO;
|
|
HistoryVO.prototype.getProps = function () {
|
|
var keys = Object.keys(new HistoryVO());
|
|
return BaseVO.prototype.getProps().concat(keys);
|
|
};
|
|
HistoryVO.prototype.postBuild = function () {
|
|
this.ticketType = this.type;
|
|
if (this.type === EntityVO.TYPE_KNOWLEDGE) {
|
|
this.summary = this.title;
|
|
this.displayId = this.articleId;
|
|
}
|
|
else if (this.type === EntityVO.TYPE_SBEREQUEST) {
|
|
this.summary = this.serviceName;
|
|
this.displayId = this.id;
|
|
}
|
|
else {
|
|
this.type = EntityVO.TYPE_TICKET;
|
|
}
|
|
};
|