1
00:00:00,180 --> 00:00:07,050
Indeed, we are going to create role models such that it is going to prepare to save to the Mongo DB

2
00:00:07,260 --> 00:00:11,820
So under the surf order we are going to create models.

3
00:00:12,420 --> 00:00:15,990
And under the models, we create a room that as.

4
00:00:19,180 --> 00:00:27,490
And then we import a mongoose by using Coniston Mongoose is equal to require mongoose.

5
00:00:28,880 --> 00:00:42,560
And then we create a room, Kimara is equal to a new mongoose doll schema, and then the type is equal

6
00:00:42,560 --> 00:00:46,330
to a string and we acquired is equal to true.

7
00:00:46,760 --> 00:00:50,040
And because we just want to save name only.

8
00:00:50,060 --> 00:00:51,590
So it is already enough.

9
00:00:52,190 --> 00:01:03,420
So we created constant is equal to one Gustaaf model and we type no and we type the rule.

10
00:01:03,560 --> 00:01:08,300
So later in the Mongo DB you will see Rose in the collections.

11
00:01:08,540 --> 00:01:12,640
So Will Schema is positive with this model.

12
00:01:13,340 --> 00:01:19,220
And at last we remember to export this model by using models.

13
00:01:19,220 --> 00:01:22,190
Exports is equal to well.

14
00:01:22,850 --> 00:01:30,500
So now we back to the interest update as and first we are going to import the role model by using the

15
00:01:30,500 --> 00:01:37,070
constant rule is AECO to require model and rule.

16
00:01:37,700 --> 00:01:46,010
And then now we can command this first and first we are going to save the room and we are going to create

17
00:01:46,010 --> 00:01:52,730
a new room is equal to the name that we passed in this event.

18
00:01:53,360 --> 00:02:01,240
And after we created, we are going to save and then we will immediately resort to all the columns.

19
00:02:01,910 --> 00:02:08,880
So we use IO document room created and then we get the result.

20
00:02:10,190 --> 00:02:16,580
Now we can try to whether it will say to the Obongo DB, so we go to the client.

21
00:02:19,250 --> 00:02:20,210
And we start.

22
00:02:21,170 --> 00:02:24,830
That we have at now, we try to type the role of free.

23
00:02:26,190 --> 00:02:28,230
And then we create room.

24
00:02:29,430 --> 00:02:36,130
Now, you can see in here, because we haven't implemented this page functions, but if you go to the

25
00:02:36,540 --> 00:02:46,820
Mongo DB and refresh now you can see the room's connections and also the room fee and also where is

26
00:02:46,830 --> 00:02:47,360
it?

27
00:02:47,760 --> 00:02:58,080
So you can see this room actually is depending on these models, because remember that room, so it

28
00:02:58,080 --> 00:03:00,750
will have the collection of rooms.
