Man: 00:00 Let's create a new folder to store all the Mongoose model. The name of the folder is models. Here, I am going to create a new product model, Product.js. First, we need to import the Mongoose.
00:14 I want to get the schema class from the Mongoose package. Let me create a new instance from the schema class. I am going to name it to ProductSchema. Here, we need to define all the properties. We have name property, and the type of name is string. Yes, it is required property. I am going to set it to true.
00:37 Another property, we have QTY, and the type is number. Finally, we need to export the instance of this model. I am going to use mongoose.model method. We need to provide the name, which is product, and the ProductSchema.