This repository has been archived on 2022-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
brainlet/models/Post.js

10 lines
No EOL
277 B
JavaScript
Executable file

const mongoose = require("mongoose");
const Post = mongoose.model("Post", {
title: String,
body: String,
creator: {type: mongoose.Schema.Types.ObjectId, ref: "User"},
channelId: {type: mongoose.Schema.Types.ObjectId, ref: "Channel"}
});
module.exports = Post;