board

Tables (4)

ordernum (주문테이블)

  • id (주문id) — BIGINT — Primary key — NOT NULL
  • customer_id (회원id) — BIGINT — Foreign key → user.id — NOT NULL — auto_increment

product (상품테이블)

  • id (상품id) — BIGINT — Primary key — NOT NULL
  • seller_id (회원id) — BIGINT — Foreign key → user.id — NOT NULL — auto_increment
  • p_count (상품재고) — BIGINT — NOT NULL
  • name (상품이름) — VARCHAR(255) — NOT NULL
  • price (상품가격) — NOT NULL

spec_order (주문상세테이블)

  • id (주문상세id) — BIGINT — Primary key — NOT NULL
  • order_id (주문id) — BIGINT — Foreign key → ordernum.id — NOT NULL
  • product_id (상품id) — BIGINT — Foreign key → product.id — NOT NULL
  • product_count (상품개수) — BIGINT — NOT NULL
  • price_ordered (주문가격) — BIGINT — NOT NULL

user (회원테이블)

  • id (회원id) — BIGINT — Primary key — NOT NULL — auto_increment
  • role (회원분류) — enum(customer, seller)
  • name (회원이름) — VARCHAR(255)