CEOS21th

Tables (8)

Bookmark (나도 궁금해요)

  • Bookmark_id (북마크 id) — Primary key — NOT NULL
  • user_id (회원 id) — Foreign key → User.user_id — NOT NULL
  • post_id (게시글 id) — Foreign key → Post.post_id — NOT NULL

Comment (댓글)

  • comment_id (댓글 id) — Primary key — NOT NULL
  • user_id (작성자 id) — Foreign key → User.user_id — NOT NULL
  • post_id (게시글 id) — Foreign key → Post.post_id — NOT NULL
  • content (댓글 내용)

HashTag (해시 태그)

  • tag_id (해시태그 id) — Primary key — NOT NULL
  • name (해시태그 이름)

Image (이미지)

  • image_id (이미지 id) — Primary key — NOT NULL
  • post_id (게시글 id) — Foreign key → Post.post_id — NOT NULL
  • imageUrl (이미지 url)

Post (게시글)

  • post_id (게시글 id) — Primary key — NOT NULL
  • user_id (작성자 id) — Foreign key → User.user_id — NOT NULL
  • parent_id (부모 게시글) — Foreign key → Post.post_id — NOT NULL
  • title (제목)
  • content (게시글 내용)
  • isAnonymous (익명 여부 설정)
  • postType (게시글 형태) — Q/A
  • commentCount (댓글 수)
  • likeCount (좋아요 수)
  • hateCount (싫어요 수)

PostTag (포스트_해시태그 매핑)

  • post_tag_id (게시글 해시태그 id) — Primary key — NOT NULL
  • tag_id (해시태그 id) — Foreign key → HashTag.tag_id — NOT NULL
  • post_id (게시글 id) — Foreign key → Post.post_id — NOT NULL

Reactions (반응)

  • reaction_id (싫어요 id) — 대댓글일 경우에만 존재 — Primary key — NOT NULL
  • user_id (회원 id) — Foreign key → User.user_id — NOT NULL
  • post_id (게시글 id) — Foreign key → Post.post_id — NOT NULL
  • reaction_type (반응 종류) — Like/Unlike/None

User (회원)

  • user_id (회원 id) — Primary key — NOT NULL
  • email (이메일)
  • password (비밀번호) — 해시값
  • user_name (사용자 실제 이름)
  • nickname (닉네임)
  • phone (전화번호)