Project
Tables (7)
cart
- cart_id — BIGINT — Primary key — NOT NULL
- quantity — INT — NOT NULL
- created_at — DATETIME(6)
- member_id — BIGINT — Foreign key → members.member_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- updated_at — DATETIME(6)
members
- member_id — BIGINT — Primary key — NOT NULL
- point — INT
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- email — VARCHAR(50) — NOT NULL
- address — VARCHAR(200) — NOT NULL
- postcode — VARCHAR(200)
- password — VARCHAR(255) — NOT NULL
- role — VARCHAR(50) — NOT NULL
order_items
- order_item_id — BIGINT — Primary key — NOT NULL
- quantity — INT — NOT NULL
- created_at — DATETIME(6)
- order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- updated_at — DATETIME(6)
orders
- order_id — BIGINT — Primary key — NOT NULL
- created_at — DATETIME(6)
- member_id — BIGINT — Foreign key → members.member_id — NOT NULL
- updated_at — DATETIME(6)
- order_status — VARCHAR(50) — NOT NULL
products
- product_id — BIGINT — Primary key — NOT NULL
- discount — INT
- order_count — INT — NOT NULL
- price — INT — NOT NULL
- created_at — DATETIME(6)
- updated_at — DATETIME(6)
- product_name — VARCHAR(20) — NOT NULL
- description — VARCHAR(500)
- category — ENUM('ADE','COFFEE','SMOOTHIE','TEA') — NOT NULL
question
- question_id — BIGINT — Primary key — NOT NULL
- created_at — DATETIME(6)
- member_id — BIGINT
- updated_at — DATETIME(6)
- answer — VARCHAR(200) — NOT NULL
- question — VARCHAR(200) — NOT NULL
review
- review_id — BIGINT — Primary key — NOT NULL
- rating — INT — NOT NULL
- created_at — DATETIME(6)
- member_id — BIGINT — Foreign key → members.member_id — NOT NULL
- product_id — BIGINT — NOT NULL
- updated_at — DATETIME(6)
- review — VARCHAR(200)