rm_toy_prj_ver0.3 (대댓글 table)

테이블 (9)

게시글-해시태그(부가) (Post_hashtag)

  • id (post_hashtag_id) — int — 기본 키 — NOT NULL — auto_increment
  • post_id — int — 외래 키 → 게시물.post_id — NOT NULL — post 식별자
  • 해시태그 id (hashtag_id2) — int — 외래 키 → 해시태그(부가).해시태그 id — NOT NULL — auto_increment

게시물 (Post)

  • post_id — int — 기본 키 — NOT NULL — post 식별자
  • user_id — varchar(30) — 외래 키 → 회원정보.user_id — NOT NULL
  • photo — varchar(255) — NOT NULL — value에 경로
  • 내용 (content) — mediumtext
  • 만든시간 (create_time) — DATETIME — NOT NULL
  • 수정시간 (update_time) — DATETIME

대댓글 (Reply)

  • reply_id — int — 기본 키 — NOT NULL — Reply 식별자
  • comment_id — int — 외래 키 → 댓글.comment_id — NOT NULL — comment 식별자
  • user_id — int — 외래 키 → 회원정보.user_id — NOT NULL — auto_increment
  • content — varchar(255) — NOT NULL — 대댓글 내용
  • 생성시간 (reg_time) — DATATIME — NOT NULL

댓글 (Comment)

  • comment_id — int — 기본 키 — NOT NULL — comment 식별자
  • post_id — int — 외래 키 → 게시물.post_id — NOT NULL — post 식별자
  • user_id — varchar(30) — 외래 키 → 회원정보.user_id — NOT NULL — 댓글 작성자
  • content — mediumtext — 댓글 내용
  • reg_time — DATETIME — NOT NULL — 댓글 생성일

북마크 (Bookmark)

  • bookmart_id (bookmark_id) — int — 기본 키 — NOT NULL — auto_increment
  • post_id — int — 외래 키 → 게시물.post_id — NOT NULL — post 식별자
  • user_id — int — 외래 키 → 회원정보.user_id — NOT NULL — auto_increment

좋아요 (Likes)

  • user_id — int — 외래 키 → 회원정보.user_id — NOT NULL — auto_increment
  • post_id — int — 외래 키 → 게시물.post_id — NOT NULL — post 식별자

팔로우(부가) (Follow)

  • follow_id — int — 기본 키 — NOT NULL
  • follower_id — int — 외래 키 → 회원정보.user_id — NOT NULL — auto_increment
  • following_id — int — 외래 키 → 회원정보.user_id — NOT NULL — auto_increment

해시태그(부가) (Hashtag)

  • 해시태그 id (hashtag_id) — int — 기본 키 — NOT NULL — auto_increment
  • 태그 (hashtag) — varchar(30) — NOT NULL

회원정보 (User)

  • user_id — int — 기본 키 — NOT NULL — auto_increment
  • user_name — varchar(30) — NOT NULL
  • email — varchar(255) — NOT NULL
  • pw — varchar(30) — NOT NULL
  • join_date — DATETIME — NOT NULL — 가입일
  • profile_pic — varchar(255) — default value로 디폴트 이미지 경로