Skip to content
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

Add Order Schema and CRUD Controllers #875

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

IkkiOcean
Copy link
Contributor

@IkkiOcean IkkiOcean commented Nov 8, 2024

Description:

This PR introduces the Order schema to the application, along with the following controllers for order management:

  • updateOrderItemQuantity
  • removeItemFromOrder
  • addItemToOrder
  • getOrderById
  • deleteOrder
  • updateOrderStatus
  • getOrders
  • createOrder
  • bulkUpdateOrderStatus
  • getOrderStatusHistory
  • getOrdersByStatus
  • getAllOrdersForAdmin

These changes provide the necessary logic and structure for managing orders within the system, supporting both individual and bulk actions, as well as facilitating administrative control over order status.

Changes:

1. Order Schema:

  • A new schema Order has been added to the database to manage the order details, including item information, customer details, order status, and timestamps.

2. Controllers Added:

  • updateOrderItemQuantity: Updates the quantity of a specific item in an existing order.
  • removeItemFromOrder: Removes an item from an order.
  • addItemToOrder: Adds an item to an existing order.
  • getOrderById: Retrieves a specific order by its ID.
  • deleteOrder: Deletes an order from the system.
  • updateOrderStatus: Changes the status of an order (e.g., pending, shipped, delivered).
  • getOrders: Retrieves a list of orders, possibly filtered by parameters like status or date.
  • createOrder: Creates a new order and adds it to the system.
  • bulkUpdateOrderStatus: Updates the status of multiple orders in one request.
  • getOrderStatusHistory: Retrieves the status change history for a specific order.
  • getOrdersByStatus: Retrieves orders filtered by their current status.
  • getAllOrdersForAdmin: Retrieves all orders, primarily for administrative use.

Related Issues:

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agro-tech-ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 4:46pm

@manikumarreddyu manikumarreddyu merged commit 42369ac into manikumarreddyu:main Nov 8, 2024
4 checks passed
Copy link
Contributor

github-actions bot commented Nov 8, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Order History Schema and Implement CRUD API
2 participants