jeudi 2 juin 2016

What is the correct domain model?

I am new to Object oriented design patterns. I have a basic idea of the domain model. However, I am stuck at the following problem. The problem is that I have a system that contains events and customers(both 1....*). Additionally, the events contain packages. The user is allowed to book events. However, he has to do it by booking a package that is contained inside an event. What should be the correct domain model of the given situation. I did a lot of research about similar questions, but could not find a suitable answer.

My guesses: 1)

In this image, The customers can book events, but I am unsure about this because customers are booking packages contained inside events. Should I select this domain model for the given system? It is intuitive because it allows customers to book events.

2) enter image description here

In this image, the domain model signifies the system's structure. However, customers should reach the packages only through events. Therefore, I am unsure about this domain model. How can a customer book a package when it is contained inside an event.

Please suggest which domain model is correct. I am a beginner so please provide a good explanation. Thanks for helping me out!

Aucun commentaire:

Enregistrer un commentaire