-
Notifications
You must be signed in to change notification settings - Fork 0
Add EditPostDto for wrapping PostEntity with accessor methods #261
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
Open
zigzagdev
wants to merge
162
commits into
feature/edit-post-application
Choose a base branch
from
main
base: feature/edit-post-application
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-collection Implement PostEntityCollection with array conversion and factory method
…ervice-interface Define GetAllUserPostQueryServiceInterface for retrieving user's post collection
Implement PostEntityCollection and define GetAllUserPostQueryServiceInterface
…tion-dto Implement Pagination DTO and factory for application-layer pagination handling
…tion-viewmodel Implement Pagination ViewModel and factory for presentation-layer formatting
…tion Integrate pagination infrastructure into show-post-index branch
…tructure Implement `GetAllUserPostQueryService` and its integration test
…with-pagination Add pagination support to GetAllUserPostQueryService and provide corresponding integration test
…ation-dto Add DTO and DTO Collection for GetAllUserPost use case
…ation-usecase Add use case for retrieving all user posts with pagination
…ation Merge GetAllUserPost UseCase and DTO & DtoCollection
…tation-viewmodel Implement GetAllUserPostViewModel and its test
…tation-controller Implement controller method to retrieve all posts for a user with pagination
…tation Merge ViewModel and Controller for Post Retrieval in Presentation Layer
…repository Implement query service for retrieving user and other users' posts with pagination support
Integrate infrastructure layer for post query services
…ation-dto Add use case for retrieving public posts from other users
…ation Merge application layer for handling post retrieval use cases
…tation-viewmodel Add GetPostViewModel and GetPostsViewModelCollection with unit tests
…tation-controller Add GetOthersPostsController action and its feature test
…tation Merge Presentation layer for GetOthersPosts flow (Controller, ViewModel, Factory)
Add feature test for retrieving public posts by other users
Merge feature test for retrieving others’ public posts into `main`
…ster Fix incorrect endpoint in User registration feature tests
Fix incorrect endpoint in User show feature test
Fix incorrect endpoints in User registration and retrieval feature tests
Fix and refactor feature test for creating posts
Fix and refine feature test for updating a post via API
…all_user_posts Fix and refactor feature test for retrieving all user posts via API
Fix and refactor multiple feature tests for Posts API
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces
EditPostDto
, a Data Transfer Object that encapsulates aPostEntity
and exposes value accessors and serialization viatoArray()
.Why
Instead of directly passing a domain entity through the Application layer, wrapping it inside a dedicated DTO allows for clearer data boundaries, transformation logic, and future-proofing (e.g., formatting, derived values, or flattening nested structures).
How
EditPostDto
class:PostEntity
via constructor.getId
,getUserId
,getContent
, etc.).toArray()
to export flattened primitive values.build()
factory method for clarity and testability.