These are js files usually stored under a models folder.
Used as templates for objects stored in MongoDB to follow.
Example Model Template
Built-in Methods
Mongoose models have built-in methods to communicate with the mongodb database.
model.create()
Input is a json which should match a similar structure to the product schema.
If it matches the product schema, then that input is created in the database
model.find()
Takes a query input and then searches the mongodb database for that input.
model.findById(id)
Takes the model’s id and then returns the one it found.