hwanshopping
테이블 (11)
idempotency_key
- idempotency_key — VARCHAR(64) — 기본 키 — NOT NULL
- member_id — BIGINT — 외래 키 → 회원.member_id — NOT NULL
- order_id — BIGINT — 외래 키 → 주문.order_id
- status — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
멤버쿠폰 (member_coupon)
- member_coupon_id — BIGINT
- member_id — BIGINT — 외래 키 → 회원.member_id — NOT NULL
- coupon_id — BIGINT — 외래 키 → 쿠폰.coupon_id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- issued_at — DATETIME — NOT NULL
- used_at — DATETIME
상품 (product)
- product_id — BIGINT
- name — VARCHAR(200) — NOT NULL
- description — TEXT — NOT NULL
- price — INT — NOT NULL
- sale_status — VARCHAR(20) — NOT NULL
- thumbnail_image_id — BIGINT — 외래 키 → 상품이미지.product_image_id
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
상품이미지 (product_image)
- product_image_id — BIGINT
- product_id — BIGINT — 외래 키 → 상품.product_id — NOT NULL
- image_url — VARCHAR(1000) — NOT NULL
- sort_order — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
장바구니 (cart)
- cart_id — BIGINT
- member_id — BIGINT — 외래 키 → 회원.member_id — NOT NULL
- product_id — BIGINT — 외래 키 → 상품.product_id — NOT NULL
- quantity — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
재고 (stock)
- product_id — BIGINT — 외래 키 → 상품.product_id
- quantity — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
주문 (orders)
- order_id — BIGINT
- member_id — BIGINT — 외래 키 → 회원.member_id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- total_price — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
주문상품 (order_item)
- order_item_id — BIGINT
- order_id — BIGINT — 외래 키 → 주문.order_id — NOT NULL
- product_id — BIGINT — 외래 키 → 상품.product_id — NOT NULL
- quantity — INT — NOT NULL
- unit_price — INT — NOT NULL
찜 (wishlist)
- wishlist_id — BIGINT
- member_id — BIGINT — 외래 키 → 회원.member_id — NOT NULL
- product_id — BIGINT — 외래 키 → 상품.product_id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
쿠폰 (coupon)
- coupon_id — BIGINT
- name — VARCHAR(200) — NOT NULL
- discount_type — VARCHAR(20) — NOT NULL
- discount_value — INT — NOT NULL
- max_discount_amount — INT
- max_issued_count — INT — NOT NULL
- issued_count — INT — NOT NULL
- valid_from — DATETIME — NOT NULL
- valid_to — DATETIME — NOT NULL
- created_at — TIMESTAMP — NOT NULL
회원 (member)
- member_id — BIGINT
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- role — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL