orderSystem

Tables (7)

cart_items (Untitled2)

  • 장바구니ID (cart_id) — bigint — Primary key — NOT NULL
  • userID (user_id) — bigint — Foreign key → user.userID — NOT NULL
  • 상품ID (product_id) — bigint — Foreign key → product.상품ID — NOT NULL
  • 수량 (quantity) — bigint — NOT NULL
  • 생성 시각 (created_at) — datetime — NOT NULL

order (Untitled3)

  • 주문ID (id) — bigint — Primary key — NOT NULL
  • 사용자ID (user_id) — bigint — Foreign key → user.userID — NOT NULL
  • 전체 가격 (total_price) — bigint — NOT NULL
  • 주문일시 (order_date) — datetime — NOT NULL

order_items (Untitled7)

  • 주문상세ID (Key) — Primary key — NOT NULL
  • 주문ID (order_id) — bigint — Foreign key → order.주문ID — NOT NULL
  • 상품ID (product_id) — bigint — Foreign key → product.상품ID — NOT NULL
  • 주문수량 (quantity) — int — NOT NULL
  • 주문 가격 (price) — bigint — NOT NULL

payments (Untitled6)

  • 결제ID (id) — bigint — Primary key — NOT NULL
  • 주문상세ID (order_item_id) — Foreign key → order_items.주문상세ID — NOT NULL
  • amount — bigint — NOT NULL
  • 결제상태 (status) — enum('paid', 'pending', 'refunded') — NOT NULL
  • 결제일시 (paid_at) — datetime — NOT NULL

product (Untitled4)

  • 상품ID (id) — bigint — Primary key — NOT NULL
  • 상품이름 (name) — varchar(255) — NOT NULL
  • 가격 (price) — bigint — NOT NULL
  • 수량 (quantity) — bigint — NOT NULL

regi (Untitled5)

  • 상품등록ID (id) — bigint — Primary key — NOT NULL
  • userID (user_id) — bigint — Foreign key → user.userID — NOT NULL
  • 상품ID (product_id) — bigint — Foreign key → product.상품ID — NOT NULL
  • 등록수량 (quantity) — bigint — NOT NULL
  • 개당가격 (price) — bigint — NOT NULL
  • 등록일시 (regi_date) — datetime — NOT NULL

user (Untitled)

  • userID (id) — bigint — Primary key — NOT NULL
  • 이름 (name) — varchar(50) — NOT NULL
  • 이메일 (email) — varchar(255) — NOT NULL
  • 구분 (role) — ENUM('user', 'seller') — NOT NULL