NongItDa

Tables (11)

Cart (장바구니)

  • id (Key) — BIGINT UNSIGNED — Primary key — NOT NULL
  • product_count (수량) — INT UNSIGNED — NOT NULL
  • user_id — INT UNSIGNED — Foreign key → User.id — NOT NULL
  • product_id — BIGINT UNSIGNED — Foreign key → Product.Key — NOT NULL

Display_Product (사이트 내 상품 정보)

  • id (display_product_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • name (상품 이름) — VARCHAR() — NOT NULL
  • description (상품 상세 정보) — MEDIUMTEXT — NOT NULL
  • main_image_url (메인 이미지) — VARCHAR() — NOT NULL

Order (주문)

  • id (order_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • user_id — INT UNSIGNED — Foreign key → User.id — NOT NULL
  • receiver_name (받는 사람) — VARCHAR() — NOT NULL
  • receiver_phone (받는 사람 연락처) — VARCHAR(11) — NOT NULL
  • receiver_address (받는 사람 주소) — VARCHAR() — NOT NULL
  • order_status (주문 상태) — ENUM — NOT NULL
  • created_at (주문 시점) — DATETIME — NOT NULL
  • delivered_at (배송 완료 시점) — DATETIME

Order_Product (주문된 상품)

  • id (order_product_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • count (주문 수량) — INT UNSIGNED — NOT NULL
  • product_id — BIGINT UNSIGNED — Foreign key → Product.Key — NOT NULL
  • order_id — BIGINT UNSIGNED — Foreign key → Order.id — NOT NULL

Payment (결제 기록)

  • id (payment_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • payment_type_id — TINYINT UNSIGNED — Foreign key → Payment_Type.id — NOT NULL
  • order_id — BIGINT UNSIGNED — Foreign key → Order.id — NOT NULL
  • total_price (전체 금액) — INT UNSIGNED — NOT NULL
  • delivery_fee (배달 금액) — INT UNSIGNED — NOT NULL
  • final_price (최종 금액) — INT UNSIGNED — NOT NULL
  • Field (생성일자) — DATETIME — NOT NULL

Payment_Type (결제 타입)

  • id (payment_type_id) — TINYINT UNSIGNED — Primary key — NOT NULL
  • name (타입 이름) — VARCHAR() — NOT NULL

Product (실제 상품)

  • Key — BIGINT UNSIGNED — Primary key — NOT NULL
  • name (상품 이름) — VARCHAR() — NOT NULL
  • price (가격) — INT UNSIGNED — NOT NULL
  • stock (재고) — SMALLINT UNSIGNED — NOT NULL
  • status (상품 상태) — ENUM — NOT NULL
  • id (display_product_id) — BIGINT UNSIGNED — Foreign key → Display_Product.id — NOT NULL

Refund (환불 기록)

  • id (refund_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • order_id — BIGINT UNSIGNED — Foreign key → Order.id — NOT NULL
  • amount (총 환불금액) — INT UNSIGNED — NOT NULL
  • created_at (취소 시점) — DATETIME — NOT NULL

Refund_Order_Product (환불 상세 기록)

  • id (refund_order_product_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • count (취소 수량) — INT UNSIGNED — NOT NULL
  • order_product_id — BIGINT UNSIGNED — Foreign key → Order_Product.id — NOT NULL
  • id (refund_id) — BIGINT UNSIGNED — Foreign key → Refund.id — NOT NULL

User (회원)

  • id (user_id) — INT UNSIGNED — Primary key — NOT NULL
  • login_id (로그인 아이디) — VARCHAR() — NOT NULL
  • password (비밀번호) — VARCHAR() — NOT NULL
  • name (이름) — VARCHAR() — NOT NULL
  • email (이메일) — VARCHAR() — NOT NULL
  • phone_number (휴대폰 번호) — VARCHAR() — NOT NULL
  • created_at (생성일시) — DATETIME — NOT NULL
  • updated_at (수정일시) — DATETIME — NOT NULL

shipping_Address (배송지 주소)

  • id (Shipping_Address_id) — BIGINT UNSIGNED — Primary key — NOT NULL
  • user_id (유저 id) — INT UNSIGNED — Foreign key → User.id — NOT NULL
  • address (주소) — VARCHAR() — NOT NULL
  • is_default (기본배송지 여부) — BOOLEAN — NOT NULL