erd1
테이블 (5)
게시글 (post)
- 아이디 (post_id) — bigint — 기본 키 — NOT NULL
- 제목 (title) — char(30)
- 내용 (content) — text
- 상태 (status) — char
- 생성일 (created) — datetime
- 수정일 (updated) — datetime
- 아이디 (id) — bigint — 외래 키 → 사용자.아이디 — NOT NULL
게시글-카테고리 (post_category)
- 아이디 (category_id) — bigint — 외래 키 → 카테고리.아이디 — NOT NULL
- 아이디 (post_id) — bigint — 외래 키 → 게시글.아이디 — NOT NULL
댓글 (comment)
- 아이디 (comment_id) — bigint — 기본 키 — NOT NULL
- 작성자명 (username) — char(3)
- 내용 (content) — text
- 생성일 (created) — datetime
- 수정일 (updated) — datetime
- 아이디 (post_id) — bigint — 외래 키 → 게시글.아이디 — NOT NULL
사용자 (user)
- 아이디 (id) — bigint — 기본 키 — NOT NULL
- 이름 (name) — char(3)
- 전화번호 (phone) — varchar(15)
- 주소 (address) — varchar(200)
카테고리 (category)
- 아이디 (category_id) — bigint — 기본 키 — NOT NULL
- 카테고리명 (name) — char(10)