From the course: Creating Your First Spring Boot Microservice

The domain model

From the course: Creating Your First Spring Boot Microservice

Start my 1-month free trial

The domain model

- [Instructor] Now we are ready to start implementing the solution for the Explore California RESTful web service. The first step is to create the domain model from the explorecalifornia.org/tours page. The primary entities are tour packages and tours. A tour package is a collection of tours sharing a certain theme. Let's look at a tour package called Backpack Cal. Backpack Cal is associated with five tours, Big Sur Retreat, Channel Island Excursion, Death Valley Survivor's Trek, In the Steps of John Muir, and the Mount Whitney Climbers Tour. After examining the fields, I've defined the following classes, tour, tour package, region, and difficulty. Here is a class diagram, which will show you the attributes and the classes and how they relate to each other. The central artifact is a tour. A tour has a title, a description, which is a short explanation, a blurb, which is a longer explanation, a price, a duration, comma separated bullet points, and key words used for searching tours. We see that a tour also has a region and a difficulty. Region is modeled as an enumerated type where the possible values are Northern California, Central Coast, Southern California, and Varies. Difficulty is modeled as an enumeration as well where the possible values are easy, medium, difficult, and varies. Tour is associated with one tour package, but a tour package is associated with several possible tours.

Contents