노인과 바다

쇼핑몰 ERD

테이블 (7)

Cart (장바구니 상품)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Name (cartedName) — String — NOT NULL
  • Price (price) — Long — NOT NULL
  • Quantity (item_Quantity) — Long — NOT NULL
  • OptionId (Product (Option) — Long — 외래 키 → Option.PK — NOT NULL
  • UserId (user) — Long — 외래 키 → User.PK — NOT NULL

ImgFile (사진(첨부파일))

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Name (imgName) — String — NOT NULL
  • Size (imgSize) — Long
  • Type (imgType) — String
  • UUID (uuid) — String — NOT NULL
  • Path (filePath) — String
  • ProductId (product) — Long — 외래 키 → Product.PK
  • UserId (user) — Long — 외래 키 → User.PK

Option (옵션)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Name (optionName) — String — NOT NULL
  • Price (price) — Long — NOT NULL
  • Quantity (quantity) — Long
  • Product (product) — Long — 외래 키 → Product.PK — NOT NULL

Order (주문내역)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Name (orderName) — String — NOT NULL
  • Payed (is_payed) — boolean
  • UserId (user) — Long — 외래 키 → User.PK — NOT NULL

OrderItem (결제된 상품)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Payed_Product (option) — Long — 외래 키 → Option.PK — NOT NULL
  • OrderId (order) — Long — 외래 키 → Order.PK — NOT NULL
  • Quantity (quantity) — Long — NOT NULL
  • Price (price) — Long — NOT NULL

Product (상품)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Name (productName) — String — NOT NULL
  • Description (description) — String
  • Price (price) — Long — NOT NULL
  • User (user) — Long — 외래 키 → User.PK

User (사용자)

  • PK (Id) — Long — 기본 키 — NOT NULL
  • Email (email) — String — NOT NULL
  • PassWord (pass) — String — NOT NULL
  • JwtToken (token) — String
  • UserName (name) — String — NOT NULL
  • UserRoles (roles) — List