1
00:00:00,360 --> 00:00:05,440
So let's get cracking, I want to start by creating job, James.

2
00:00:05,520 --> 00:00:06,480
That's the model.

3
00:00:06,810 --> 00:00:11,160
Let's go by getting the mouse that is coming from the mouse.

4
00:00:11,580 --> 00:00:15,840
And I know that some people might be upset, but I'll copy paste.

5
00:00:16,200 --> 00:00:21,870
Now, I'm not going to copy and paste from the read me, but I will copy and paste from the user because

6
00:00:21,960 --> 00:00:24,450
that is how you would set this up normally.

7
00:00:24,840 --> 00:00:26,560
I mean, I really don't see the point.

8
00:00:26,580 --> 00:00:28,950
Are we typing everything from scratch?

9
00:00:29,220 --> 00:00:35,100
So I'm going to just grab everything up to an email and then back in the job, just we want to change

10
00:00:35,100 --> 00:00:35,820
the name first.

11
00:00:36,330 --> 00:00:40,800
So let's call this job schema, and let's make sure that we have proper syntax.

12
00:00:41,250 --> 00:00:47,760
So either curly and I'll also add the parentheses and then let's rename this one.

13
00:00:48,180 --> 00:00:51,400
So it's not going to be a name, and I'm going to go with Mike.

14
00:00:51,430 --> 00:00:54,330
Of course, there's what's called this company.

15
00:00:55,110 --> 00:01:00,810
And as far as the properties well and only the mean length in this case, and I also don't want to use

16
00:01:00,810 --> 00:01:03,000
the term, so I remove both of them.

17
00:01:03,570 --> 00:01:06,240
Then let's copy and paste this sucker as well.

18
00:01:07,560 --> 00:01:11,880
And it's not going to be a company again to cursors will go with position.

19
00:01:12,360 --> 00:01:16,510
And I believe in the read me, I have this one as maxlength 100.

20
00:01:17,160 --> 00:01:20,880
So let's fix this and let's set this one up as 50.

21
00:01:21,420 --> 00:01:27,390
Let's save it and I'll just deal with those two select ones, these titles, one where essentially there's

22
00:01:27,390 --> 00:01:34,200
going to be the enum with full time or the status, and then we'll deal with job creation.

23
00:01:34,650 --> 00:01:38,590
So let's start over here, let's say status where you don't think.

24
00:01:39,090 --> 00:01:40,470
Copy and paste this one as well.

25
00:01:40,830 --> 00:01:42,120
So let's set this one up.

26
00:01:42,720 --> 00:01:44,640
I'll call this one status.

27
00:01:45,660 --> 00:01:52,500
It's not going to be a required in a sense, but we'll use the Enum, so type will be string over here.

28
00:01:52,930 --> 00:01:54,390
But let's go here with Enum.

29
00:01:54,390 --> 00:01:59,850
So those are the possible values that we can use on status and we'll go here with Interview.

30
00:02:00,180 --> 00:02:01,830
Then we want to set up the declined.

31
00:02:03,300 --> 00:02:05,550
And we also want to go with branding.

32
00:02:06,970 --> 00:02:09,340
And then lastly, let's set up the default one.

33
00:02:09,729 --> 00:02:12,910
So what is going to be the default value as we're setting this up?

34
00:02:13,270 --> 00:02:18,820
And in my case, I'm going to go with spending now I'll remove the max length and I let's do the same

35
00:02:18,820 --> 00:02:19,090
thing.

36
00:02:19,330 --> 00:02:20,230
Copy and paste.

37
00:02:20,980 --> 00:02:24,540
And this one will be equal to a job again.

38
00:02:24,820 --> 00:02:30,610
And I said this before, but both of them on the front end, we'll be select element.

39
00:02:31,300 --> 00:02:34,030
And what that means is we'll have the possible choices.

40
00:02:34,420 --> 00:02:38,800
And yes, in the state, essentially we will have some default values as well.

41
00:02:39,190 --> 00:02:44,860
So this is going to be the case where we'll kind of a little bit repeat ourselves, but it's a set up

42
00:02:44,860 --> 00:02:45,820
that will have two years.

43
00:02:46,180 --> 00:02:50,350
So let's go here with job and then type, and that is string.

44
00:02:50,680 --> 00:02:54,670
And then as far as possible values, let's try to set it up over here.

45
00:02:55,180 --> 00:02:57,490
Say that I'm going to be looking for full time.

46
00:02:58,150 --> 00:03:02,350
Then I also want to go with part-time, then I want to set up the remote.

47
00:03:03,290 --> 00:03:05,300
And I also want to go with internship.

48
00:03:06,960 --> 00:03:17,370
Internship, Kerry, as far as the default one, let's go here, we think full time, say here, full

49
00:03:17,370 --> 00:03:17,670
time.

50
00:03:18,060 --> 00:03:22,400
Let's save it and now we want to set up the job location.

51
00:03:23,380 --> 00:03:27,880
Again, that is going to be tied to the location where the user is.

52
00:03:28,060 --> 00:03:31,090
So by default, we will use the user's location.

53
00:03:31,780 --> 00:03:35,590
But as you're adding the job, of course you can always change it as well.

54
00:03:35,710 --> 00:03:42,250
So let's go back to our model and we're looking for a job location now.

55
00:03:42,280 --> 00:03:46,480
It's going to be a string, so it's copy and paste quickly around default.

56
00:03:46,480 --> 00:03:54,850
One will be my city default, and then I got my studio here and we do want to set it up as required.

57
00:03:55,760 --> 00:04:01,190
And assert equal to true, let's say that and the last thing we want to do or not.

58
00:04:01,220 --> 00:04:02,360
Maybe not the last one.

59
00:04:02,570 --> 00:04:04,100
We also want to set up timestamps.

60
00:04:04,700 --> 00:04:08,060
May be correct, so we're going to go here with created by.

61
00:04:08,480 --> 00:04:10,550
And I'll set it equal to my user.

62
00:04:10,550 --> 00:04:13,700
So type is equal to a mongoose dot.

63
00:04:14,120 --> 00:04:16,959
Then types and we want to go with object.

64
00:04:17,690 --> 00:04:18,880
Let's set it up as object.

65
00:04:19,519 --> 00:04:21,089
And then what do we want to reference?

66
00:04:21,110 --> 00:04:23,050
We want to reference our user.

67
00:04:23,120 --> 00:04:28,130
So we want to go here with user and we want to set it equal to true.

68
00:04:28,400 --> 00:04:31,190
So that definitely should be always provided.

69
00:04:31,490 --> 00:04:32,930
So let's set it equal to true.

70
00:04:33,290 --> 00:04:34,970
And then let's say please.

71
00:04:35,970 --> 00:04:39,600
Please provide and I'm the user.

72
00:04:40,290 --> 00:04:42,270
OK, we're almost almost almost done.

73
00:04:42,550 --> 00:04:45,390
It's set up those timestamps were set up the comma.

74
00:04:45,600 --> 00:04:50,500
And we're going to go with timestamps equal to true and all the way in the bottom where we want to go

75
00:04:50,500 --> 00:04:52,740
with export default.

76
00:04:53,430 --> 00:04:57,090
Let's look for a mongoose and then that model.

77
00:04:57,570 --> 00:04:59,930
And then we want to set up the name.

78
00:04:59,940 --> 00:05:04,860
In this case, it's going to be a job and then we'll set it equal to a job schema.

79
00:05:05,280 --> 00:05:06,180
Let's save it.

80
00:05:06,540 --> 00:05:10,380
And now we can focus on create a job controller.

