Beanhaus
Tables (4)
menu_items
- item_id — int(11) — Primary key — NOT NULL
- name — varchar(150) — NOT NULL
- description — text
- price — decimal(10,2) — NOT NULL
- category — varchar(100) — NOT NULL
- is_available — tinyint(1)
order_items
- order_item_id — int(11) — Primary key — NOT NULL
- order_id — int(11) — Foreign key → orders.order_id — NOT NULL
- item_id — int(11) — NOT NULL
- quantity — int(11) — NOT NULL
- price_at_time — decimal(10,2) — NOT NULL
- item_id (item_id2) — int(11) — Foreign key → menu_items.item_id — NOT NULL
orders
- order_id — int(11) — Primary key — NOT NULL
- user_id — int(11) — Foreign key → users.user_id — NOT NULL
- total_amount — decimal(10,2) — NOT NULL
- status — enum('Pending','Completed','Cancelled')
- payment_method — enum('GCash','Walk in')
- gcash_reference_no — varchar(50)
- order_date — timestamp — NOT NULL
users
- user_id — int(11) — Primary key — NOT NULL
- username — varchar(50) — NOT NULL
- email — varchar(100) — NOT NULL
- password_hash — varchar(255) — NOT NULL
- role — enum('Admin','Staff','Customer')
- otp_code — varchar(6)
- otp_expiry — datetime
- created_at — timestamp — NOT NULL