my-page erd

Tables (9)

Calendar (캘린더)

  • id — int — Primary key — NOT NULL
  • id (id2) — int — Foreign key → User.id — NOT NULL
  • PostId (UserId) — int — Foreign key → Post.게시글을 등록한 유저 ID — NOT NULL
  • TIL ID (TilId) — int — Foreign key → TIL.id — NOT NULL
  • createdAt — datetime
  • updatedAt — datetime

Comment (방명록)

  • id — int — Primary key — NOT NULL
  • 댓글 단 유저ID (CommentedUserId) — int — Foreign key → User.id — NOT NULL
  • 방명록의 주인 (UserId) — int
  • comment — varchar
  • 비밀질문 유무 (secret) — boolean

Feedback (피드백 관리)

  • id — int — Primary key — NOT NULL
  • 피드백을 해준 유저 ID (UserId) — int — Foreign key → User.id — NOT NULL
  • title — varchar
  • content — varchar
  • createdAt — datetime

Follow (팔로우 관리)

  • id — int — Primary key — NOT NULL
  • 나를 팔로잉하고 있는 유저 ID (FollowerId) — int — Primary key
  • 내가 팔로잉하고 있는 유저 ID (FollowingId) — int — Foreign key → User.id — NOT NULL

Post (게시글)

  • id — int — Primary key — NOT NULL
  • 게시글을 등록한 유저 ID (UserId) — int — Foreign key → User.id — NOT NULL
  • title — varchar
  • content — varchar
  • imageUrl — varchar
  • createdAt — datetime
  • updatedAt — datetime

PostComment (게시글에 달린 댓글)

  • id — int — Primary key — NOT NULL
  • 게시글 ID (PostId) — int — Foreign key → Post.id — NOT NULL
  • 유저 ID (UserId) — int — Foreign key → User.id — NOT NULL
  • 댓글 (post_comment) — varchar
  • createdAt — datetime
  • updatedAt — datetime

TIL

  • id — int — Primary key — NOT NULL
  • TIL을 등록한 유저 ID (UserId) — int — Foreign key → User.id — NOT NULL
  • title — varchar
  • til_content (content) — varchar
  • createdAt — datetime
  • updatedAt — datetime

TilComment (TIL에 달린 댓글)

  • id — int — Primary key — NOT NULL
  • 유저 ID (UserId) — int — Foreign key → User.id — NOT NULL
  • Til ID (TilId) — int — Foreign key → TIL.id — NOT NULL
  • 댓글 (post_comment) — varchar
  • createdAt — datetime
  • updatedAt — datetime

User (유저)

  • id — int — Primary key — NOT NULL
  • email — varchar
  • password — varchar
  • nickname — varchar
  • gender — varchar
  • job — varchar
  • githubUrl — varchar
  • createdAt — datetime
  • updatedAt — datetime
  • name — varchar
  • 관리자 관리 (user_type) — varchar