mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-29 15:42:18 +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; |