같이달램

테이블 (11)

게시글 댓글 (COMMENTS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 내용 (content) — string — NOT NULL
  • 생성일 (createdAt) — datetime
  • 수정일 (updatedAt) — datetime
  • 게시글ID (postId) — int — 외래 키 → 달램 토크 게시글.아이디 — NOT NULL
  • 작성자ID (authorId) — int — 외래 키 → 유저.아이디 — NOT NULL

게시글 좋아요 (POST_LIKES)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 생성일 (createdAt) — datetime
  • 중복 좋아요 방지 (Field) — 이미 좋아요함 대응
  • 게시글ID (postId) — int — 외래 키 → 달램 토크 게시글.아이디 — NOT NULL
  • 유저ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

달램 토크 게시글 (POSTS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 내용 (content) — string — NOT NULL
  • 이미지URL (imageUrl) — string
  • 조회수 (viewCount) — int — NOT NULL
  • 좋아요수 (likeCount) — int — NOT NULL
  • 생성일 (createdAt) — datetime
  • 수정일 (updatedAt) — datetime
  • 작성자ID (authorId) — int — 외래 키 → 유저.아이디 — NOT NULL

리뷰 (REVIEWS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 모임ID (meetingId) — int — 외래 키 → 모임.아이디 — NOT NULL
  • 평점 (score) — int — NOT NULL
  • 내용 (comment) — string — NOT NULL
  • 생성일 (createdAt) — datetime
  • 수정일 (updatedAt) — datetime
  • 모임당 1개 (Field) — 이미 리뷰 작성함 대응
  • 유저ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

모임 (MEETINGS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 모임명 (name) — string — NOT NULL
  • 모임 종류 (type) — string — NOT NULL — MeetingTypes.name과 논리 연결
  • 지역 (region) — string — NOT NULL — 예: 서울 마포구
  • 주소 (address) — string
  • 위도 (latitude) — float
  • 경도 (longitudef) — loat
  • 모임일시 (dateTime) — datetime
  • 모집마감 (registrationEnd) — datetime
  • 정원 (capacity) — int — NOT NULL — 1~1000
  • 참가자수 (participantCount) — int — NOT NULL — 캐시성 컬럼
  • 이미지URL (imageUrl) — string
  • 설명 (description) — string
  • 취소일 (canceledAt) — datetime — 취소 상태 표현
  • 확정일 (confirmedAt) — datetime — 확정 상태 표현
  • 생성일 (createdAt) — datetime
  • 수정일 (updatedAt) — datetime
  • 유저ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

모임 종류 (MEETING_TYPES)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 이름 (name) — string — NOT NULL — 팀 내 고유
  • 설명 (description) — string
  • 생성일 (createdAt) — datetime — NOT NULL

모임 참가자 (PARTICIPANTS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 참가일시 (joinedAt) — datetime
  • 중복참가방지 (Field) — ALREADY_JOINED 방지
  • 모임ID (meetingId) — int — 외래 키 → 모임.아이디 — NOT NULL
  • 유저ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

알림 (NOTIFICATIONS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 타입 (type) — enum — NOT NULL — MEETING_CONFIRMED / MEETING_CANCELED / COMMENT
  • 메시지 (message) — string — NOT NULL
  • 데이터 (data) — json — meetingId, meetingName, postId, postTitle, commentId, image
  • 읽음여부 (isRead) — boolean — NOT NULL
  • 생성일 (createdAt) — datetime
  • 수신자ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

유저 (USER)

  • 아이디 (id) — int — 기본 키 — NOT NULL — 사용자 PK
  • 팀ID (teamId) — string — NOT NULL — 멀티테넌트 구분
  • 이메일 (email) — string — NOT NULL — 팀 내 이메일 고유
  • 비밀번호 (password) — string — NOT NULL
  • 이름 (name) — string — NOT NULL
  • 프로필 이미지 URL (imageUrl) — string
  • 생성일 (createdAt) — datetime — NOT NULL
  • 수정일 (updatedAt) — datetime — NOT NULL

찜 (FAVORITES)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 모임ID (meetingId) — int — 외래 키 → 모임.아이디 — NOT NULL
  • 생성일 (createdAt) — datetime
  • 중복찜방지 (Field2) — 이미 찜함 대응
  • 유저ID (userId) — int — 외래 키 → 유저.아이디 — NOT NULL

토큰 (REFRESH_TOKENS)

  • 아이디 (id) — int — 기본 키 — NOT NULL
  • 팀ID (teamId) — string — NOT NULL
  • 토큰해시 (tokenHash) — string — NOT NULL — 원문 저장 지양
  • 만료일 (expiresAt) — datetime — NOT NULL — refreshToken 7일
  • 무효화일 (revokedAt) — datetime — 로그아웃/로테이션 시 설정
  • 생성일 (createdAt) — datetime — NOT NULL
  • 아이디 (id2) — int — 외래 키 → 유저.아이디 — NOT NULL — 사용자 PK