Zeroic
2
Hi! A couple of suggestions:
- Items Cart should have the Quantity, Total and Item (not Items, since an individual item will be added). The Order table should have the Items Cart as a list.
- You can remove the Total Price from Order since you already have it in the Items Cart as the sub-total, so storing the same info twice seems redundant.
- You can remove Restaurant from Items Cart since you already have that in Items as well as the Order
Apart from that, you can achieve the per-product quantity and total revenue by Doing a search for Items Cart where the Item is the current item you want to search for. You’ll get a list of Item Carts that you can add over for the Quantity and Total
Let me know if this helps 