mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-29 23:52:50 +00:00
19 lines
No EOL
326 B
JavaScript
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; |