주문 서비스
테이블 (7)
결제 (payment)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 결제 키 (payment_key) — varchar(200)
- 결제 금액 (amount) — bigint
- 상태 (status) — varchar(20)
- 결제 방법 (method) — varchar(20)
- 결제 시각 (approved_at) — datetime
- 주문 아이디 (order_id) — Bigint — 외래 키 → 주문.아이디 — NOT NULL
사가 인스턴스 (order_saga_instance)
- 아이디 (id) — bigint — 기본 키 — NOT NULL
- 주문 번호 (order_no) — varchar(50)
- 상태 (saga_status) — varchar(20)
- 사가 단계 (saga_step) — varchar(50)
- 페이로드 (payload) — json
- 실패 이유 (failure_reason) — text
- 시작 시간 (started_at) — datetime
- 종료 시간 (finished_at) — datetime
장바구니 (cart)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — Bigint
- 생성일 (created_at) — datetime
- 수정일 (updated_at) — datetime
장바구니 상품 (cart_item)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 상품 변형 아이디 (product_variant_id) — Bigint
- 수량 (quantity) — Int
- 생성일 (created_at) — datetime
- 수정일 (updated_at) — datetime
- 장바구니 아이디 (cart_id) — Bigint — 외래 키 → 장바구니.아이디 — NOT NULL
주문 (orders)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 주문 번호 (order_no) — varchar(50)
- 주문 이름 (order_name) — varchar(30)
- 상태 (status) — varchar(30)
- 실패 코드 (failure_code) — varchar(50)
- 주문자 아이디 (user_id) — Bigint
- 주문자 이름 (user_name) — varchar(50)
- 주문자 전화번호 (phone_number) — varchar(20)
- 총 원본 주문 금액 (total_origin_price) — Bigint
- 총 상품 할인 금액 (total_product_discount) — bigint
- 포인트 할인 금액 (point_discount) — bigint
- 최종 결제 금액 (final_payment_amount) — bigint
- 배송지 (delivery_address) — varchar(255)
- 생성일 (created_at) — datetime
- 수정일 (updated_at) — datetime
주문 상품 (order_item)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 상품 아이디 (product_id) — Bigint
- 상품 변형 아이디 (product_variant_id) — Bigint
- SKU (sku) — varchar(64)
- 상품 이름 (product_name) — varchar(200)
- 상품 대표 이미지 (thumbnail) — varchar(512)
- 상품 원본 가격 (origin_price) — Bigint
- 상품 할인율 (discount_rate) — int
- 상품 할인 금액 (discount_amount) — bigint
- 상품 판매 금액 (discounted_price) — bigint
- 수량 (quantity) — int
- 라인 금액 (line_total) — bigint
- 생성일 (created_at) — datetime
- 수정일 (updated_at) — datetime
- 주문 아이디 (order_id) — Bigint — 외래 키 → 주문.아이디 — NOT NULL
주문 상품 옵션 (order_item_option)
- 아이디 (id) — Bigint — 기본 키 — NOT NULL
- 옵션 타입 이름 (option_type_name) — varchar(50)
- 옵션 값 이름 (option_value_name) — varchar(50)
- 주문 상품 아이디 (order_item_id) — Bigint — 외래 키 → 주문 상품.아이디 — NOT NULL