You can see from the UI, there is a post and some comments. Few comments have threads
NodeJs, MongoDB
// blogPostSchema
{
_id:"..",
title:"..",
...,
comments:[
{
authorId:"..",
body:"Some markdown content or simple text",
threads:[], // no thread as of now
ts:123123, // time stamp (Unix)
},
{
authorId:"..",
body:"Some markdown content or simple text",
threads:[
// a thread can not contain any other thread
{
authorId:"..",
body:"Thread 1",
ts:123123, // time stamp (Unix)
}
],
ts:123123, // time stamp (Unix)
}
]
}
You can see from the above schema that a post can have any number of comments and a comment can have any number of thread.
But, a thread can not have nested thread
- a user can create comment
- a user can edit comment
- a user can delete comment (Author only)
- a user can create thread on a comment
- a user can edit thread on a comment
- a user can delete thread of a comment (Author only)
I want to get few information of the author of comment or thread, like name, pic, reputation etc.