asddasdad

Tables (10)

address

  • address_id — INT — Primary key — NOT NULL — 주소 번호
  • address — VARCHAR(30) — NOT NULL — 주소
  • user_id — VARCHAR(50) — Foreign key → users.user_id — NOT NULL — 아이디

category

  • category_id — INT — Primary key — NOT NULL — 카테고리 번호
  • category_name — VARCHAR(50) — NOT NULL — 카테고리의 종류

order

  • order_id — INT — Primary key — NOT NULL — 주문 번호
  • user_id — VARCHAR(50) — Foreign key → users.user_id — NOT NULL — 아이디
  • order_date — DATETIME — NOT NULL — 주문을 한 날짜
  • ship_date — DATETIME — 택배 예정일(판매자)

order_detail

  • order_id — INT — Foreign key → order.order_id — NOT NULL — 주문 번호
  • product_id — INT — Foreign key → product.product_id — NOT NULL — 상품 번호
  • quantity — INT — NOT NULL — 주문한 상품 갯수
  • unit_cost — DECIMAL(15) — NOT NULL — 주문한 상품의 가격

point_earnings

  • user_id — VARCHAR(50) — Foreign key → users.user_id — NOT NULL
  • earned_points — INT — NOT NULL
  • earnings_description — VARCHAR(255)
  • earnings_date — TIMESTAMP

product

  • product_id — INT — Primary key — NOT NULL — 상품 번호
  • model_number — NVARCHAR(10) — NOT NULL — 모델 번호
  • model_name — NVARCHAR(120) — NOT NULL — 모델 이름
  • product_image — NVARCHAR(30) — 상품 이미지
  • unit_cost — DECIMAL(15) — 상품 가격
  • description — TEXT — 설명

product_category_relation

  • product_id — INT — Foreign key → product.product_id — NOT NULL — 제품 번호
  • category_id — INT — Foreign key → category.category_id — NOT NULL — 카테고리 번호

review

  • review_id — INT — Primary key — NOT NULL — 리뷰 번호 1++
  • user_id — VARCHAR(50) — Foreign key → users.user_id — NOT NULL — 아이디
  • product_id — INT — Foreign key → product.product_id — NOT NULL — 상품 번호 1++
  • rating — INT — NOT NULL — 5.0 만점
  • comments — TEXT — 설명

shopping_cart

  • record_id — INT — Primary key — NOT NULL — 레코드 번호
  • product_id — INT — Foreign key → product.product_id — NOT NULL — 상품 번호
  • cart_id — NVARCHAR(150) — NOT NULL — 카트 번호
  • quantity — INT — NOT NULL — 상품 갯수
  • date_created — DATETIME — NOT NULL — 장바구니 생성 날짜

users

  • user_id — VARCHAR(50) — Primary key — NOT NULL — 아이디
  • user_name — VARCHAR(50) — NOT NULL — 이름
  • user_password — VARCHAR(200) — NOT NULL — mysql password 사용
  • user_birth — VARCHAR(8) — NOT NULL — 생년월일 : 19840503
  • user_auth — VARCHAR(10) — NOT NULL — 권한: ROLE_ADMIN,ROLE_USER
  • user_point — INT — NOT NULL — default : 1000000
  • created_at — DATETIME — NOT NULL — 가입일자
  • latest_login_at — DATETIME — 마지막 로그인 일자