Skip to content

feature/endpoint-list-by-product-presentation-ids#92

Merged
andres15alvarez merged 6 commits into
devfrom
feature/endpoint-list-by-product-presentation-ids
May 6, 2025
Merged

feature/endpoint-list-by-product-presentation-ids#92
andres15alvarez merged 6 commits into
devfrom
feature/endpoint-list-by-product-presentation-ids

Conversation

@andres15alvarez
Copy link
Copy Markdown
Member

This pull request introduces support for specifying payment methods in orders, enhances the payment confirmation process by linking it to orders, and adds a new filter for product queries by ID. Below is a summary of the most important changes grouped by theme:

Payment Method Support in Orders:

  • Added a paymentMethod property to the CreateOrderDTO and ResponseOrderDTO classes, with validation and API documentation annotations (src/order/dto/order.ts). [1] [2]
  • Updated the Order entity to include a paymentMethod column with an enum type and a default value of CASH (src/order/entities/order.entity.ts).
  • Created a database migration to add the payment_method column to the order table and define its enum type (src/order/migrations/1746555455789-add-payment-method-order-migration.ts).
  • Modified the OrderService to handle the paymentMethod field when creating orders (src/order/order.service.ts).

Payment Confirmation Enhancements:

  • Linked the PaymentConfirmation entity to the Order entity via a foreign key relationship and updated its creation logic to associate it with an order (src/payments/entities/payment-confirmation.entity.ts, src/payments/services/payment-confirmation.service.ts). [1] [2]
  • Updated the CreatePaymentConfirmationDTO to include an orderId field for linking payment confirmations to orders (src/payments/dto/payment-confirmation.dto.ts).

Product Query Enhancements:

  • Added an id filter to the ProductQueryDTO class to allow querying products by their IDs, and updated the ProductsController and ProductsService to support this new filter (src/products/dto/product.dto.ts, src/products/products.controller.ts, src/products/products.service.ts). [1] [2] [3]

@andres15alvarez andres15alvarez self-assigned this May 6, 2025
@andres15alvarez andres15alvarez added the feature New feature or request label May 6, 2025
@andres15alvarez andres15alvarez merged commit 0630713 into dev May 6, 2025
2 checks passed
@andres15alvarez andres15alvarez deleted the feature/endpoint-list-by-product-presentation-ids branch May 6, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant