Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate.
Suppose we have a Movie entity which makes the root of an aggregate. This Movie entity is related with some set of AdvertisementEvent objects with the role of displaying an advertisement at certain timestamp.
The AdvertisementEvent contains a link to some Banner that must be displayed, the coordinates and some effect filters.
Since AdvertisementEvent is just a collection of configuration parameters I am not sure if I should care about its identity and treat it like just a large value object. However I do care that within a Movie there must be only one AdvertisementEvent at a certain timestamp, probably even around the timestamps.
I find hard to split my doubts in multiple independent questions, so there they go:
- Does a collection of configuration parameters sounds like a value object?
- Am I mixing the concept of uniqueness of AdvertisementEvent within Movie and transactional integrity rule?
- Does any of the choices in point (2) implies that AdvertisementEvent must be a member of the aggregate made by Movie?
- Is my AdvertisementEvent object an Entity, a Value Object or an Event Object? (I used the Event suffix in the name to highlight my confusion)
- Are large value objects like this a design smell?
I guess that I am not dealing with an Event in the sense of DDD because it is not something that just happens. The real DDD event should be something more like AdvertisementEventReached