hotfix/fix-product-presentation-dto#76
Merged
Merged
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
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 significant updates to the order and product modules, including changes to enums, database migrations, and service/controller refactoring for improved modularity. The most notable changes involve the addition of new order and delivery statuses, database schema updates for these statuses, and a refactor of product-related services and controllers to enhance separation of concerns.
Updates to Order and Delivery Statuses:
src/order/entities/order.entity.ts: UpdatedOrderStatusenum to includeREADY_FOR_PICKUPandIN_PROGRESS, replacingREADY.src/order/entities/order_delivery.entity.ts: AddedOrderDeliveryStatusenum with multiple statuses (e.g.,PAYMENT_PENDING,DELIVERED) and updated thedeliveryStatuscolumn to use this enum with a default value ofTO_ASSIGN. [1] [2]src/order/migrations/1745083230388-update-order-and-delivery-status-migration.ts: Added a migration to update the database schema for order and delivery statuses, including renaming and replacing enums.Refactoring of Product Module:
src/products/controllers/product-image.controller.ts: ReplacedProductsServicewithProductImageServiceandGenericProductServicefor handling product image operations. Updated all methods to use the new services. [1] [2] [3] [4] [5] [6] [7]src/products/controllers/product-presentation.controller.ts: ReplacedProductsServicewithGenericProductServicefor managing product presentations. [1] [2] [3]Removal of Deprecated Code:
src/products/dto/product.dto.ts: RemovedCreateProductDTOandCreateProductPresentationDTOfrom the product DTO file, as their functionality has been refactored or relocated.src/products/products.controller.ts: Removed thecreateProductmethod and related imports, as product creation functionality has been refactored. [1] [2]Dependency Injection Updates:
src/products/products.module.ts: AddedProductImageServiceto the providers list for dependency injection. [1] [2]Cleanup and Optimization:
src/products/products.service.ts: Removed unused imports and methods related to product creation and presentation management.