ensl_gathers/lib/chat/message.js
2015-07-23 00:30:14 +01:00

19 lines
No EOL
326 B
JavaScript

"use strict";
var Author = require("./author");
function Message (o) {
this.author = Author(o.author);
this.content = o.content;
this.createdAt = new Date();
};
Message.prototype.toJson = function () {
return {
author: this.author,
content: this.content,
createdAt: this.createdAt
}
};
module.exports = Message;