woowacourse-shopping-order
Tables (8)
cart_item
- PK (id) — BIGINT — Primary key — NOT NULL
- 상품 수량 (quantity) — INT
- 상품 아이디 (product_id) — BIGINT — Foreign key → product.PK — NOT NULL
- 사용자 아이디 (member_id) — BIGINT — Foreign key → member.PK — NOT NULL
coupon
- PK (id) — BIGINT — Primary key — NOT NULL
- 쿠폰 이름 (coupon_name) — VARCHAR
- 할인 종류 (discount_type) — VARCHAR
- 할인 양 (value) — DECIMAL(10,3)
member
- PK (id) — BIGINT — Primary key — NOT NULL
- 사용자 email (email) — VARCHAR
- 사용자 비밀번호 (password) — VARCHAR
member_coupon
- PK (id) — BIGINT — Primary key — NOT NULL
- 쿠폰 사용 여부 (is_used) — BOOLEAN
- 사용자 아이디 (member_id) — BIGINT — Foreign key → member.PK — NOT NULL
- 쿠폰 아이디 (coupon_id) — BIGINT — Foreign key → coupon.PK — NOT NULL
order_coupon
- PK (id) — BIGINT — Primary key — NOT NULL
- 쿠폰 이름 (coupon_name) — VARCHAR
- 쿠폰 할인 금액 (discount_amount) — INT
- 주문 아이디 (orders_id) — BIGINT — Foreign key → orders.PK — NOT NULL
- 사용자쿠폰 아이디 (member_coupon_id) — BIGINT — NOT NULL
order_item
- PK (id) — BIGINT — Primary key — NOT NULL
- 상품명 (product_name) — VARCHAR
- 상품 가격 (price) — INT
- 상품 이미지 주소 (image_url) — VARCHAR
- 상품 수량 (quantity) — INT
- 주문 아이디 (orders_id) — BIGINT — Foreign key → orders.PK — NOT NULL
- 상품 아이디 (product_id) — BIGINT — NOT NULL
orders
- PK (id) — BIGINT — Primary key — NOT NULL
- 상품 총액 (original_price) — INT
- 할인된 상품 총액 (actual_price) — INT
- 주문 요금 (delivery_fee) — INT
- 사용자 아이디 (member_id) — BIGINT — NOT NULL
product
- PK (id) — BIGINT — Primary key — NOT NULL
- 상품명 (product_name) — VARCHAR
- 가격 (price) — INT
- 상품 이미지 주소 (image_url) — VARCHAR