I have several classes inheriting from an Admin
class: Manager
, Translator
, etc.
Admin
is an aggregate, so should have its own Repository. However, some methods to find Managers or Translators might be specific to these classes. Others might be common to all Admins.
What is the best practice here? Should I:
- put all the methods to find Admins in one Repository?
- or mimic the hierarchy of domain model classes with a hierarchy of Repositories, then having a
ManagerRepository
and aTranslatorRepository
extending anAdminRepository
?