Merged
Conversation
- RecordHealthData, HeartRateSample 엔티티 및 리포지토리 추가
- POST /api/record/{recordId}/health (건강 데이터 저장)
- GET /api/record/{recordId}/health (건강 데이터 상세 조회)
- GET /api/health/summary (기간별 건강 통계)
- DELETE /api/record/{recordId}/health (건강 데이터 삭제)
- GET /api/record/user 응답에 healthData 필드 추가 (하위 호환)
0b49d4e to
0aa0b35
Compare
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.
🔨 무슨 이슈인가요?
iOS v2.5.0에서 Apple Watch 건강 데이터를 서버에 저장/조회하는 기능 추가하려고 API 추가로 뚫었습니다
🛠 어떻게 이슈를 해결했나요?
새 테이블 (기존 테이블 변경 없음)
record_health_data: 러닝 기록 1건당 건강 데이터 요약 (1:0..1)heart_rate_samples: 5초 간격 심박수 시계열 데이터 (1:N)새 API (4개)
/api/record/{recordId}/health/api/record/{recordId}/health/api/health/summary?startDate=&endDate=/api/record/{recordId}/health기존 API 확장 (1개)
GET /api/record/user응답에healthData(avgHeartRate, calories) 필드 추가healthData: null→ 기존 앱 정상 동작설계 원칙
파일 구조
ON DELETE CASCADE정상 동작GET /api/record/{recordId}/health에서 건강 데이터 없으면 200 + null 반환 (404 아님)maxHeartRateConfig미전송 시 기본값 190 적용 (서비스 레이어에서 처리)endDate + 1일 00:00:00미만으로 처리