Repository navigation
Conversation
snughnu
approved these changes
Oct 12, 2026
snughnu
left a comment
Collaborator
There was a problem hiding this comment.
Repository 재편 내용과 약속 날짜 필수값 둘 다 괜찮은 것 같습니다 ~ !
리뷰 노트 내용도 확인했어요 수고하셨습니다. 🙊
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA
📝 작업 내용
📌 요약
🔍 상세
[1] 약속 Repository 재편
기존
AppointmentCreationRepository/AppointmentDetailRepository/AppointmentInfoRepository3개를 삭제하고, Firestore 문서 단위에 맞춰 2개로 나눴습니다.AppointmentRepository: 약속 문서 — 생성, 코드로 참여, 조회, 정보 수정AppointmentRouteRepository: 참여자별 경로 조회 (routes하위 컬렉션 대응)async throws로 전환, ViewModel은Task { @MainActor }에서 호출[2] Appointment 엔티티 정리
placeVoteStatus제거 — Mock 외 사용처 없음. 투표는 공유 장소 쪽(voterIDs)에서 다룰 예정routes제거 — 경로는AppointmentRouteRepository에서 따로 조회GetAppointmentDetailUseCase: 약속과 경로를 함께 조회해 합치고, 현재 사용자 ID는AuthRepository에서 가져옴 (로그인 정보 없으면notAuthenticated)[3] Mock 정리
MockAppointmentRepository,MockAppointmentRouteRepository로 통합[4] 약속 날짜 필수화
엔티티에서 약속 필드가 옵셔널 타입이 아닌 상태여서 다시 검토해봤습니다.
날짜가 옵셔널이면 약속 목록에서 정렬하기 어렵기도 하고, 약속 생성 시에 초기 날짜 데이터를 설정해두는 방향도 괜찮겠다고 판단했습니다.
약속 만들기 화면: 진입 시 날짜를 다음 정시로 미리 채움, 생성하기 버튼은 항상 활성표시 모델(AppointmentInfo,UpcomingAppointment,AppointmentListItem):date를Date로 변경카드 5곳(홈, 약속 목록, 마이페이지 알림, 약속 정보, 생성 확인): 날짜 "미정" 표시 제거 — 장소 "미정"은 유지목록 정렬 3곳:distantFuture/distantPast대체값 제거💬 리뷰 노트
약속 Firestore 구조
약속 API를 연결하기 전에 문서 구조를 먼저 확정했습니다. 이번 PR의 Repository 재편도 이 구조를 기준으로 했습니다.
participants는 문서에participantIDs로만 두고, 조회할 때users를in질의로 채웁니다.routes/{userID}하위 컬렉션으로 분리했습니다. 참여자마다 자기 경로만 쓰기 때문에 문서 하나를 여러 명이 동시에 수정하지 않도록 했습니다.서버(Functions)와 클라이언트의 처리 범위
createAppointment)joinAppointment(code))leaveAppointment)recursiveDelete로 약속 문서 + 하위 컬렉션 삭제Repository 구성과 실시간 리스너 위치
leaveAppointment,fetchMyAppointments(from:to:)(목록 4곳 공용),observeAppointment→AnyPublisher,saveMyRouteviewWillAppear마다 1회 조회약속 날짜 필수화
날짜 없는 약속은 목록 정렬과 라이브 액티비티 같은 시간 기반 기능에서 계속 예외 처리를 만들어서, 문서 단계에서 필수로 정했습니다.
date: Date?는 "변경하지 않음"이라는 의미라 그대로 두었습니다.추후 작업
약속 API 연결은 아래 순서로 PR을 나눌 예정입니다.