Implemented Paginated User History for Trips, Ratings, Payments, and Requests.#67
Merged
Conversation
…and rating and vehicle.
Implemented Paginated User History for Trips, Ratings, Payments, and Requests.
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
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.
This pull request introduces paginated endpoints for user-related data and adds new DTOs to standardize API responses, improving scalability and API consistency. The main changes include adding paginated endpoints for payments, ratings, trips, and requests, as well as introducing DTOs for payments and trips. Additionally, repository and service layers are updated to support pagination, and some DTOs are reorganized for better structure.
API Enhancements:
pageandsizeparameters and return paginated results sorted by relevant fields. (PaymentController.java,RatingController.java,TripController.java, [1] [2] [3]DTO Additions and Refactoring:
PaymentDtoandTripDtoto standardize and encapsulate payment and trip data in API responses. (PaymentDto.java,TripDto.java, [1] [2]RequestDtofrom theadminpackage to a newrequestpackage for better organization. [1] [2] [3]Repository Layer Updates:
findByUserId(Pageable)) toPaymentRepository,RatingRepository,RequestRepository, and updatedTripRepositoryto support pagination. [1] [2] [3] [4]Service Layer Updates:
PaymentServiceand its implementation to provide paginated retrieval of user payments, returningPaymentDtoobjects. [1] [2] [3]Dependency and Import Updates:
Page,Pageable,PageRequest,Sort) across controllers, repositories, and services. [1] [2] [3] [4]These changes improve API scalability and consistency, making it easier to handle large datasets and maintain a clean separation of concerns in the codebase.