masill

테이블 (10)

게시글(소모임) (clubs)

  • 소모임 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 사용자 ID (userId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 이벤트 ID (eventId) — Long — 외래 키 → 게시글(이벤트).게시글 ID — NOT NULL — Auto Increment
  • 제목 (title) — String — NOT NULL
  • 장소 (location) — String — NOT NULL
  • 시작 시각 (startAt) — DateTime — NOT NULL
  • 내용 (content) — String — NOT NULL — TEXT
  • 관심목록 개수 (favoriteCount) — int — NOT NULL
  • 댓글 개수 (commentCount) — int — NOT NULL

게시글(이벤트) (events)

  • 게시글 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 작성자 ID (userId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 지역 ID (regionId) — Long — 외래 키 → 지역.지역 ID — NOT NULL
  • 카테고리 (category) — Enum — NOT NULL
  • 제목 (title) — String — NOT NULL
  • 장소 (location) — String — NOT NULL
  • 시작시각 (startAt) — Datetime — NOT NULL
  • 종료시각 (endAt) — Datetime — NOT NULL
  • 내용 (content) — String — NOT NULL — TEXT
  • 내용 요약 (summary) — String — NOT NULL
  • 관심목록 개수 (favoriteCount) — Integer — NOT NULL
  • 댓글 개수 (commentCount) — int — NOT NULL
  • 조회수 (viewCount) — int — NOT NULL

관심목록 (favorites)

  • 관심목록 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 사용자 ID (userId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 게시글 ID (postId) — Long — NOT NULL

댓글 (comments)

  • 댓글 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 게시글 ID (postId) — Long — NOT NULL — 이벤트 게시글 or 소모임 게시글
  • 부모 댓글 ID (parentCommentId) — Long — 외래 키 → 댓글.댓글 ID — Auto Increment
  • 사용자 ID (userId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 댓글 내용 (content) — String — NOT NULL

메시지 (messages)

  • 메시지 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 채팅방 ID (roomId) — Long — 외래 키 → 채팅방.채팅방 고유 ID — NOT NULL — Auto Increment
  • 보낸 사용자 ID (senderId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 메시지 내용 (content) — String — NOT NULL — TEXT
  • 보낸 시각 (sentAt) — DateTime — NOT NULL

사용자 (users)

  • 사용자 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 아이디(이메일) (username) — String — NOT NULL
  • 비밀번호 (password) — String — NOT NULL
  • 닉네임 (nickname) — String — NOT NULL
  • 전화번호 (phoneNumber) — String — NOT NULL
  • 사업자 인증 여부 (isBusinessVerified) — Boolean — NOT NULL
  • 프로필 이미지 URL (profileImageUrl) — String
  • 지역 ID (regionId) — Long — 외래 키 → 지역.지역 ID — NOT NULL

알림 (notifications)

  • 알림 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 알림 받을 사용자 id (receiverId) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 게시글 ID (postId) — Long — NOT NULL — 이벤트 게시글 or 소모임 게시글
  • 알림 타입 (type) — ENUM — NOT NULL
  • 내용 (content) — String — NOT NULL
  • 읽었는지 (isRead) — Boolean — NOT NULL
  • 알림 발생 시각 (createdAt) — Datetime — NOT NULL

이벤트 게시글 이미지 (event_images)

  • 이미지 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 게시글 ID (eventId) — Long — 외래 키 → 게시글(이벤트).게시글 ID — NOT NULL — Auto Increment
  • 이미지 순서 (sequence) — int — NOT NULL
  • 이미지 URL (imageUrl) — String — NOT NULL

지역 (regions)

  • 지역 ID (id) — Long — 기본 키 — NOT NULL
  • 시/도 (sido) — String — NOT NULL
  • 시/군/구 (sigungu) — String — NOT NULL

채팅방 (chat_rooms)

  • 채팅방 고유 ID (id) — Long — 기본 키 — NOT NULL — Auto Increment
  • 생성 시각 (createdAt) — DateTime — NOT NULL
  • 마지막 시각 (updatedAt) — DateTime — NOT NULL — 마지막 메시지 시각
  • 사용자1 고유 ID (user1Id) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment
  • 사용자 2고유 ID (user2Id) — Long — 외래 키 → 사용자.사용자 ID — NOT NULL — Auto Increment