Hi.
Everyone.
Welcome to the new section about the boss comment.
Okay.
The comment is a very important feature in any social media application, right?
So in this video let's set up the new module.
You made a comment and I will show you how we can design the document for the comment.
Sorry.
The.
Rest API and cross application.
So we already have a comment and let's change the So ski mask okay goes over here and let me copy everything
from reaction.
Okay.
We copy everything and start over here and change the name a little bit to command comment here checkout
Command schema.
And here we wait command okay and command document.
Well.
Let me remove some stuff.
Let me show you how we can design the command document okay.
Well, if we take a look at facebook.com when we create a box, okay.
And when we create a command, for example, right here.
Okay, we have a mutable command, right?
We can create a mutable command.
And in here we have a nested command.
What you can say.
What about if I go into the command over here?
Okay.
If I click on nested also.
Well it will not happen.
It will not nested anymore.
Instead of the loops, only nested one level.
Okay, I will decide as we only nested one level and it will increase the performance.
Okay, if we do nested many, many more, we need the advanced data structure and some advanced stuff.
Nested command.
But this is not the story of the firebox okay?
It only lasted one time.
So for that reason I will create us.
Let me design a model.
Firstly, we need to know the command belong to the boss, right?
So I will create a boss.
Here.
And revert to the boss.
Butterflies.
And we need.
Uh.
We will need.
One more thing will be contained.
Right.
And this will will be required.
And what we have, uh, when we replies I want it will reply to user.
Okay, I want to create one more blog called Replies to the user.
And this can be the user document or it can be node.
Okay.
Right here.
Let me move a little bit.
Tie.
A tie over here.
Over here will be user.
Okay.
Let me show you what exactly about Reply-to user.
Here when I clicked into the replies I want it will tag the user into here, right?
So that the field of reply to the users.
Okay, we have a boss content reply to user and we have a timestamp.
Okay.
And we need one more thing will be parent.
Parent command okay.
Because this is the nested command right?
We want to know which is the parent command.
So for that reason this guy we will use Removes one more thing here and.
We will point you directly to my document.
And right here we make command.
Command class also.
False.
And this can be known with the with the command over here.
We don't have any parent.
So for that reason it should be known in the sky.
Okay.
And with this guy it will point back to here for example I do command one okay.
So that's the parent content to user.
Also right here okay.
So that is not the command schema.
And I hope you understand this video I will see you in the next one.