1
Tables (10)
Bookmark
- bookmark_id — BIGINT
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
Cart
- cart_id — BIGINT
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
CartItem
- cart_item_id — BIGINT
- cart_id — BIGINT — Foreign key → Cart.cart_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- quantity — INT — NOT NULL
Category
- category_id — BIGINT
- name — VARCHAR(50) — NOT NULL
Comment
- comment_id — BIGINT
- review_id — BIGINT — Foreign key → Review.review_id — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- content — VARCHAR(500) — NOT NULL
- created_at — DATETIME — NOT NULL
- likes — INT
Order
- order_id — BIGINT
- order_number — VARCHAR(50) — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- order_date — DATE — NOT NULL
- status — VARCHAR(20) — NOT NULL
- total_amount — DECIMAL(10,2)
- delivery_fee — DECIMAL(10,2)
- discount — DECIMAL(10,2)
OrderItem
- order_item_id — BIGINT
- order_id — BIGINT — Foreign key → Order.order_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- quantity — INT — NOT NULL
- price — DECIMAL(10,2) — NOT NULL
Product
- product_id — BIGINT
- name — VARCHAR(100) — NOT NULL
- price — DECIMAL(10,2) — NOT NULL
- description — TEXT
- image — VARCHAR(500)
- stock — INT
- avg_rating — DECIMAL(2,1)
- review_count — INT
- category_id — BIGINT — Foreign key → Category.category_id
Review
- review_id — BIGINT
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- rating — DECIMAL(2,1) — NOT NULL
- content — TEXT
- created_at — DATETIME — NOT NULL
User
- user_id — BIGINT
- name — VARCHAR(50) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- profile_image — VARCHAR(500)