user
Tables (4)
Carts
- id — INT
- user_id — INT — NOT NULL
- product_variant_id — INT — NOT NULL
- quantity — INT — NOT NULL
- created_at — TIMESTAMP
Order_Items
- id — INT
- order_id — INT — NOT NULL
- product_id — INT — NOT NULL
- variant_name — VARCHAR(100) — 주문 당시 옵션명 스냅샷
- order_price — DECIMAL(10, 2) — NOT NULL — 주문 당시 가격 스냅샷' CHECK (order_price >= 0
- quantity — INT — NOT NULL
- created_at — TIMESTAMP
Payments
- id — INT
- order_id — INT — NOT NULL
- method — VARCHAR(20) — NOT NULL
- transaction_id — VARCHAR(100)
- amount — DECIMAL(10, 2) — NOT NULL
- paid_at — TIMESTAMP
Reviews
- id — INT
- product_id — INT — NOT NULL
- user_id — INT — NOT NULL
- order_item_id — INT — Foreign key → Order_Items.id — NOT NULL
- rating — INT — NOT NULL
- content — TEXT
- image_url — VARCHAR(500)
- created_at — TIMESTAMP