online_shopingmall

Tables (9)

company (기업)

  • company_id (기업 id) — BIG_INT — Primary key — NOT NULL
  • name (기업 이름) — VARCHAR(255) — NOT NULL
  • username (아이디 (로그인 시 사용)) — VARCHAR(255) — NOT NULL
  • password_hash (비밀번호 (로그인 시 사용)) — VARCHAR(255) — NOT NULL
  • contact (연락처) — VARCHAR(31) — NOT NULL
  • created_at (가입 시간) — DATETIME — NOT NULL
  • modified_at (정보 수정 시간) — DATETIME
  • deleted_at (탈퇴 시간) — DATETIME

customer (고객 정보)

  • customer_id (pk) — BIG_INT — Primary key — NOT NULL
  • name (실명) — VARCHAR(255) — NOT NULL
  • nickname (닉네임 (서비스 내 사용)) — VARCHAR(255) — NOT NULL
  • username (아이디 (로그인 시 사용)) — VARCHAR(255) — NOT NULL
  • password_hash (해시 비밀번호 (로그인 시 사용)) — VARCHAR(255) — NOT NULL
  • birthdate (생년월일) — DATE
  • contact (연락처) — VARCHAR(31) — NOT NULL
  • created_at (회원가입 시간) — DATETIME — NOT NULL
  • modified_at (회원 정보 수정 시간) — DATETIME
  • deleted_at (회원 탈퇴 시간) — DATETIME

delivery (배송 내역)

  • delivery_id (pk) — BIG_INT — Primary key — NOT NULL
  • pay_id (결제 id) — BIG_INT — Foreign key → payment.pay_id — NOT NULL
  • start_at (시작 시간) — DATETIME
  • completed_at (완료 시간) — DATETIME

order_group (주문 그룹)

  • order_group_id (pk) — BIG_INT — Primary key — NOT NULL
  • customer_id (구매자 id) — BIG_INT — Foreign key → customer.customer_id — NOT NULL
  • created_at (생성 시간) — DATETIME — NOT NULL

order_item (주문 내역)

  • order_item_id (pk) — BIG_INT — Primary key — NOT NULL
  • order_product_id (주문 그룹) — BIG_INT — Foreign key → order_group.order_group_id — NOT NULL
  • order_product_detail_id (주문 상품 상세 id) — BIG_INT — Foreign key → order_product_detail.order_product_detail_id — NOT NULL
  • created_at (주문 시간) — DATETIME — NOT NULL
  • cancel_at (주문 취소 시간) — DATETIME

order_product_detail (주문 상품 상세)

  • order_product_detail_id (pk) — BIG_INT — Primary key — NOT NULL
  • product_id (상품 id) — BIG_INT — Foreign key → product.product_id — NOT NULL
  • amount (상품 개수) — INTEGER
  • created_at (추가 시간) — DATETIME — NOT NULL

payment (결제 내역)

  • pay_id (결제 id) — BIG_INT — Primary key — NOT NULL
  • order_item_id (주문 내역 id) — BIG_INT — Foreign key → order_item.order_item_id — NOT NULL
  • payment_type (결제 방법) — VARCHAR(64) - KAKAO, NAVER, ... — NOT NULL
  • amount (결제 금액) — INTEGER — NOT NULL
  • created_at (결제 시간) — DATETIME — NOT NULL

product (상품)

  • product_id (pk) — BIG_INT — Primary key — NOT NULL
  • seller_id (판매 기업 id) — BIG_INT — Foreign key → company.company_id — NOT NULL
  • category_id (카테고리 id) — BIG_INT — Foreign key → product_category.product_category_id — NOT NULL
  • name (상품 이름) — VARCHAR(255) — NOT NULL
  • price (상품 가격) — BIG_INT — NOT NULL
  • quantity (상품 재고 수) — BIG_INT
  • created_at (생성 시간) — DATETIME
  • modified_at (수정 시간) — DATETIME

product_category (상품 카테고리)

  • product_category_id (pk) — BIG_INT — Primary key — NOT NULL
  • name (카테고리명) — VARCHAR(255) — NOT NULL
  • created_at (생성 시간) — DATETIME — NOT NULL