forked from hippoz/brainlet
12 lines
No EOL
350 B
JavaScript
12 lines
No EOL
350 B
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const messageSchema = new mongoose.Schema({
|
|
author: {type: mongoose.Schema.Types.ObjectId, ref: "User"},
|
|
channel: {type: mongoose.Schema.Types.ObjectId, ref: "Channel"},
|
|
content: String,
|
|
createdAt: Number
|
|
});
|
|
|
|
const Message = mongoose.model("Message", messageSchema);
|
|
|
|
module.exports = Message; |