product-erd

Tables (6)

BaseProduct (베이스상품)

  • baseproduct_id (상품ID) — PRIMARY KEY — Primary key — NOT NULL
  • baseproduct_type (베이스제품종류) — NOT NULL , 머그컵,쿠션
  • price (가격)

BaseProductOptional (베이스상품옵션)

  • base_product_optional_id (베이스제품옵션ID) — PRIMARY KEY — Primary key — NOT NULL
  • size (사이즈) — NOT NULL
  • color (색상) — NOT NULL
  • material (재질) — NOT NULL, 유리 ,나무
  • base_product_id (상품ID) — PRIMARY KEY — Foreign key → BaseProduct.baseproduct_id — NOT NULL

Image (상품이미지)

  • image_id (이미지ID) — NOT NULL — Primary key — NOT NULL
  • url (그림url) — NOT NULL
  • name (그림이름) — NOT NULL
  • created_at (등록일) — NOT NULL
  • status (현재상태) — NOT NULL
  • product_id (상품ID) — NOT NULL — Foreign key → Prodoct.product_id — NOT NULL

Prodoct (제품)

  • product_id (상품ID) — NOT NULL — Primary key — NOT NULL
  • name (제품명) — NOT NULL
  • description (제품설명)
  • status (제품상태) — NOT NULL
  • created_at (등록일) — NOT NULL
  • user_id (유저ID2) — PRIMARY KEY — Foreign key → User.user_id — NOT NULL
  • base_product_optional_id (베이스제품옵션ID) — PRIMARY KEY — Foreign key → BaseProductOptional.base_product_optional_id — NOT NULL

Review (리뷰)

  • review_id (리뷰ID) — PRIMARY KEY — Primary key — NOT NULL — 비지니스적
  • status (과거상태) — NOT NULL
  • reason (사유) — NOT NULL
  • created_at (등록일) — NOT NULL
  • image_id (이미지ID) — NOT NULL — Foreign key → Image.image_id — NOT NULL

User (유저)

  • user_id (유저ID) — PRIMARY KEY — Primary key — NOT NULL
  • user_name (유저이름) — NOT NULL
  • login_id (로그인ID) — UNIQUE , NOT NULL
  • password (비밀번호) — NOT NULL
  • created_at (생성일) — NOT NULL