CatchShop

Tables (9)

Cart (장바구니)

  • cart_id (장바구니 번호) — INT — Primary key — NOT NULL
  • product_id (상품번호) — INT — Foreign key → Product.product_id — NOT NULL
  • cart_count (상품 수량) — INT — NOT NULL
  • user_id (로그인한 사용자 번호) — INT — NOT NULL

Order (주문)

  • order_id (주문번호) — INT — Primary key — NOT NULL
  • user_id (사용자 번호) — INT — Foreign key → user.user_id — NOT NULL
  • order_name (수령자 이름) — VARCHAR(20) — NOT NULL
  • order_tel (수령자 전화번호) — VARCHAR(15) — NOT NULL
  • order_addr (배송 주소(우편번호 포함)) — VARCHAR(50) — NOT NULL
  • order_status (주문 상태(준비 중/배송 완료)) — VARCHAR(10) — NOT NULL
  • order_date (주문 날짜) — TIMESTAMP — NOT NULL
  • total_price (최종 상품 금액) — INT — NOT NULL
  • shipping_fee (배송비) — INT — NOT NULL

OrderDetail (주문상세)

  • orderdetail_id (주문상세 번호) — INT — Primary key — NOT NULL
  • order_id (주문번호) — INT — Foreign key → Order.order_id — NOT NULL
  • product_id (상품번호) — INT — Foreign key → Product.product_id — NOT NULL
  • order_count (주문 수량) — INT — NOT NULL
  • order_price (주문 금액) — INT — NOT NULL

Product (상품)

  • product_id (상품번호) — INT — Primary key — NOT NULL
  • category_id (카테고리번호) — INT — Foreign key → category.category_id — NOT NULL
  • product_nm (상품이름) — VARCHAR(20) — NOT NULL
  • product_detail (상품 상세 정보) — TEXT
  • price (상품 가격) — INT — NOT NULL
  • stock (상품 수량) — INT — NOT NULL
  • product_reg (상품 등록 날짜) — TIMESTAMP — NOT NULL
  • product_img (상품 이미지) — VARCHAR(40)

category (카테고리)

  • category_id (카테고리번호) — INT — Primary key — NOT NULL
  • category_nm (카테고리명) — varchar(20) — NOT NULL

comment (댓글)

  • comment_id (댓글번호) — INT — Primary key — NOT NULL
  • qna_id (qna번호) — INT — Foreign key → qna.qna_id — NOT NULL
  • user_id (작성자 번호) — INT — Foreign key → user.user_id — NOT NULL
  • comment_contents (댓글 내용) — VARCHAR(300) — NOT NULL

qna (QnA)

  • qna_id (qna번호) — INT — Primary key — NOT NULL
  • user_id (사용자 번호) — INT — Foreign key → user.user_id — NOT NULL
  • qna_title (제목) — VARCHAR(10) — NOT NULL
  • qna_contents (내용) — VARCHAR(200)
  • qna_img (첨부이미지) — VARCHAR(500)
  • qna_secret (비밀글 여부) — VARCHAR(2) — NOT NULL
  • qna_pw (비밀글 암호) — VARCHAR(6)
  • qna_date (작성날짜) — DATETIME — NOT NULL

review (리뷰)

  • review_id (리뷰 번호) — INT — Primary key — NOT NULL
  • product_id (상품번호) — INT — Foreign key → Product.product_id — NOT NULL
  • user_id (사용자 번호) — INT — Foreign key → user.user_id — NOT NULL
  • review_contents (리뷰 내용) — VARCHART(200)
  • review_img (리뷰 이미지) — VARCHAR(40)
  • review_star (별점(1~5)) — INT — NOT NULL

user (사용자)

  • user_id (사용자 번호) — INT — Primary key — NOT NULL
  • user_userid (사용자 아이디) — VARCHAR(30) — NOT NULL
  • user_pw (사용자 비밀번호) — VARCHAR(50) — NOT NULL
  • user_name (사용자 이름) — VARCHAR(30) — NOT NULL
  • user_tel (사용자 연락처) — VARCHAR(15) — NOT NULL
  • user_addr (사용자 주소(우편번호 포함)) — VARCHAR(300) — NOT NULL
  • join_date (가입 날짜) — DATETIME — NOT NULL
  • user_type (사용자 타입(관리자/일반 사용자)) — VARCHAR(2) — NOT NULL