online_shoppingmall
Tables (9)
Cart
- cart_id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key — NOT NULL
- created_at — DATETIME — NOT NULL
CartItem
- cart_item_id — BIGINT — Primary key — NOT NULL
- cart_id — BIGINT — Foreign key → Cart.cart_id — NOT NULL
- product_id — BIGINT — Foreign key — NOT NULL
- quantity — INT — NOT NULL
Delivery
- delivery_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key — NOT NULL
- address — VARCHAR(255) — NOT NULL
- delivery_status — VARCHAR(30) — NOT NULL
Member
- member_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- phone — VARCHAR(20)
OrderItem
- order_item_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → Orders.order_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- quantity — INT — NOT NULL
Orders
- order_id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → Member.member_id — NOT NULL
- order_date — DATETIME — NOT NULL
- status — VARCHAR(30) — NOT NULL
Payment
- payment_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → Orders.order_id — NOT NULL
- payment_method — VARCHAR(30) — NOT NULL
- payment_status — VARCHAR(30) — NOT NULL
Product
- product_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- price — INT — NOT NULL
- stock — INT — NOT NULL
Review
- review_id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → Member.member_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- rating — INT — NOT NULL