WEDU ERD

Tables (11)

categories

  • category_id — BIGINT — Primary key — NOT NULL
  • category_name — VARCHAR(50) — NOT NULL

product_images

  • image_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • image_url — VARCHAR(255) — NOT NULL
  • image_order — INT

product_options

  • option_id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • option_name — VARCHAR(100) — NOT NULL
  • additional_price — INT

products

  • product_id — BIGINT — Primary key — NOT NULL
  • vendor_id — BIGINT — Foreign key → vendors.vendor_id — NOT NULL
  • category_id — BIGINT — Foreign key → categories.category_id — NOT NULL
  • product_name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • price — INT — NOT NULL
  • is_active — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

recommendations

  • recommendation_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • result_id — BIGINT — Foreign key → test_results.result_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • reason — TEXT
  • created_at — DATETIME

reservations

  • reservation_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • reservation_datetime — DATETIME — NOT NULL
  • status — VARCHAR(20)
  • request_message — TEXT
  • created_at — DATETIME

reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • rating — DECIMAL(2,1) — NOT NULL
  • content — TEXT
  • created_at — DATETIME

test_results

  • result_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • mbti — VARCHAR(10)
  • proposal_style — VARCHAR(50)
  • budget_range — VARCHAR(50)
  • preferred_location — VARCHAR(100)
  • created_at — DATETIME

users

  • user_id — BIGINT — Primary key — NOT NULL
  • provider — VARCHAR(20) — NOT NULL
  • provider_id — VARCHAR(255) — NOT NULL
  • email — VARCHAR(100)
  • nickname — VARCHAR(30) — NOT NULL
  • profile_image — VARCHAR(255)
  • created_at — DATETIME
  • updated_at — DATETIME

vendors

  • vendor_id — BIGINT — Primary key — NOT NULL
  • vendor_name — VARCHAR(100) — NOT NULL
  • phone — VARCHAR(30)
  • address — VARCHAR(255)
  • description — TEXT
  • thumbnail_url — VARCHAR(255)
  • created_at — DATETIME
  • updated_at — DATETIME

wishlists

  • wishlist_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → products.product_id — NOT NULL
  • created_at — DATETIME