diff --git a/comments-service/models/Comment.js b/comments-service/models/Comment.js new file mode 100644 index 0000000000000000000000000000000000000000..fc6d22480b3b76e9442f24007acdf22bee6a9dcf --- /dev/null +++ b/comments-service/models/Comment.js @@ -0,0 +1,15 @@ +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