Let's move on to populate the ViewController we have just created with the proper entities.
The first thing we need to do is to create the entities, which is really straightforward. Basically, we just need to map the requested fields in a struct
:
struct Todo: Equatable { let description: String let list: List let dueDate: NSDate let done: Bool let doneDate: NSDate? } func ==(todo1: Todo, todo2: Todo) -> Bool { return todo1.description == todo2.description && todo1.dueDate == todo2.dueDate } struct List { let description: String }