bookstore

Tables (8)

book (도서)

  • id — INT — Primary key — NOT NULL
  • sub_category_id (서브 카테고리 id) — INT — Foreign key → sub_category.id — NOT NULL
  • title (제목) — VARCHAR(50)
  • image_url (이미지 url) — VARCHAR(255)
  • publisher (출판사) — VARCHAR(50)
  • publication_date (출간일) — DATE
  • authors (작가 list) — JSON
  • price (정가) — INT
  • discount_price (할인가) — INT
  • created_at — DATETiME
  • updated_at — DATETiME

cart_item (장바구니 아이템)

  • id — INT — Primary key — NOT NULL
  • book_id (도서 id) — INT — Foreign key → book.id — NOT NULL
  • user_id (회원 id) — INT — Foreign key → user.id — NOT NULL
  • quantity (수량) — INT
  • created_at — DATETiME
  • updated_at — DATETiME

category (카테고리)

  • id — INT — Primary key — NOT NULL
  • name (이름) — VARCHAR(50)
  • created_at — DATETiME
  • updated_at — DATETiME

order_detail (주문 상세 내역)

  • id — INT — Primary key — NOT NULL
  • book_id (도서 id) — INT — Foreign key → book.id — NOT NULL
  • order_info_id (주문 내역 id) — INT — Foreign key → order_info.id — NOT NULL
  • quantity (수량) — INT
  • price (금액) — INT
  • created_at — DATETiME
  • updated_at — DATETiME

order_info (주문 내역)

  • id — VARCHAR(255) — Primary key — NOT NULL
  • user_id (회원 id) — INT — Foreign key → user.id — NOT NULL
  • store_id (매장 id) — INT — Foreign key → store.id — NOT NULL
  • total_price (총 금액) — INT
  • isNowdream (나우드림 여부) — BOOLEAN
  • order_date (주문 일자) — DATETiME
  • updated_at — DATETiME

store (매장)

  • id — INT — Primary key — NOT NULL
  • created_at — DATETiME
  • updated_at — DATETiME
  • name (이름) — VARCHAR(50)
  • address (주소) — VARCHAR(50)

sub_category (서브 카테고리)

  • id — INT — Primary key — NOT NULL
  • category_id (카테고리 id) — INT — Foreign key → category.id — NOT NULL
  • name (이름) — VARCHAR(50)
  • created_at — DATETiME
  • updated_at — DATETiME

user (회원)

  • id — INT — Primary key — NOT NULL
  • created_at — DATETiME
  • updated_at — DATETiME
  • name (이름) — VARCHAR(50)
  • email (이메일) — VARCHAR(50)
  • password (비밀번호) — VARCHAR(255)
  • phone (전화번호) — VARCHAR(50)
  • address (주소) — VARCHAR(50)
  • role (권한) — VARCHAR(50)