delivery
Tables (8)
Cart (Untitled5)
- cart_id (Key3) — Primary key — NOT NULL
- user_id (Key) — int — Foreign key → Users.user_id — NOT NULL
- store_id (Key2) — int — Foreign key → Stores.store_id — NOT NULL
CartItem (Untitled6)
- cart_item_id (Key2) — Primary key — NOT NULL
- cart_id (Key3) — Foreign key → Cart.cart_id — NOT NULL
- menu_id (Key) — Foreign key → Menus.menu_id — NOT NULL
Menus (Untitled4)
- menu_id (Key) — Primary key — NOT NULL
- name (Field)
- price (Field5)
- status (Field4) — enum(SELLING,SOLD_OUT,DELETED)
- created_at (Field2)
- updated_at (Field3)
- store_id (Key2) — Foreign key → Stores.store_id — NOT NULL
Orders (Untitled7)
- order_id (Key) — Primary key — NOT NULL
- status (Field) — enum(ORDERED,ACCEPTED,COOKING,CANCELLED)
- quantity (Field3)
- price (Field4)
- created_at (Field2)
- user_id (Key3) — int — Foreign key → Users.user_id — NOT NULL
- review_id (Key4) — Foreign key → Reviews.review_id — NOT NULL
Orders_Menus (Untitled2)
- order_menu_id (Key) — Primary key — NOT NULL
- menu_id (Key2) — Foreign key → Menus.menu_id — NOT NULL
- order_id (Key3) — Foreign key → Orders.order_id — NOT NULL
- quantity (Field)
- price (Field2) — int
Reviews (Untitled8)
- review_id (Key) — Primary key — NOT NULL
- rating (Field)
- comment (Field2)
- status (Field5)
- created_at (Field3)
- updated_at (Field4)
- user_id (Key2) — int — Foreign key → Users.user_id — NOT NULL
- store_id (Key3) — Foreign key → Stores.store_id — NOT NULL
- order_id (Key4) — Foreign key → Orders.order_id — NOT NULL
Stores (Untitled3)
- store_id (Key) — int — Primary key — NOT NULL
- name (Field) — varchar(50)
- open_time (Field2) — datetime
- close_time (Field3) — datetime
- min_order_price (Field7) — int
- status (Field6) — int
- created_at (Field4) — datetime
- updated_at (Field5) — datetime
- user_id (Key2) — int — Foreign key → Users.user_id — NOT NULL
Users (Untitled)
- user_id (Key) — int — Primary key — NOT NULL
- email (Field) — varchar(50)
- password (Field2) — varchar(100)
- role (Field6) — enum (admin, user, owner)
- status (Field3) — boolean
- created_at (Field4) — datetime
- updated_at (Field5) — datetime