Indeed, we are going to create role models such that it is going to prepare to save to the Mongo DB
So under the surf order we are going to create models.
And under the models, we create a room that as.
And then we import a mongoose by using Coniston Mongoose is equal to require mongoose.
And then we create a room, Kimara is equal to a new mongoose doll schema, and then the type is equal
to a string and we acquired is equal to true.
And because we just want to save name only.
So it is already enough.
So we created constant is equal to one Gustaaf model and we type no and we type the rule.
So later in the Mongo DB you will see Rose in the collections.
So Will Schema is positive with this model.
And at last we remember to export this model by using models.
Exports is equal to well.
So now we back to the interest update as and first we are going to import the role model by using the
constant rule is AECO to require model and rule.
And then now we can command this first and first we are going to save the room and we are going to create
a new room is equal to the name that we passed in this event.
And after we created, we are going to save and then we will immediately resort to all the columns.
So we use IO document room created and then we get the result.
Now we can try to whether it will say to the Obongo DB, so we go to the client.
And we start.
That we have at now, we try to type the role of free.
And then we create room.
Now, you can see in here, because we haven't implemented this page functions, but if you go to the
Mongo DB and refresh now you can see the room's connections and also the room fee and also where is
it?
So you can see this room actually is depending on these models, because remember that room, so it
will have the collection of rooms.