123

Tables (6)

Comment (댓글)

  • id (댓글키) — BIGINT — Primary key — NOT NULL
  • user_id (사용자키) — BIGINT — Foreign key → User.id — NOT NULL
  • post_id (게시글키) — BIGINT — Foreign key → Post.id — NOT NULL
  • content (내용) — TEXT — NOT NULL
  • created_at (댓글 생성일) — TIMESTAMP
  • modified_at (댓글 수정일) — TIMESTAMP

Friend (친구)

  • id (친구관계키) — BIGINT — Primary key — NOT NULL
  • user_id1 (사용자1키) — BIGINT — Foreign key → User.id — NOT NULL
  • user_id2 (사용자2키) — BIGINT — Foreign key → User.id — NOT NULL
  • created_at (친구관계 생성일) — DATETIME
  • modified_at (친구관계 수정일) — DATETIME

Friends Reqeust (친구요청)

  • id (친구요청키) — BIGINT — Primary key — NOT NULL
  • requester_id (요청한 사용자키) — BIGINT — Foreign key → User.id — NOT NULL
  • receiver_id (요청받은 사용자키) — BIGINT — Foreign key → User.id — NOT NULL
  • status (친구추가 요청상태)
  • created_at (요청일) — DATETIME
  • modified_at (수락일) — DATETIME

Like (좋아요)

  • id (좋아요키) — BIGINT — Primary key — NOT NULL
  • user_id (사용자키) — BIGINT — Foreign key → User.id — NOT NULL
  • post_id (게시글키) — BIGINT — Foreign key → Post.id — NOT NULL
  • comment_id (댓글키) — BIGINT — Foreign key → Comment.post_id — NOT NULL
  • created_at (좋아요 생성일) — TIMESTAMP
  • modified_at (좋아요 상태 변경일) — TIMESTAMP

Post (게시판)

  • id (게시글키) — BIGINT — Primary key — NOT NULL
  • user_id (사용자키) — BIGINT — Foreign key → User.id — NOT NULL
  • title (제목) — VARCHAR(255)
  • content (내용) — TEXT
  • created_at (작성일) — DATETIME
  • modified_at (수정일) — DATETIME

User (사용자)

  • id (사용자키) — BIGINT — Primary key — NOT NULL
  • email (이메일) — VARCHAR(255)
  • name (이름) — VARCHAR(100)
  • password (비밀번호) — VARCHAR(255)
  • created_at (가입일) — DATETIME
  • modified_at (수정일) — DATETIME