당근마켓
테이블 (8)
Category (카테고리)
- category_id (PK) — Integer — 기본 키 — NOT NULL
- 카테고리명 (category_name) — varchar
Deal_status (거래 내역)
- deal_id (PK) — Integer — 기본 키 — NOT NULL
- user_id (FK) — Integer — 외래 키 → USER.user_id — NOT NULL
- item_id (FK2) — Integer — 외래 키 → Item.item_id — NOT NULL
- 구매또는판매 (buySell) — TINYINT
- 거래날짜 (deal_date) — timestamp
Interested (관심목록)
- interested_id (PK) — Integer — 기본 키 — NOT NULL
- user_id (FK) — Integer — 외래 키 → USER.user_id — NOT NULL
- item_id (FK2) — Integer — 외래 키 → Item.item_id — NOT NULL
- Field — 외래 키 → USER.Field
Item (상품)
- item_id (PK) — Integer — 기본 키 — NOT NULL
- user_id (FK) — Integer — 외래 키 → USER.user_id — NOT NULL
- category_id (FK2) — Integer — 외래 키 → Category.category_id — NOT NULL
- location_id (FK3) — int — 외래 키 → Location.Location_id — NOT NULL
- Field — 외래 키 → USER.Field
- 가격 (price) — Integer
- 거래 여부 (item_status) — TINYINT
- 제목 (title) — varchar
- 내용 (text) — varchar
- 날짜 (item_date) — timestamp
- 조회수 (hit) — Integer
- 사진 (picture) — 사진 경로
Location (지역)
- Location_id (PK) — int — 기본 키 — NOT NULL
- 지역 이름 (location_name) — varchar — NOT NULL
Rate (평점)
- rate_id (PK) — int — 기본 키 — NOT NULL
- user_id (FK) — Integer — 기본 키
- item_id (FK2) — Integer — 외래 키 → Item.item_id — NOT NULL
- 후기 (comment) — varchar
- 날짜 (date) — timestamp
- 평점 (rate) — TINYINT
USER (회원)
- user_id (PK) — Integer — 기본 키 — NOT NULL
- area_id (PK2) — Integer — 외래 키 → User_Area.area_id — NOT NULL
- rate_id (PK3) — int — 외래 키 → Rate.rate_id — NOT NULL
- item_id (FK2) — Integer — 외래 키 → Rate.item_id — NOT NULL
- Field — 외래 키 → Rate.user_id
- 회원 아이디 (id) — varchar
- 회원 비밀번호 (password) — varchar
- 이름 (name) — char
- 닉네임 (nickname) — char
- 휴대폰 번호 (phone) — varchar
- 생성일자 (created_date) — timestamp
- 평점 id (user_rate)
User_Area (활동 지역)
- area_id (PK) — Integer — 기본 키 — NOT NULL
- Location_id (FK2) — int — 외래 키 → Location.Location_id — NOT NULL
- authen_date (인증날짜) — timestamp