Skip to content

Domain Objects

KT edited this page Dec 12, 2018 · 8 revisions

Domain Objects

1) Movie

  • We are storing movies requested by users in our database, as and when they request a movie. The Movie DB web service is used for searching and listing movies.
  • User can browse movies, search for latest movies, and can request movies
  • A movie can be showed at an event.

Attributes

  • title (String) : Movie's title
  • overview (String) : Movie's plot or a short summary
  • release_date (String) : Movie's release date
  • rating (String) : Average movie rating (out of 10)
  • poster_url (String) : link to movie's poster
  • homepage_url (String) : link to movie's website
  • status (String) : Whether movie is upcoming or released
  • user (String - a user id, ObjectId) : the ID of the user who has requested the movie

Relationships

  • Event can have one or more movies
  • User can request zero or more movies

2) Event

  • An event can have one or more movies being shown at a get-together among friends or random strangers who wanted to come together for watching a movie in a casual setting instead of a theater like a park etc.
  • Host user and Admin user can create events.
  • A movie can be showed at an event.

Attributes

  • name (String) : Event's name
  • movies (String) : A comma separated list of movie names that will be shown at the event
  • date (String) : Average movie rating (out of 10)
  • time (String) : link to movie's poster
  • location (String) : link to movie's website
  • maxTickets (String) : Maximum number of tickets available for the event
  • user (String - a user id, ObjectId) : the ID of the user who has created the event

Relationships

  • 1 Event can have one or more movies
  • 1 Event can have zero or more bookings
  • 1 User can book tickets for zero or more events

3) Booking

  • A booking represents a transaction whereby a guest user books a ticket for an event
  • Guest can do bookings for events.

Attributes

  • user (String - a user id, ObjectId) : the ID of the user who has created this booking
  • eventId (String) : the event ID of the event for which this booking is done
  • event (Event) : the event for which the booking is done
  • __tickets (String) __ : the number of tickets booked in one single booking

Relationships

  • 1 Event can have zero or more bookings
  • 1 User can have zero or more bookings

4) Ticket

  • Tickets are created for events.
  • Users can book 1 or many tickets for an event

Attributes

  • booking (String - a booking id, ObjectId) : the ID of the booking under which the ticket has been created
  • event (String - a event id, ObjectId) : the ID of the event for which the ticket was booked
  • user (String - a user id, ObjectId) : the ID of the user who has booked the ticket

Relationships

  • 1 Event can have one or more tickets
  • Users can book 1 or many tickets for an event
  • 1 Booking can have 1 or more tickets