commerce

Tables (11)

cart (장바구니)

  • 장바구니ID (id) — Integer — Primary key — NOT NULL
  • 회원ID (userId) — Integer — Foreign key → user.회원ID — NOT NULL
  • 상품ID (productId) — Integer — Foreign key → product.상품ID — NOT NULL
  • 생성날짜 (createdAt) — Date

category (카테고리)

  • 카테고리ID (id) — Integer — Primary key — NOT NULL
  • 카테고리이름 (categoryName) — String

coupon (쿠폰)

  • 쿠폰ID (id) — Integer — Primary key — NOT NULL
  • 회원ID (userId) — Integer — Foreign key → user.회원ID — NOT NULL
  • 쿠폰번호 (couponKey) — String
  • 만료기한 (expiredAt) — Date
  • 사용여부 (useYn) — Y | N
  • 생성날짜 (createdAt) — Date

order (주문)

  • 주문번호 (id) — String — Primary key — NOT NULL
  • 회원ID (userId) — Integer — Foreign key → user.회원ID — NOT NULL
  • 주문상태 (status) — NEED_MONEY, READY, DELIVERY, DONE, CANCEL
  • 생성날짜 (createdAt) — Date

order_detail (주문상세)

  • 주문상세ID (id) — Integer — Primary key — NOT NULL
  • 주문번호 (orderId) — String — Foreign key → order.주문번호 — NOT NULL
  • 상품id (productId) — Integer — Foreign key → product.상품ID — NOT NULL

pay_history (결제내역)

  • 결제내역ID (id) — Integer — Primary key — NOT NULL
  • 주문번호 (orderId) — String — Foreign key → order.주문번호 — NOT NULL
  • 결제수단 (payMethod) — String
  • 결제금액 (payAmount) — Integer
  • 생성날짜 (createdAt) — Date

product (상품)

  • 상품ID (id) — Integer — Primary key — NOT NULL
  • 카테고리ID (categoryId) — Integer — Foreign key → category.카테고리ID — NOT NULL
  • 판매자ID (sellerId) — Integer — Foreign key → user.회원ID — NOT NULL
  • 상품이름 (name) — String
  • 상품가격 (price) — Integer
  • 상품개수 (quantity) — Integer
  • 상품설명 (desc) — String
  • 할인구분 (discountType) — COST/PERCENT — NOT NULL
  • 할인 율/원 (discountValue) — Integer
  • 생성날짜 (createdAt) — Date
  • 수정날짜 (updatedAt) — Date
  • 삭제여부 (isDelete) — boolean

product_image (상품_이미지)

  • 상품이미지ID (id) — Integer — Primary key — NOT NULL
  • 상품ID (productId) — Integer — Foreign key → product.상품ID — NOT NULL
  • 이미지URL (imgUrl) — String

product_keep (상품찜)

  • 상품찜ID (id) — Integer — Primary key — NOT NULL
  • 회원ID (userId) — Integer — Foreign key → user.회원ID — NOT NULL
  • 상품id (productId) — Integer — Foreign key → product.상품ID — NOT NULL

refund_history (환불내역)

  • 환불내역ID (id) — Integer — Primary key — NOT NULL
  • 결제내역ID (payHistoryId) — Integer — Foreign key → pay_history.결제내역ID — NOT NULL
  • 생성날짜 (createdAt) — Date

user (회원)

  • 회원ID (id) — uuid — Primary key — NOT NULL
  • 회원이메일 (email) — varchar
  • 판매자여부 (isSeller) — bool
  • 회원닉네임 (nickname) — varchar
  • 비밀번호 (password) — varchar
  • 생성날짜 (createdAt) — Date
  • 수정날짜 (updatedAt) — Date
  • 삭제날짜 (deletedAt) — Date