Vimall03 / Alimento

Alimento is an online homemade food delivery platform that connects passionate home chefs with food enthusiasts.
The Unlicense
22 stars 69 forks source link

Implement view order history for customer dashboard [BACKEND + ROUTES] #247

Open shubhagarwal1 opened 2 hours ago

shubhagarwal1 commented 2 hours ago

APIS WILL BE IMPLEMENTED ACC. TO THIS SCHEMA

1. Backend Route

Endpoint to Fetch Order History

These endpoints allows customers to view their order history.

HTTP Method:
GET


2. Database Schema

Ensure that you have an orders table in your database that includes the following columns:

Column Name Data Type Description
order_id UUID or Integer Unique identifier for each order.
customer_id UUID Foreign key referencing the customer's ID.
order_date DateTime Date when the order was placed.
status String Current status of the order (e.g., "Pending", "Completed", "Cancelled").
total_amount Decimal Total amount of the order.
items JSON List of items purchased in the order.
payment_method String Payment method used for the order.
shipping_address String Address where the order was shipped.
created_at DateTime Timestamp when the order was created.
updated_at DateTime Timestamp for the last update.

Request Query Parameters

Parameter Type Required Description
customer_id UUID Yes The ID of the customer to fetch orders for.
page Integer No For pagination, the current page number.
limit
github-actions[bot] commented 2 hours ago

🎉 Thank you for your interest in contributing to this repository! Please wait while we review and assign this issue to you. In the meantime, feel free to ⭐ the repo to stay updated on future developments.

Stay awesome! 😎