BookStore
Tables (6)
books
- id — INT — Primary key — NOT NULL — PK
- title — VARCHAR(255) — NOT NULL — 책 이름
- price — INT — NOT NULL — 책 가격
- amount — INT — NOT NULL — 남은 수량
- store_id — INT — Foreign key → store.id — NOT NULL — store 식별자
customers
- id — INT — Primary key — NOT NULL — PK
- name — VARCHAR(255) — NOT NULL — 이름
- address — VARCHAR(255) — NOT NULL — 주소
delivery
- id — INT — Primary key — NOT NULL — PK
- status — ENUM('배송 전', '배송 중', '배송 완료') — NOT NULL — 배송 상태
- orders_id — INT — Foreign key → orders.id — NOT NULL — orders 식별자
order_items
- id — INT — Primary key — NOT NULL — PK
- orders_id — INT — Foreign key → orders.id — NOT NULL — orders 식별자
- books_id — INT — Foreign key → books.id — NOT NULL — books 식별자
orders
- id — INT — Primary key — NOT NULL — PK
- date — DATETIME — NOT NULL — 주문 날짜
- total_price — INT — NOT NULL — 결제 금액
- customers_id — INT — Foreign key → customers.id — NOT NULL — customers 식별자
store
- id — INT — Primary key — NOT NULL — PK
- name — VARCHAR(255) — NOT NULL — 서점명