Before we move on to the topic of controllers, we will go back to our ShoppingList Vapor application and create two Vapor Models that will be saved in the database using Fluent. These two Models are the ShoppingList Model and the Item Model. Vapor's Model is an extension on top of Fluent's Entity protocol that conveniently implements certain methods in the protocol so we do not have to write the implementation of these methods for every Model we write. Let's see how we can create these two Models using Vapor's Model protocol.
Vapor Models
The Shopping List Model
To create a Shopping List Model, all we need to do is inherit our class from the Model protocol, add a few methods that will be used to create...