ensl_gathers/lib/chat/message.js
Chris Blanchard be3eb07795 Stuff
2015-07-29 15:54:45 +01:00

22 lines
No EOL
376 B
JavaScript

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