The Booking collection document structure leverages the intermediary classes discussed earlier in this chapter. It brings together the appropriate information from a customer and a property. The customer then adds information such as arrival and departure dates, people in the party (for example, a spouse and children), as well as which room type and how many of that type. The total price is then calculated based upon room type information, including any local taxes or fees.
Here is the Booking document structure:
Booking = {
"bookingKey" : <string>,
"customer" : <CustBooking>,
"property" : <PropBooking>,
"bookingInfo" : <BookingInfo>,
"rooms" : [<RoomBooking>,<RoomBooking>,etc.],
"totalPrice" : <float>
}
Now, let's look at the Common collection document structure.