endpoint and service layer (Pattern and best practice )

Posted 1 year ago by tiagomatosweb

Hi all,

I'm just wondering which way you would make the following

I have Order and Project Models.

Order has project_id which is not always populated. I can have order without Project.

To get project order would you build

api/projects/{projectId}/order -> pointing to a getOrder method in the Project Entity.

api/projects/{projectId}/order -> pointing to a getOrderByProjectId method in the Order Entity.

api/orders/projects/{projectId} -> pointing to a getOrderByProjectId method in the Order Entity.

Or any other better way?

Cheers.

Please sign in or create an account to participate in this conversation.