주문(옵션)
테이블 (6)
Cart (장바구니)
- 아이디 (id) — int8 — 기본 키 — NOT NULL
- 옵션 아이디 (option_id) — int8 — 외래 키 → Option.아이디 — NOT NULL
- 유저 아이디 (user_id) — int8 — 외래 키 → User.아이디 — NOT NULL
- 상품 아이디 (product_id) — int8 — 외래 키 → Product.아이디 — NOT NULL
- 수량 (quantity) — int
- 생성일자 (created_at) — datetime
Option (옵션)
- 아이디 (id) — int8 — 기본 키 — NOT NULL
- 상품 아이디 (product_id) — int8 — 외래 키 → Product.아이디 — NOT NULL
- 옵션명 (name) — char(255)
- 가격 (price) — int
- 재고 (stock) — int
Order (주문)
- 아이디 (id) — int8 — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int8 — 외래 키 → User.아이디 — NOT NULL
- 구매수량 (quantity) — int
- 배송비 (shipping_price) — int
- 배송지 (shipping_address) — char(255)
- 총 금액 (total_price) — int
- 장바구니 구매여부 (is_cart) — bool
- 주문일 (created_at) — datetime
- 수정일 (updated_at) — datetime
Product (상품)
- 아이디 (id) — int8 — 기본 키 — NOT NULL
- 대표이름 (name) — int8
- 기본가격 (price)
Purchase (거래)
- 아이디 (id) — int8 — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int8 — 외래 키 → User.아이디 — NOT NULL
- 옵션 아이디 (option_id) — int8 — 외래 키 → Option.아이디 — NOT NULL
- 상품 아이디 (product_id) — int8 — 외래 키 → Product.아이디 — NOT NULL
- 주문 아이디 (order_id) — int8 — 외래 키 → Order.아이디 — NOT NULL
- 구매수량 (quantity) — int
- 옵션 금액 (total_price) — int
- 구매일 (created_at) — datetime
User (유저)
- 아이디 (id) — int8 — 기본 키 — NOT NULL