shop

Tables (4)

member

  • 사용자ID (member_id) — auto_increment — Primary key — NOT NULL
  • 역할 (role) — not null

order_details (order_detailed)

  • detail_id — auto_increment — Primary key — NOT NULL
  • 주문id (order_id) — not null — Foreign key → orders.주문id — NOT NULL
  • 상품id (product_id) — not null — Foreign key → product.상품id — NOT NULL
  • 상품수량 (product_quantity) — not null

orders

  • 주문id (order_id) — auto_increment — Primary key — NOT NULL
  • 사용자ID (member_id) — not null — Foreign key → member.사용자ID — NOT NULL

product

  • 상품id (product_id) — auto_increment — Primary key — NOT NULL
  • 판매자id (seller_id) — role='seller' — Foreign key → member.사용자ID — NOT NULL
  • 재고 (stock)