DTOs and Product delete refactor#35
Merged
Merged
Conversation
…Os and update related references
… instead of ShippingMethod, enhancing shipping cost calculation and DTO structure
…proved error handling
…s across product creation and management
…ion and error handling
… cost from ShippingMethodDetailDTO
- Rename conversion function from `ConvertToCheckoutDTO` to `toCheckoutDTO` for consistency. - Update tests to reflect the new function name. - Modify `SuccessResponseWithMessage` to accept pointer types for better handling of nil values. - Implement `ConvertToOrderDTO` function to streamline order conversion logic. - Refactor API handlers to utilize new response creation methods and reduce redundancy in error handling. - Enhance pagination logic in admin checkout listing.
…ne shipping method initialization
…currency DTO handling
…tions and improving DTO conversion
…pdating response structures
…teProductInput and introduce Weight; enhance error responses in product handler
…ted orders and active checkouts; update repositories and tests accordingly
… build, and development setup
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 several changes across multiple files to improve functionality, enhance usability, and streamline code. The most significant updates include the addition of a
CategoryUseCaseimplementation, improvements toCheckoutUseCasefor shipping method handling, updates to product variant logic inProductUseCase, and enhancements to database and development tooling via.dockerignoreandMakefile.New Feature: Category Use Case Implementation
CategoryUseCaseininternal/application/usecase/category_usecase.go, enabling category creation, updating, deletion, and retrieval, with validation for parent categories and unique constraints.Checkout Use Case Enhancements
CheckoutUseCaseto integrateShippingUseCasefor calculating shipping options and validating shipping methods, improving modularity and error handling. [1] [2] [3] [4]Product Variant Logic Improvements
ProductUseCaseto sethas_variants=trueonly for products with multiple variants, ensuring logical consistency in product data. [1] [2]CurrencyPricesinUpdateProductInput.Development and Tooling Updates
.dockerignoreto exclude unnecessary files and directories, reducing the Docker build context size.Makefilewith commands for database management, application setup, testing, and development workflows.Minor Improvements and Fixes
OrderUseCasemethods and adjustedFailOrderto accept anOrderentity instead of an ID. [1] [2] [3]seedProductVariantsand optimized handling ofhas_variantsfor products with multiple variants. [1] [2] [3]