Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global: refactor DTO structure #67

Closed
BrunoRosendo opened this issue Dec 18, 2022 · 0 comments · Fixed by #68
Closed

global: refactor DTO structure #67

BrunoRosendo opened this issue Dec 18, 2022 · 0 comments · Fixed by #68
Assignees
Milestone

Comments

@BrunoRosendo
Copy link
Member

Until a while ago, all the DTOs we had were a direct mapping between DTO and model, so we had a Dto class with useful methods like create() and update(). However, we quickly realized we need more than that kind of DTO (see discussion in #54 (comment)). The result was a few DTOs residing alongside the controller classes, which is not ideal.

The discussion above proposes the following solution:

dto/
     model/
     auth/
     otherSemanticUseCase/

This dto package should either reside in the global scope of the application or inside the controller package, I'll leave that to discussion. It'd also be nice to consider cases of model DTOs that need more fields than the respective model's fields (e.g. creating a project with a list of account IDs to be used as its team).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant