veevism / Ghum-Restaurant-5th

9 stars 0 forks source link

Create order_details database #21

Closed webwebweb5 closed 1 year ago

webwebweb5 commented 1 year ago

order_details:

const orders = new mongoose.Schema({ userId: String, // Reference to the user who placed the order items: [ { itemId: String, // Reference to the item quantity: Number, price: Number, // Store price at the time of the order to handle price changes }, // ... more items ], orderDate: Date, status: String, // e.g., 'Processing', 'Shipped', 'Delivered', 'Canceled' });

Users will create a new order database when they select an item to the cart and then click the checkout button.

webwebweb5 commented 1 year ago

822ad7f314e32065594a751c6d116b24690ac786