Node_Project_04

테이블 (4)

게시글 (post)

  • postId — Int — 기본 키 — NOT NULL
  • userId — Int — 외래 키 → 사용자.userId — NOT NULL
  • title — String
  • content — String
  • createdAt — Date

댓글 (comments)

  • commentId — Int — 기본 키 — NOT NULL
  • postId — Int — 외래 키 → 게시글.postId — NOT NULL
  • userId — Int — 외래 키 → 게시글.userId — NOT NULL
  • userId (userId2) — Int — 외래 키 → 사용자.userId — NOT NULL
  • comment — String
  • createdAt — Date

사용자 (users)

  • userId — Int — 기본 키 — NOT NULL
  • email — Stirng
  • password — String
  • nickname — String

좋아요 (Likes)

  • likeId — Int — 기본 키 — NOT NULL
  • userId — Int — 외래 키 → 사용자.userId — NOT NULL
  • postId — Int — 외래 키 → 게시글.postId — NOT NULL