주문시스템
테이블 (5)
order_product
- id — int(11) — 기본 키 — NOT NULL
- id (id2) — int(11) — 외래 키 → orders.id — NOT NULL
- product_id — int(11)
- quantity — int(11) — NOT NULL
- price — decimal(10,2) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
orders
- id — int(11) — 기본 키 — NOT NULL
- user_id — int(11)
- total_amount — decimal(10,2) — NOT NULL
- product_count — int(11) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
product
- id — int(11) — NOT NULL
- name — varchar(100) — NOT NULL
- description — text
- price — decimal(10,2) — NOT NULL
- quantity — int(11) — NOT NULL
- seller_id — int(11)
- del_YN — char(1) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
reviews
- id — int(11) — 기본 키 — NOT NULL
- product_id — int(11)
- user_id — int(11)
- rating — int(11)
- review_text — text
- created_at — timestamp
- updated_at — timestamp
user
- id — int(11) — 기본 키 — NOT NULL
- name — varchar(50) — NOT NULL
- passwd — varchar(255) — NOT NULL
- user_type — enum('seller','customer') — NOT NULL
- user_grade — enum('브론즈','실버','골드','플레티넘')
- del_YN — char(1) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
- email — varchar(255) — NOT NULL