b105

테이블 (8)

댓글 (COMMENT)

  • 댓글 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • content (댓글내용) — TEXT — NOT NULL
  • created_at (작성시각) — TIMESTAMP — NOT NULL
  • 할 일 PK (todo_id) — INT UNSIGNED — 외래 키 → 할 일.할 일 PK — NOT NULL — delete on cascade update on cascade
  • 사용자 PK (user_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade

사용자 (USER)

  • 사용자 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 이메일 (email) — VARCHAR(100) — NOT NULL
  • 비밀번호 (password) — VARCHAR(255) — NOT NULL
  • 별명 (nickname) — VARCHAR(30) — NOT NULL
  • 프로필url (avatar) — VARCHAR(500)

채팅 메시지 (CHATTING_MESSAGE)

  • 채팅 메시지 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 채팅 내용 (content) — VARCHAR(255) — NOT NULL
  • 작성시각 (created_at) — TIMESTAMP — NOT NULL
  • 채팅방 PK (chatting_room_id) — INT UNSIGNED — 외래 키 → 채팅방.채팅방 PK — NOT NULL — delete on cascade update on cascade
  • 채팅한 사람 PK (user_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade

채팅방 (CHATTING_ROOM)

  • 채팅방 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 채팅방 사용자 1 PK (user_1_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade
  • 채팅방 사용자 2 PK (user_2_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade

팔로우 (FOLLOW)

  • 팔로우 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 팔로우 하는 사람 ID (follower_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade
  • 팔로우 당하는 사람 ID (followed_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade
  • Field

할 일 (TODO)

  • 할 일 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 할 일 날짜 (todo_date) — TIMESTAMP — NOT NULL
  • 사용자 PK (user_id) — INT UNSIGNED — 외래 키 → 사용자.사용자 PK — NOT NULL — delete on cascade update on cascade

할 일 아이템 (TODO_ITEM)

  • 할 일 아이템 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 할 일 제목 (title) — VARCHAR(255) — NOT NULL
  • 할 일 내용 (description) — VARCHAR(500)
  • 할 일 PK (todo_id) — INT UNSIGNED — 외래 키 → 할 일.할 일 PK — NOT NULL — delete on cascade update on cascade

할 일 증거 (TODO_PROOF)

  • 할 일 증거 PK (id) — INT UNSIGNED — 기본 키 — NOT NULL — auto increment
  • 증거 url (proof) — VARCHAR(500)
  • 할 일 아이템 PK (todo_id) — INT UNSIGNED — 외래 키 → 할 일 아이템.할 일 아이템 PK — NOT NULL — delete on cascade update on cascade