O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Data Model

I’ve made decisions about how we’re modeling our universe that will have consequences for our code structure throughout our application. Our application starts with a relatively simple data model with the following four ActiveRecord models:

  • Event—Something you might buy a ticket to see, such as Julius Caesar or Much Ado About Nothing. Right now, events have only a minimal set of attributes: a title, description and an image_url.

  • Performance—A specific date and time that an event is performed. The way the data is structured, a performance is what you actually buy tickets for. A performance belongs to an event, and it has a start and end time.

  • Ticket—What a user actually purchases, which is the right to a seat ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required