WEBVTT

00:04.060 --> 00:04.840
Hated everyone.

00:04.930 --> 00:05.410
They share.

00:05.410 --> 00:09.970
And in this video we're going to discuss about the file structure as well as the models, especially

00:09.970 --> 00:11.020
the user model.

00:11.050 --> 00:15.190
The file structure that we are going to be using is going to look exactly same as we discussed.

00:15.190 --> 00:19.270
The only difference is we will be having approaches as well as index or JS.

00:19.270 --> 00:22.510
So instead of slash, they both will be present in our application.

00:22.510 --> 00:23.800
You can skip it.

00:23.800 --> 00:25.780
There is no such big hurdle there.

00:25.780 --> 00:28.210
We have already discussed that part in the earlier section.

00:28.210 --> 00:30.490
We'll be having all of this except the seeds.

00:30.700 --> 00:34.150
We don't want to have seeds that much of the data to be pushed in.

00:34.150 --> 00:39.880
But still, I will walk you through as a basic overview that how this can be worked, it's really simple.

00:39.880 --> 00:43.390
Just connect the database, fetch some values, and that set apart from that.

00:43.390 --> 00:46.570
All of the files, all of the folders are going to be needed by us.

00:46.570 --> 00:48.670
So we will be creating that in a minute.

00:48.760 --> 00:52.360
Now, let's go ahead and talk about the structure that we'll be having.

00:52.360 --> 00:57.640
The first and the most important part of building any application is to decide that how the models is

00:57.640 --> 00:58.630
going to be there.

00:58.660 --> 01:03.820
Now, these kinds of structures definitely happens first on pen and paper, not on these tools, and

01:03.820 --> 01:05.230
then it moves on to these tools.

01:05.230 --> 01:10.150
Then it moves on to some something like Mood Modeler or any kind of other database modeler.

01:10.150 --> 01:14.470
It helps us to actually visualize it much, much better and also give us some of the scripts which is

01:14.470 --> 01:15.070
not required.

01:15.070 --> 01:19.750
We rarely use them, but it's always a good approach in case you are designing things professionally,

01:19.750 --> 01:24.520
to have the tools and access something like Mood Modeler or any other database modeler that you can

01:24.520 --> 01:24.760
have.

01:24.760 --> 01:28.120
Since we don't have it, we have to work through with the basics of it.

01:28.120 --> 01:32.530
So in this one, we are going to first work on with the user model itself.

01:32.530 --> 01:34.660
So I don't want any of that.

01:34.660 --> 01:35.830
So I'll just start.

01:36.730 --> 01:37.930
Okay, let's get rid of that.

01:37.930 --> 01:41.860
So again, I told you how to bring up this mind map already discussed about that part.

01:41.860 --> 01:44.380
So let's go ahead and have a simple mind map up here.

01:44.380 --> 01:48.550
So this is going to be our e-comm app.

01:50.140 --> 01:55.900
And with this e-comm app, the first thing is we're going to be working on is simply the models itself.

01:55.900 --> 01:59.170
So let me go ahead and come on, don't do this.

02:00.440 --> 02:02.690
Let me go ahead and try to do this again.

02:03.920 --> 02:04.370
Okay.

02:04.370 --> 02:11.450
So this one is going to be E app or e-commerce application.

02:11.570 --> 02:13.040
I think I need to zoom in.

02:13.070 --> 02:15.080
Yeah, that is much better now.

02:16.650 --> 02:17.310
Okay.

02:19.720 --> 02:20.110
Yeah.

02:20.110 --> 02:21.340
This is much better.

02:21.340 --> 02:23.620
And definitely I need to fix the spelling up here.

02:25.000 --> 02:27.850
So e com app, which is an e commerce app.

02:27.880 --> 02:29.880
Now, again, we can have more things up here.

02:29.890 --> 02:32.170
There can be controllers and routes and all of that.

02:32.170 --> 02:34.840
Right now we are discussing all about is the models itself.

02:34.840 --> 02:37.690
So let's go ahead and see that how the models are going to look like.

02:37.840 --> 02:42.670
Now, we obviously will have a whole lot of models working on and definitely in the future you can add

02:42.670 --> 02:43.150
more.

02:43.150 --> 02:46.870
But at this point of time, all I'm working on is the user model.

02:46.870 --> 02:50.500
So how the user model is going to look like a couple of interesting fact.

02:50.650 --> 02:51.700
We have already discussed these.

02:51.700 --> 02:56.590
One, we are going to call all of them as with the capital first uppercase letter, but it is not required.

02:56.590 --> 03:01.030
You have already read in the documentation that when it goes in the database it is going to call us

03:01.030 --> 03:04.360
users all lowercase but further down the road.

03:04.990 --> 03:06.460
I really want to work on that.

03:06.460 --> 03:09.880
How this entire application is going to be having this user.

03:09.910 --> 03:12.220
The whole thing is really simple.

03:12.220 --> 03:17.710
If somebody registered on your on your website, what do you expect him what kind of data are you expecting

03:17.710 --> 03:19.360
him to collect from him?

03:19.360 --> 03:21.820
So let's go ahead and add a simple note up here.

03:21.880 --> 03:26.470
I usually put up better designs up here, but let's just say we're going to be putting up some nodes

03:26.470 --> 03:27.040
up here.

03:27.370 --> 03:27.550
Okay.

03:27.670 --> 03:31.840
So how this is going to look like, I obviously will ask him for the name right now.

03:31.840 --> 03:36.880
At this point, I'm not worried about is it going to be string if he doesn't bust on me the name, what

03:36.880 --> 03:38.470
kind of error message I'll be giving it?

03:38.500 --> 03:39.130
No, I don't.

03:39.130 --> 03:41.260
I don't care about them at this point of time.

03:41.260 --> 03:42.610
Later on I surely do.

03:42.610 --> 03:44.830
So I obviously want to grab email.

03:44.830 --> 03:46.930
I want to also set the password.

03:46.960 --> 03:50.710
Yes, I know things are coming to a mind that OC password needs to be encrypted.

03:50.710 --> 03:51.880
We are going to use hashes.

03:51.880 --> 03:54.310
Yes, we will all do that, but not right now.

03:54.310 --> 03:56.980
This is not a point where you actually worried about that.

03:56.980 --> 03:59.770
And we are also going to have a photo from the user.

03:59.800 --> 04:04.090
Now, we have already figured out that we are going to be using Cloud Native for having the photos,

04:04.090 --> 04:09.400
but it's exactly the same if you want to throw them up on Firebase or a Cloud wherever you like.

04:09.550 --> 04:15.130
And from further down the road, we will keep this photo as a simple object.

04:15.130 --> 04:22.810
So I just kind of put an object up here that in the photo I'll be storing the URL or the secure URL,

04:22.810 --> 04:25.300
of course, and the unique ID that cloud native gives me.

04:25.300 --> 04:27.250
So these are the two things I'll worry on that.

04:27.250 --> 04:32.980
In fact, I can write it down here, so it's going to be ID and secure you URL.

04:33.310 --> 04:36.580
So these are the two things that I will be having it up here.

04:37.300 --> 04:37.840
Okay.

04:37.870 --> 04:39.940
So can I stretch it?

04:39.940 --> 04:40.300
I guess?

04:40.300 --> 04:40.750
No.

04:41.410 --> 04:41.680
Okay.

04:41.680 --> 04:44.380
So these are the two things that I'll be having for this photo.

04:44.380 --> 04:45.970
Let me bring them on to the next line.

04:45.970 --> 04:46.570
There we go.

04:46.570 --> 04:48.410
So what else you are going to need up here?

04:48.460 --> 04:50.560
We are also going to work on roles.

04:50.560 --> 04:51.850
What are these roles?

04:51.850 --> 04:56.830
So there will be a regular user who can come onto your application and buy this stuff there.

04:57.100 --> 05:02.680
There is also going to be admin user who will get an access to the dashboard where he can just create

05:02.680 --> 05:07.660
new products, see all the users in this dashboard and maybe in the future you might want to inject

05:07.660 --> 05:09.370
a manager level role as well.

05:09.370 --> 05:12.580
And manager may be able to see only just the orders in the dashboard.

05:12.580 --> 05:15.970
So there is going to be a security perspective based on the role.

05:15.970 --> 05:17.890
So we're going to study that part as well.

05:18.520 --> 05:23.230
And with all of the all of the models that we're going to create, there is going to be property which

05:23.230 --> 05:24.520
is going to be created at.

05:24.520 --> 05:29.830
So this is going to be something as soon as you make a new entry in the database, that time will be

05:29.830 --> 05:31.060
logged into the database.

05:31.060 --> 05:34.390
That at this point of time, this entry was created in the database.

05:34.420 --> 05:37.630
Regardless, it can be product, it can be user, or it can be anything.

05:37.930 --> 05:38.620
Now that's it.

05:38.620 --> 05:40.480
That's all we are going to be doing it totally.

05:40.480 --> 05:41.380
It's really simple.

05:41.380 --> 05:44.230
You can definitely add more information once you are done with the course.

05:44.260 --> 05:45.100
Not right now.

05:45.100 --> 05:48.670
And this is all are we all done with this model, which is a user model?

05:49.060 --> 05:50.080
Not precisely.

05:50.080 --> 05:50.890
Not precisely.

05:50.890 --> 05:56.080
Not right now, because there is going to be another video where we are going to have a small talk about

05:56.080 --> 05:56.860
this user model.

05:56.860 --> 05:58.180
So we'll come back there.

05:58.180 --> 06:03.160
Now, next step is how we're going to design the product, and that is going to be a little bit more

06:03.550 --> 06:05.290
involved compared to this one.

06:05.290 --> 06:09.760
So let's go ahead, move on to the next video and see that how we are going to model our product.
