Since the domain model is the most important component of an application, this section will design it first. The following is a simple class diagram for these microservices:
There are two main domain models shown in the preceding diagram. They are as follows:
- Taxi: This is the main domain model, which will store the taxiid, TaxiType, and TaxiStatus of an actual physical taxi
- TaxiBooking: This is the domain model, which will store the taxiBookingId, TaxiBookingStatus, start location, end location, start time, end time, and so on.
Also, the model uses TaxiType, TaxiStatus, and TaxiBookingStatus enumerations ...