29

Tables (5)

Copy Of Untitled (CopyOfUntitled)

    order_items (주문 항목)

    • id — BIGINT — Primary key — NOT NULL — 주문 항목 ID
    • order_id (Key) — BIGINT — Foreign key → orders.id — NOT NULL — 주문 Id
    • product_id — BIGINT — Foreign key → products.id — NOT NULL — 상품 Id
    • price_at_order — INT — NOT NULL — 주문 당시 가격
    • quantity — INT — 수량
    • created_at — DATETIME(6) — NOT NULL — 생성 시간
    • modified_at — DATETIME(6) — 수정 시간

    orders (주문)

    • id (Key) — BIGINT — Primary key — NOT NULL — 주문 테이블 PK
    • order_status — VARCHAR(30) — NOT NULL — 주문 상태
    • shipping_fee — INT — NOT NULL — 배송료
    • total_price — BIGINT — NOT NULL — 총 주문 금액
    • created_at — DATETIME(6) — NOT NULL — 생성 시간
    • modified_at — DATETIME(6) — 수정 시간

    product_stocks (상품 재고)

    • id — BIGINT — Primary key — NOT NULL — 재고 테이블 PK
    • product_id — BIGINT — Foreign key → products.id — NOT NULL — 상품 ID
    • quantity — INT — NOT NULL — 재고 수량
    • created_at — DATETIME(6) — NOT NULL — 생성 시간
    • modified_at — DATETIME(6) — 수정 시간

    products (상품)

    • id — BIGINT — Primary key — NOT NULL — 상품 테이블 PK
    • name — VARCHAR(255) — NOT NULL — 상품 이름
    • price — INT — NOT NULL — 상품 가격
    • created_at — DATETIME(6) — NOT NULL — 생성 시간
    • modified_at — DATETIME(6) — 수정 시간