There are 2 related questions here. I'm coming from Flecs and am looking for similar patterns to achieve clean architecture. Let me give you an example of what I mean.
1) Entity attribute composition
Character2D has things like Position, Scale, etc. Enemy is a specialisation of Character2D (basically like a subclass in inheritance) and adds attributes specific to the enemy such as MeleeDamage.
Using this pattern I can reuse and define the common component fields only once higher in the hierarchy. How do I do this in Unity ?
2) Entity relationships
There is an IsA relationship between Enemy and Character2D. This is very useful because I can query for 'anything that's a Character2D' in my systems and get all entities, Enemy or not. Is using tags like IsCharacter2DTag the only way to do this in Unity or is there a similar way?