IM-V2

Tables (15)

categories

  • id — BIGINT — Primary key — NOT NULL
  • parent_id — BIGINT — Foreign key → categories.id
  • category_code — VARCHAR(100)
  • category_name — VARCHAR(100) — NOT NULL
  • depth — INT — NOT NULL
  • sort_order — INT — NOT NULL
  • category_status — VARCHAR(30) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_addresses

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • recipient_name — VARCHAR(100) — NOT NULL
  • phone_number — VARCHAR(30) — NOT NULL
  • postal_code — VARCHAR(20) — NOT NULL
  • address_line1 — VARCHAR(255) — NOT NULL
  • address_line2 — VARCHAR(255)
  • is_default — BOOLEAN — NOT NULL
  • address_status — VARCHAR(30) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_consents

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • consent_type — VARCHAR(50) — NOT NULL
  • is_agreed — BOOLEAN — NOT NULL
  • agreed_at — DATETIME
  • withdrawn_at — DATETIME
  • consent_version — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

members

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(255)
  • name — VARCHAR(100) — NOT NULL
  • birth_year — SMALLINT
  • gender — VARCHAR(20)
  • role — VARCHAR(30) — NOT NULL
  • member_status — VARCHAR(30) — NOT NULL
  • last_login_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

oauth_accounts

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • provider — VARCHAR(30) — NOT NULL
  • provider_user_id — VARCHAR(255) — NOT NULL
  • provider_email — VARCHAR(255)
  • connected_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_items

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • product_name_snapshot — VARCHAR(200) — NOT NULL
  • product_price_snapshot — INT — NOT NULL
  • quantity — INT — NOT NULL
  • item_amount — INT — NOT NULL
  • product_option_snapshot — VARCHAR(255)
  • order_item_status — VARCHAR(30) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_shipping_snapshots

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • recipient_name_snapshot — VARCHAR(100) — NOT NULL
  • phone_number_snapshot — VARCHAR(30) — NOT NULL
  • postal_code_snapshot — VARCHAR(20) — NOT NULL
  • address_line1_snapshot — VARCHAR(255) — NOT NULL
  • address_line2_snapshot — VARCHAR(255)
  • delivery_memo_snapshot — VARCHAR(255)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_status_histories

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • previous_status — VARCHAR(30)
  • new_status — VARCHAR(30) — NOT NULL
  • changed_reason — VARCHAR(255)
  • changed_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

orders

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • member_address_id — BIGINT — Foreign key → member_addresses.id
  • order_no — VARCHAR(100) — NOT NULL
  • order_status — VARCHAR(30) — NOT NULL
  • total_product_amount — INT — NOT NULL
  • delivery_fee — INT — NOT NULL
  • final_payment_amount — INT — NOT NULL
  • store_name_snapshot — VARCHAR(150) — NOT NULL
  • ordered_at — DATETIME — NOT NULL
  • paid_at — DATETIME
  • cancelled_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

payment_histories

  • id — BIGINT — Primary key — NOT NULL
  • payment_id — BIGINT — Foreign key → payments.id — NOT NULL
  • previous_status — VARCHAR(30)
  • new_status — VARCHAR(30) — NOT NULL
  • event_type — VARCHAR(50) — NOT NULL
  • event_message — VARCHAR(255)
  • changed_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

payments

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • payment_no — VARCHAR(100) — NOT NULL
  • payment_provider — VARCHAR(50) — NOT NULL
  • payment_method — VARCHAR(50) — NOT NULL
  • payment_status — VARCHAR(30) — NOT NULL
  • payment_amount — INT — NOT NULL
  • provider_payment_key — VARCHAR(255)
  • requested_at — DATETIME
  • approved_at — DATETIME
  • cancelled_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

product_images

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • sort_order — INT — NOT NULL
  • is_thumbnail — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

products

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • category_id — BIGINT — Foreign key → categories.id — NOT NULL
  • product_name — VARCHAR(200) — NOT NULL
  • description — TEXT
  • price — INT — NOT NULL
  • stock_quantity — INT — NOT NULL
  • product_status — VARCHAR(30) — NOT NULL
  • displayed_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

sellers

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • business_name — VARCHAR(150) — NOT NULL
  • business_registration_no — VARCHAR(50) — NOT NULL
  • representative_name — VARCHAR(100) — NOT NULL
  • seller_status — VARCHAR(30) — NOT NULL
  • approved_at — DATETIME
  • rejected_at — DATETIME
  • rejection_reason — VARCHAR(255)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

stores

  • id — BIGINT — Primary key — NOT NULL
  • seller_id — BIGINT — Foreign key → sellers.id — NOT NULL
  • store_name — VARCHAR(150) — NOT NULL
  • store_slug — VARCHAR(150) — NOT NULL
  • description — TEXT
  • store_status — VARCHAR(30) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL