e-commerce
Tables (10)
balance (잔액)
- id (잔액 ID) — Primary key — NOT NULL
- user_id (사용자 ID) — Foreign key → user.id — NOT NULL
- balance (잔액)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
balance_history (잔액 변경 이력)
- id (잔액 변경 이력 ID) — Primary key — NOT NULL
- balance_id (잔액 ID) — Foreign key → balance.id — NOT NULL
- amount (변경 수량)
- transaction_type (실행 타압)
- balance (남은 수량)
cart (장바구니)
- id (장바구니 ID) — Primary key — NOT NULL
- user_id (사용자 ID) — Foreign key → user.id — NOT NULL
- product_id (상품 ID) — Foreign key → product.id — NOT NULL
- quantity (수량)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
order (주문)
- id (주문 ID) — Primary key — NOT NULL
- product_id (상품 ID) — Foreign key → product.id — NOT NULL
- user_id (사용자 ID) — Foreign key → user.id — NOT NULL
- quantity (주문 수량)
- price (주문 당시의 가격)
- total_price (총 가격)
- status (주문상태)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
payment (결제)
- id (결제 ID) — Primary key — NOT NULL
- order_id (주문 ID) — Foreign key → order.id — NOT NULL
- status (결제상태)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
- price (결제 금액)
payment_history (결제_이력)
- id (결제 이력 ID) — Primary key — NOT NULL
- payment_id (결제 ID) — Foreign key → payment.id — NOT NULL
- price (결제 금액)
- status (결제상태)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
product (상품)
- id (상품 ID) — Primary key — NOT NULL
- name (상품 이름)
- price (상품 가격)
- active_yn (활성화여부)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
product_detail (상품 디테일)
- id (상품 디테일 ID) — Primary key — NOT NULL
- product_id (상품 ID) — Foreign key → product.id — NOT NULL
- product_option_id (상품 옵션 ID) — Foreign key → product_option.id — NOT NULL
- quantity (수량)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
product_option (상품 옵션)
- id (상품 옵션 ID) — Primary key — NOT NULL
- name (옵션 이름)
- value (옵션 값)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (삭제여부)
user (사용자)
- id (사용자 ID) — Primary key — NOT NULL
- name (이름)
- phone (핸드폰 번호)
- created_at (생성날짜)
- updated_at (수정날짜)
- del_yn (탈퇴여부)