ㅅㄷ

Tables (13)

cart_items

  • id — BIGINT
  • cart_id — BIGINT — Foreign key → carts.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • quantity — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

carts

  • id — BIGINT
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

categories

  • id — BIGINT
  • name — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

members

  • id — BIGINT
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • phone_number — VARCHAR(30) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

order_items

  • id — BIGINT
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • product_name_snapshot — VARCHAR(255) — NOT NULL
  • product_price_snapshot — INT — NOT NULL
  • quantity — INT — NOT NULL
  • refunded_quantity — INT — NOT NULL
  • total_price — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

orders

  • id — BIGINT
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • order_number — VARCHAR(100) — NOT NULL
  • total_amount — INT — NOT NULL
  • used_point_amount — INT — NOT NULL
  • pg_amount — INT — NOT NULL
  • earned_point_amount — INT — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • ordered_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

payment_events

  • id — BIGINT
  • payment_id — BIGINT — Foreign key → payments.id — NOT NULL
  • portone_payment_id — VARCHAR(255) — NOT NULL
  • event_type — VARCHAR(50) — NOT NULL
  • event_source — VARCHAR(30) — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • raw_payload — TEXT
  • received_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

payments

  • id — BIGINT
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • portone_payment_id — VARCHAR(255) — NOT NULL
  • pg_provider — VARCHAR(50)
  • pg_transaction_id — VARCHAR(255)
  • total_amount — INT — NOT NULL
  • used_point_amount — INT — NOT NULL
  • pg_amount — INT — NOT NULL
  • earned_point_amount — INT — NOT NULL
  • refunded_amount — INT — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • paid_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

point_transactions

  • id — BIGINT
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • point_wallet_id — BIGINT — Foreign key → point_wallets.id — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id
  • payment_id — BIGINT — Foreign key → payments.id
  • refund_id — BIGINT — Foreign key → refunds.id
  • type — VARCHAR(30) — NOT NULL
  • amount — INT — NOT NULL
  • balance_after — INT — NOT NULL
  • description — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

point_wallets

  • id — BIGINT
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • balance — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

products

  • id — BIGINT
  • category_id — BIGINT — Foreign key → categories.id — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • description — TEXT
  • price — INT — NOT NULL
  • stock_quantity — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

refund_items

  • id — BIGINT
  • refund_id — BIGINT — Foreign key → refunds.id — NOT NULL
  • order_item_id — BIGINT — Foreign key → order_items.id — NOT NULL
  • quantity — INT — NOT NULL
  • refund_amount — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL

refunds

  • id — BIGINT
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • payment_id — BIGINT — Foreign key → payments.id — NOT NULL
  • total_refund_amount — INT — NOT NULL
  • point_refund_amount — INT — NOT NULL
  • pg_refund_amount — INT — NOT NULL
  • point_earn_cancel_amount — INT — NOT NULL
  • reason — VARCHAR(255) — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • refunded_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • modified_at — DATETIME — NOT NULL