중고나라

테이블 (4)

category

  • PK (id) — PK — 기본 키 — NOT NULL
  • 카테고리 ID (ct_id) — unique, not null
  • 카테고리 이름 (ct_name) — not null

post

  • PK (id) — PK — 기본 키 — NOT NULL
  • 제목 (title) — unique, not null
  • 내용 (desc) — not null
  • 댓글 (comment) — not null
  • 작성일자 (createdAt)
  • 수정일자 (updatedAt)

postCategory

  • PK (id) — PK — 기본 키 — NOT NULL
  • 카테고리 ID (ct_id) — FK(category) — 외래 키 → category.PK — NOT NULL
  • 게시판 ID (post_id) — FK(post) — 외래 키 → post.PK — NOT NULL

user

  • PK (id) — PK — 기본 키 — NOT NULL
  • 사용자 ID (userid) — unique, not null
  • 닉네임 (name) — not null
  • 비밀번호 (password) — not null
  • 휴대전화번호 (phone) — not null
  • 권한 (role) — not null
  • 지역 (location) — not null
  • 가입일자 (createdAt)
  • 수정일자 (updatedAt)
  • 삭제일자 (deletedAt)