SEMO2048

테이블 (4)

게시글 (post)

  • Key (id) — int(11) unsigned auto_increment — 기본 키 — NOT NULL — auto_increment
  • Key (user_id) — char(36) — 외래 키 → 사용자.Key — NOT NULL
  • Field (title) — varchar(100) — NOT NULL
  • 본문 요약 (brief_description) — varchar(255)
  • Field (created_date) — datetime — NOT NULL
  • Field (updated_date) — datetime — NOT NULL
  • Field (deleted) — tinyint(4) — NOT NULL
  • Field (comment_count) — int(11) — NOT NULL

게시글 내용 (post_content)

  • Key (post_id) — int — 외래 키 → 게시글.Key — NOT NULL — auto_increment
  • Field (content) — text — NOT NULL
  • Field2 (large_content) — blob

댓글 (comment)

  • Key (id) — int(11) unsigned auto_increment — 기본 키 — NOT NULL
  • Key (post_id) — int(11) — 외래 키 → 게시글.Key — NOT NULL — auto_increment
  • Key (user_id) — char(36) — 외래 키 → 사용자.Key — NOT NULL
  • Field (content) — text — NOT NULL
  • Field (created_date) — datetime — NOT NULL
  • Field (updated_date) — datetime — NOT NULL

사용자 (user)

  • Key (id) — char(36) — 기본 키 — NOT NULL
  • Field (username) — varchar(20) unique — NOT NULL
  • Field (password) — varchar(100) — NOT NULL
  • Field (created_date) — datetime