So let's get cracking, I want to start by creating job, James.
That's the model.
Let's go by getting the mouse that is coming from the mouse.
And I know that some people might be upset, but I'll copy paste.
Now, I'm not going to copy and paste from the read me, but I will copy and paste from the user because
that is how you would set this up normally.
I mean, I really don't see the point.
Are we typing everything from scratch?
So I'm going to just grab everything up to an email and then back in the job, just we want to change
the name first.
So let's call this job schema, and let's make sure that we have proper syntax.
So either curly and I'll also add the parentheses and then let's rename this one.
So it's not going to be a name, and I'm going to go with Mike.
Of course, there's what's called this company.
And as far as the properties well and only the mean length in this case, and I also don't want to use
the term, so I remove both of them.
Then let's copy and paste this sucker as well.
And it's not going to be a company again to cursors will go with position.
And I believe in the read me, I have this one as maxlength 100.
So let's fix this and let's set this one up as 50.
Let's save it and I'll just deal with those two select ones, these titles, one where essentially there's
going to be the enum with full time or the status, and then we'll deal with job creation.
So let's start over here, let's say status where you don't think.
Copy and paste this one as well.
So let's set this one up.
I'll call this one status.
It's not going to be a required in a sense, but we'll use the Enum, so type will be string over here.
But let's go here with Enum.
So those are the possible values that we can use on status and we'll go here with Interview.
Then we want to set up the declined.
And we also want to go with branding.
And then lastly, let's set up the default one.
So what is going to be the default value as we're setting this up?
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
thing.
Copy and paste.
And this one will be equal to a job again.
And I said this before, but both of them on the front end, we'll be select element.
And what that means is we'll have the possible choices.
And yes, in the state, essentially we will have some default values as well.
So this is going to be the case where we'll kind of a little bit repeat ourselves, but it's a set up
that will have two years.
So let's go here with job and then type, and that is string.
And then as far as possible values, let's try to set it up over here.
Say that I'm going to be looking for full time.
Then I also want to go with part-time, then I want to set up the remote.
And I also want to go with internship.
Internship, Kerry, as far as the default one, let's go here, we think full time, say here, full
time.
Let's save it and now we want to set up the job location.
Again, that is going to be tied to the location where the user is.
So by default, we will use the user's location.
But as you're adding the job, of course you can always change it as well.
So let's go back to our model and we're looking for a job location now.
It's going to be a string, so it's copy and paste quickly around default.
One will be my city default, and then I got my studio here and we do want to set it up as required.
And assert equal to true, let's say that and the last thing we want to do or not.
Maybe not the last one.
We also want to set up timestamps.
May be correct, so we're going to go here with created by.
And I'll set it equal to my user.
So type is equal to a mongoose dot.
Then types and we want to go with object.
Let's set it up as object.
And then what do we want to reference?
We want to reference our user.
So we want to go here with user and we want to set it equal to true.
So that definitely should be always provided.
So let's set it equal to true.
And then let's say please.
Please provide and I'm the user.
OK, we're almost almost almost done.
It's set up those timestamps were set up the comma.
And we're going to go with timestamps equal to true and all the way in the bottom where we want to go
with export default.
Let's look for a mongoose and then that model.
And then we want to set up the name.
In this case, it's going to be a job and then we'll set it equal to a job schema.
Let's save it.
And now we can focus on create a job controller.