Skip to content
Snippets Groups Projects
Commit 3a24adb3 authored by Guz, Rafal P (UG - Comp Sci & Elec Eng)'s avatar Guz, Rafal P (UG - Comp Sci & Elec Eng)
Browse files

Created mongoose model for comments

parent 2946f8f6
No related branches found
No related tags found
2 merge requests!8CI/CD,!4Comments service
import mongoose from 'mongoose';
const commentSchema = mongoose.Schema({
body: String,
creatorId: String,
postId: String,
createdAt: {
type: Date,
default: new Date()
}
});
const Comment = mongoose.model("Comment", commentSchema);
export default Comment;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment