I have a following structure.
Resources
can have multiple endpoints
.
Example:
Resource tickets
can be accessed on following endpoints
:
- /api/tickets
- /api/agent/tickets
- /api/group/5/tickets
- /api/tickets/closed etc.
At first, this looks like aggregate, where Resource
is AR, and endpoints
are child entities.
I also have UserTypes
.
What I need is to build a relation between Usertypes
and Endpoints
, so each UserType
can have a diferrent access for endpoints.
Example for, UserType
admin could access all endpoints
for tickets resource
, while user type agent could have access to only portion of endpoints
for the same resource
.
What would be a suggested way to connect EndPoints
and UserTypes
in terms of DDD?