board-crud

Tables (4)

Board (게시판)

  • board_id (게시글 id) — Primary key — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL
  • title (제목) — NOT NULL
  • content (내용) — NOT NULL
  • created_at (생성된 시간) — NOT NULL
  • updated_at (수정된 시간) — NOT NULL
  • comment_count (댓글 수) — default 0
  • Like_count (좋아요 수) — default 0
  • category (카테고리)

Comment (댓글)

  • comment_id (댓글 id) — Primary key — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL
  • board_id (게시글 id) — Foreign key → Board.board_id — NOT NULL
  • content (내용)
  • likes (좋아요)
  • parentComment (부모 댓글 Id) — NULL
  • createdTime (작성한 시간)

Like (좋아요)

  • like_id (좋아요 id) — Primary key — NOT NULL
  • board_id (게시글 id) — Foreign key → Board.board_id — NOT NULL
  • user_id (유저 id) — Foreign key → User.user_id — NOT NULL

User (유저)

  • user_id (유저 id) — Primary key — NOT NULL
  • email (이메일) — NOT NULL
  • nickname (닉네임) — NOT NULL
  • password (비밀번호) — NOT NULL
  • create_at (생성일시) — NOT NULL