In our application, we will want to know who has uploaded which video. We are also going to need to store a reference to our video in the database. What should our Video model object look like?
If we think about it for a moment, we can come up with a list of properties for a video that will be displayed:
Title: The name of the video that the user has given us
Original File: The name of the original file that was uploaded
File: A unique name for the converted video, its thumbnail, and poster image
Status: Whether the video has been converted or not
Converted At: The time when the video was converted
Uploaded At: The time when the video was uploaded
User: The user that uploaded the video
With this information, let's get on and create our persistent object for the video.