test

Tables (6)

delivery

  • delivery_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
  • delivery_status — VARCHAR(20) — NOT NULL
  • tracking_no — VARCHAR(50)
  • ship_addr — VARCHAR(255) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member

  • member_id — BIGINT — Primary key — NOT NULL
  • login_id — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • member_name — VARCHAR(50) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • addr — VARCHAR(255)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_item

  • order_item_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
  • product_id — BIGINT — Foreign key → product.product_id — NOT NULL
  • product_name — VARCHAR(100) — NOT NULL
  • order_price — INT — NOT NULL
  • order_quantity — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

orders

  • order_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • ordered_at — DATETIME — NOT NULL
  • order_status — VARCHAR(20) — NOT NULL
  • total_amount — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • INDEX — idx_order_status_ordered_at

pay

  • pay_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
  • pay_method — VARCHAR(50) — NOT NULL
  • pay_amount — INT — NOT NULL
  • pay_status — VARCHAR(20) — NOT NULL
  • paid_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

product

  • product_id — BIGINT — Primary key — NOT NULL
  • product_name — VARCHAR(100) — NOT NULL
  • product_price — INT — NOT NULL
  • stock_quantity — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • INDEX — idx_product_name