I suppose every project that is considered as huge and diversed into a lot of parts (admin side, widgets, API, website with a lot of stuff and management) can finally encounter that it is actually hard to use only one or several entities by some type everywhere. E.g. let's take
booking entity in action. We have some general entity that have all needed information actually, but somewhere we do need shortened or filled with additional information entity to not modify existing entity. Here are detailed examples:
- payment type
Extended with payment detailed information:
- collection of data regardimg payment type (date when it was done/confirmed/deleted etc, name of buyer, amount of bought items etc)
...and many many more
What is the most logical way to deal with this? Creating a lot of entities to suit every case the most, or make basic entity extendable in some way?
Update 1: The actual question is not about validation of fields or something. The question is about situation when you have a lot of similar entities for different purposes, and how you usually handle such things.