I'm modeling a system where there are Presents. Those presents can be presents you Offer or presents you Receive. Also, those presents can be Single or Multiple and, finally they can also be of a type, like Toys, Food, Trips or Other.
So, I thought of :
Presents --> Toys --> Offer --> Single
| | --> Multiple
| --> Receive --> Single
| --> Multiple
--> Food --> Offer --> Single
| | --> Multiple
| --> Receive --> ...
--> Trip --> ..
--> Other --> ..
I found that this is the only solution to my system. All the "leafs" would be implemented in different tables, and thats because all the "leafs" can have different models, sometimes it will be one more attribute. Sometimes it will be more. So, its a triple inheritance, where the model of the Present class varies in it's attributes depending on three factors.
The thing is, that I found this solution to be very ugly, if you know what I mean. Thats why I wanna ask you guys your opinion on this matter.
Thanks in advance. Joan