mardi 14 septembre 2021

Need help modeling a relation between images and some classes that use them

I have an Image aggregate, which has 3 properties: content, filename (as key) and mimetype.

Then I have one Company aggregate with the photos and logo properties.

Those properties hold a filename (the image's key) as value, pointing thus to the Image.

There are some other aggregates using images this way.

The thing is, I need the image to be used just once in the whole system. If I use the image in one company, it cannot be used in another. If I use it as a logo, it cannot be used as a photo, an so on.

All solutions I tried smells a lot, so maybe some of you can bring some ideas!

Thanks!

Aucun commentaire:

Enregistrer un commentaire