shopping-mall

Tables (6)

Cart (cart)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • quantity (장바구니 담은 개수) — int
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN
  • member_id (FK2) — BIGINT — Foreign key → Member.id — NOT NULL
  • option_id (FK1) — BIGINT — Foreign key → Option.id — NOT NULL

Member (member)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • email (이메일) — VARCHAR(64)
  • password (비밀번호) — VARCHAR(512)
  • name (이름) — VARCHAR(16)
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN

Option (option)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • name (옵션 이름) — VARCHAR(128)
  • stock_quantity (옵션 개수) — int
  • price (옵션 가격) — int
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN
  • product_id (FK) — BIGINT — Foreign key → Product.id — NOT NULL

Order (order)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN
  • member_id (FK) — BIGINT — Foreign key → Member.id — NOT NULL

OrderItem (order_item)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • quantity (구매 개수) — int
  • price (상품 가격) — int
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN
  • order_id (FK1) — BIGINT — Foreign key → Order.id — NOT NULL
  • option_id (FK2) — BIGINT — Foreign key → Option.id — NOT NULL

Product (product)

  • id (PK) — BIGINT — Primary key — NOT NULL
  • name (상품 이름) — VARCHAR(128)
  • created_at (생성 일시) — DATETIME
  • updated_at (수정 일시) — DATETIME
  • status (데이터 상태) — BOOLEAN