결제
테이블 (8)
claim_items
- id — BIGSERIAL
- claim_id — BIGINT — 외래 키 → claims.id — NOT NULL
- order_item_id — BIGINT — 외래 키 → order_items.id — NOT NULL
- quantity — INT — NOT NULL
- status — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
claims
- id — BIGSERIAL
- order_id — BIGINT — 외래 키 → orders.id — NOT NULL
- claim_type — TEXT — NOT NULL
- status — TEXT — NOT NULL
- reason — TEXT
- extra_shipping_fee — BIGINT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- completed_at — TIMESTAMPTZ
order_items
- id — BIGSERIAL
- order_id — BIGINT — 외래 키 → orders.id — NOT NULL
- product_id — BIGINT — NOT NULL
- product_name — TEXT — NOT NULL
- unit_price — BIGINT — NOT NULL
- quantity — INT — NOT NULL
- item_status — TEXT — NOT NULL
- claim_status — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
orders
- id — BIGSERIAL
- user_id — BIGINT — NOT NULL
- status — TEXT — NOT NULL
- total_amount — BIGINT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
outbox_events
- id — BIGSERIAL
- aggregate_type — TEXT — NOT NULL
- aggregate_id — BIGINT — NOT NULL
- event_type — TEXT — NOT NULL
- payload — JSONB — NOT NULL
- status — TEXT — NOT NULL
- retry_count — INT — NOT NULL
- last_error — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- sent_at — TIMESTAMPTZ
payment_transactions
- id — BIGSERIAL
- payment_id — BIGINT — 외래 키 → payments.id — NOT NULL
- tx_type — TEXT — NOT NULL
- pg_transaction_id — TEXT
- amount — BIGINT — NOT NULL
- status — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- claim_id (Field)
payments
- id — BIGSERIAL
- order_id — BIGINT — 외래 키 → orders.id — NOT NULL
- status — TEXT — NOT NULL
- paid_amount — BIGINT — NOT NULL
- refunded_amount — BIGINT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
shipments
- id — BIGSERIAL
- order_item_id — BIGINT — 외래 키 → order_items.id
- shipment_type — TEXT — NOT NULL
- status — TEXT — NOT NULL
- courier — TEXT
- tracking_number — TEXT
- receiver_name — TEXT — NOT NULL
- receiver_phone — TEXT — NOT NULL
- address_line1 — TEXT — NOT NULL
- address_line2 — TEXT
- zip_code — TEXT — NOT NULL
- shipping_fee — BIGINT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- claim_id (Field)