[BE-27] 응답 DTO 확장 (PostResponse·PostDetailResponse에 communityId·sportCategory)
작업 내용 (설계 의도)
변경 사항
근거 TDD: 20260707-post-community-연동-tdd.md API 계약 / FR-1.
PostResponse(presentation/post/dto/response/PostResponse.kt)·PostDetailResponse(PostDetailResponse.kt)에 communityId: Long?·sportCategory: SportCategory?(공유 커널) 필드를 추가하고 of(post)에서 post.currentCommunityId·post.currentSportCategory를 매핑한다. FR-1 “어느 모임 게시글인지 식별” 충족. additive라 하위호환(기존 FE는 신규 필드 무시).
롤백
필드 additive.
의존
- BE-23 (Post 필드 노출)
- BE-20 (SportCategory in common)
다이어그램
클래스 의존
flowchart LR Post -->|of| PostResponse Post -->|of| PostDetailResponse PostResponse -->|communityId·sportCategory| FE[클라이언트]
테스트 케이스
- 모임 게시글 응답에 communityId·sportCategory가 채워진다
- 전역 게시글 응답에 communityId=null·sportCategory=null이 포함된다(하위호환)
- PostDetailResponse가 댓글과 함께 신규 필드를 함께 반환한다