PayPalborad

Tables (5)

cart (장바구니)

  • Key — Primary key — NOT NULL

order (주문)

  • order_id (주문_아이디) — Bigint — Primary key — NOT NULL
  • customer_id (구매자_아이디) — bigint — Foreign key → user.User_id — NOT NULL
  • order_date (주문_날짜) — Datetime — NOT NULL
  • status (상태) — NOT NULL

order_item (주문상세)

  • order_item_id (주문_상세_아이디) — Primary key — NOT NULL
  • order_id (주문_아이디) — Bigint — Foreign key → order.order_id — NOT NULL
  • product_id (상품_아이디) — BIGINT — Foreign key → product.product_id — NOT NULL
  • quantity (개수) — INT — NOT NULL
  • unit_price (가격) — DECIMAL(10,2) — NOT NULL
  • Field

product (상품)

  • product_id (상품_아이디) — BIGINT — Primary key — NOT NULL
  • Seller_id (판매자_아이디) — bigint — Foreign key → user.User_id — NOT NULL
  • Name (상품이름) — varchar(100) — NOT NULL
  • price (가격) — BIGINT — NOT NULL
  • stock (개수) — int — NOT NULL
  • description (설명) — text(10000)

user (회원)

  • User_id (아이디) — bigint — Primary key — NOT NULL
  • Name (이름) — varchar(50) — NOT NULL
  • email (이메일) — varchar(255) — NOT NULL
  • age (나이) — int — NOT NULL
  • gender (성별) — byte — NOT NULL
  • password (비밀번호) — varchar(50) — NOT NULL
  • Role (구분) — ENUM('Seller','customer') — NOT NULL