weltansicht

Tables (10)

Collection (컬렉션)

  • collection_id (컬렉션 id) — Primary key — NOT NULL
  • name (컬렉션 이름) — NOT NULL
  • introduction (소개) — NOT NULL
  • background_image_url (배경 이미지) — NOT NULL

Order_items (주문한 상품)

  • order_item_id (주문한 상품 id) — Primary key — NOT NULL
  • price (가격) — NOT NULL
  • quantity (수량) — NOT NULL
  • size (사이즈) — NOT NULL — M, L
  • order_id (주문 id) — Foreign key → orders.order_id — NOT NULL
  • product_id (상품 id) — Foreign key → Product.product_id — NOT NULL
  • discount_rate (상품 할인율) — NOT NULL
  • sales_status (주문 방식) — NOT NULL

Product (상품)

  • product_id (상품 id) — Primary key — NOT NULL
  • collection (컬렉션 id) — Foreign key → Collection.collection_id — NOT NULL
  • name (상품명) — NOT NULL
  • price (가격) — NOT NULL
  • discount_rate (할인률) — NOT NULL — 안한다면 0%
  • size (사이즈) — NOT NULL — M, L
  • inventory (재고) — NOT NULL
  • representative_image_url (대표 이미지) — NOT NULL
  • color (색상) — NOT NULL
  • sales_staus (주문 방식) — NOT NULL — EARLY_ACCESS, PRE_ORDER, STANDARD
  • max_order_quantity (최대 주문 수량) — NOT NULL

Product_image (상품 이미지)

  • product_image_id (상품 이미지 id) — Primary key — NOT NULL
  • image_url (이미지 url) — UNIQUE — NOT NULL
  • product_id (상품 id) — Foreign key → Product.product_id — NOT NULL
  • sort_order_num (사진 순서) — NOT NULL — 정렬하기 위한 컬럼, 0이면 메인 사진

User (유저)

  • user_id (유저 id) — Primary key — NOT NULL
  • name (이름) — NOT NULL
  • email (개인 메일) — NOT NULL
  • password (비밀번호) — NOT NULL
  • phone_number (전화번호) — NOT NULL
  • created_at (가입한 날짜) — NOT NULL
  • last_login_at (마지막 로그인 날짜) — NOT NULL
  • role (권한) — NOT NULL — USER, ADMIN
  • deleted_at (탈퇴한 날짜) — NOT NULL — 탈퇴 후 다시 회원가입할 시
  • last_login_ip (마지막 로그인한 ip)

order_address (유저 배송지 정보)

  • order_address_id (배송지 정보 id) — Primary key — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL
  • address (도로명 주소) — NOT NULL
  • address_detail (상세 주소) — NOT NULL
  • alias (별칭) — NOT NULL
  • zip_code (우편번호) — NOT NULL

order_cart (장바구니)

  • shop_cart_id (장바구니 id) — Primary key — NOT NULL
  • product_id (상품 id) — Foreign key → Product.product_id — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL
  • quantity (수량) — NOT NULL
  • size (사이즈) — NOT NULL — M, L

orders (주문)

  • order_id (주문 id) — Primary key — NOT NULL
  • order_address_id (배송지 정보 id) — Foreign key → order_address.order_address_id — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL
  • order_number (주문 번호) — UNIQUE — NOT NULL — ORD + 타임스탬프 + 랜덤값
  • status (현재 처리 상태) — NOT NULL — PAID, PREPARING, SHIPPING, COMPLETED, CANCELLED, REFUNDED
  • paid_at (주문 시각) — UNIQUE — NOT NULL — 타임스토프!
  • payment_amount (최종 결제 금액) — NOT NULL
  • discount_amount (총 할인 금액) — NOT NULL
  • invoice_number (송장 번호) — NOT NULL
  • delivery_request (요청 사항) — NOT NULL

terms (약관 관리)

  • terms_id (약관 id) — Primary key — NOT NULL
  • type (약관 종류) — NOT NULL — 'SERVICE', 'PRIVACY', 'MARKETING', 'THIRD_PARTY' 등
  • title (제목) — NOT NULL
  • version (약관 버전) — NOT NULL
  • content (약관 내용) — NOT NULL
  • is_required (필수 동의 여부) — NOT NULL
  • effective_date (버전이 적용되는 날짜) — NOT NULL
  • created_at (약관이 생성된 날짜) — NOT NULL
  • is_recent (최신여부) — NOT NULL

user_term_agreements (약관 동의 이력)

  • user_term_agreement_id (약관 동의 이력 Id) — Primary key — NOT NULL
  • isAgreed (동의 여부) — NOT NULL
  • agreed_at (동의한 시간) — NOT NULL
  • ip_address (증빙용 IP) — NOT NULL
  • user_agent (증빙용 사용자 에이전트) — NOT NULL
  • terms (약관 id) — Foreign key → terms.terms_id — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL