Refactoring to Protocols

In the last 2 episodes we added some behavior to add automatically managed timestamp fields and some fairly complex logic to set up UUID primary keys the way we want. Now if we want to share those, or make them the default for our models, we currently have to copy & paste. In this episode we will refactor this logic into reusable protocols so that our work can be applied on any model we wish easily.

This is a companion discussion topic for the original entry at https://nsscreencast.com/episodes/365-vapor-postgresql-refactoring-protocols