Using collections / containers / directories in domain models

Say I want to simulate a movie theater. There will be several rooms in the cinema (for example, 7) where films are played.

I wonder how I can create a domain model for this scenario.

Why?

I am having trouble understanding why in some places I see the first case, and in some others I see something like the second.

If instead of rooms I wanted to depict the connection between Cinema and:

  • Tickets for sale (today).
  • Tickets have already been sold (today)
  • Clients in the Cinema Database
  • A set of hours in which films are played in a given room in a movie theater.
  • A set of places where you can sit in a room in a movie theater.

Should I use directories, should I link them directly to the concept Cinemawith many * in the target?

thank

+3
source share
2 answers

What is the role of directory numbers?

Does it have other attributes / operations or does it only act as a container for rooms?

Can you look through several Catalogs of numbers related to and throughout the life of Cinema instances?

The type of room number sounds like something that you will see at the service level, and not in the domain model.

, , , .

+3

. (.. ). , .

0

Source: https://habr.com/ru/post/1749326/


All Articles