SmartIT_Extensions/BMC/smart-it-full-helix/components/chat/chat-message-vo.js

33 lines
753 B
JavaScript

"use strict";
/**
* Value object for asset item.
*
* @constructor
*/
function ChatMessageVO() {
// database fields
this.text = "";
this.created = null;
this.author = "";
this.type = "";
this.eventType = "";
this.chatWindow = {};
}
// inherit BaseVO
ChatMessageVO.prototype = new BaseVO();
// correct the constructor pointer
ChatMessageVO.prototype.constructor = ChatMessageVO;
/**
* @override
* @return {Array}
*/
ChatMessageVO.prototype.getProps = function () {
return ["text", "created", "author", "type", "chatWindow", "parent", "eventType"];
};
/**
* @override
*/
ChatMessageVO.prototype.postBuild = function () {
this.created = this.created ? new Date(this.created).getTime() : new Date().getTime();
};