erd_0417

Tables (6)

cart (장바구니)

  • cart_id (장바구니ID) — NOT NULL — Primary key — NOT NULL
  • user_id (유저ID) — NOT NULL — Foreign key → user.user_id — NOT NULL
  • quantity (수량) — NOT NULL
  • created_at (생성날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL

order (주문)

  • order_id (주문ID) — NOT NULL — Primary key — NOT NULL
  • user_id (유저ID) — NOT NULL — Foreign key → user.user_id — NOT NULL
  • order_date (주문날짜) — NOT NULL — NOT NULL
  • status (배송상태) — NOT NULL — NOT NULL
  • created_at (생성날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL

order_detail (주문 상세)

  • product_id (상품ID) — NOT NULL — Foreign key → product.product_id — NOT NULL
  • order_id (주문ID) — NOT NULL — Foreign key → order.order_id — NOT NULL
  • quantity (주문수량) — NOT NULL — NOT NULL
  • created_at (생성날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL

product (상품)

  • product_id (상품ID) — NOT NULL — Primary key — NOT NULL
  • wishlist_id (찜 목록ID) — NOT NULL — Foreign key → wishlist.wishlist_id — NOT NULL
  • cart_id (장바구니ID) — NOT NULL — Foreign key → cart.cart_id — NOT NULL
  • name (상품이름) — NOT NULL — NOT NULL
  • price (가격) — NOT NULL — NOT NULL
  • description (상품설명) — NOT NULL — NOT NULL
  • stock (재고) — NOT NULL — NOT NULL
  • created_at (생성날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL

user (회원)

  • user_id (유저ID) — NOT NULL — Primary key — NOT NULL
  • email (이메일) — NOT NULL
  • password (비밀번호) — NOT NULL — NOT NULL
  • username (이름) — NOT NULL
  • address (주소) — NOT NULL — NOT NULL
  • phone_number (핸드폰 번호) — NOT NULL — NOT NULL
  • email_verified (메일 인증 여부) — NOT NULL
  • role (유저 권한) — NOT NULL
  • created_at (생성날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL

wishlist (찜 목록)

  • wishlist_id (찜 목록ID) — NOT NULL — Primary key — NOT NULL
  • user_id (유저ID) — NOT NULL — Foreign key → user.user_id — NOT NULL
  • created_at (생성 날짜) — NOT NULL — NOT NULL
  • updated_at (업데이트날짜) — NOT NULL — NOT NULL