Skip to content

Refactor/afternote architecture#126

Merged
1hyok merged 12 commits intomainfrom
refactor/afternote-architecture
Mar 22, 2026
Merged

Refactor/afternote architecture#126
1hyok merged 12 commits intomainfrom
refactor/afternote-architecture

Conversation

@1hyok
Copy link
Copy Markdown
Collaborator

@1hyok 1hyok commented Mar 22, 2026

#️⃣연관된 이슈

ex) #이슈번호, #이슈번호

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

스크린샷 (선택)

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

1hyok added 12 commits March 20, 2026 13:58
- `AfternoteRepository`의 생성 및 수정 메서드 파라미터를 `Input` 객체로 통합
- `AfternoteUpdateRequestInput` → `UpdateRequestInput`, `AfternotePlaylistInput` → `PlaylistInput` 등 도메인 모델 명칭 간소화
- `CreateSocialInput`, `CreateGalleryInput` 등 신규 Input 모델 추가
- 컨벤션 관련 문서 위치 변경 (`docs/` → `docs/conventions/`)
- `AfternoteEditViewModel` 내 저장 로직 리팩토링 및 예외 처리 구문 개선
- BaseResponse, requireData, requireStatus의 패키지 경로 수정 (com.kuit.afternote.data -> com.kuit.afternote.data.dto.response)
- 패키지 이동에 따른 프로젝트 내 참조 임포트 경로 업데이트
- AfternoteDetail -> Detail
- AfternoteDetailReceiver -> DetailReceiver
- AfternoteItem -> Item
- AfternoteAccount -> Account
- AfternoteProcessingMethod -> ProcessingMethod
- AfternotePlaylistDetail -> PlaylistDetail
- AfternoteDetailSong -> DetailSong
- 도메인 모델 이름 변경에 따른 Repository, UseCase, Mapper, ViewModel 및 UI 관련 클래스 전반의 참조 업데이트 및 리팩토링 수행
- 도메인 레이어에서 사용할 `SearchedSong` 모델 정의
- `MusicSearchRepository` 및 `SearchMusicUseCase`의 반환 타입을 `PlaylistSongDisplay`에서 `SearchedSong`으로 변경
- UI 레이어에서 사용할 `SongMapper` 추가 및 `AddSongViewModel`에 적용
- 음악 검색 관련 Service, Repository, DTO 클래스들을 feature/afternote 패키지로 이동
- 패키지 구조 변경에 따른 DI 모듈 및 UseCase 임포트 경로 수정
- `GetAfternotesUseCase` 및 `AfternoteRepository`의 조회 매개변수를 `GetAfternotesInput`으로 통합
- `CreatePlaylistAfternoteUseCase` 및 `AfternoteRepository`의 생성 매개변수를 `CreatePlaylistInput`으로 통합
- 매개변수 구조 변경에 따른 ViewModel 및 테스트 코드 수정
- `GetAfternotesInput` 및 `CreatePlaylistInput` 데이터 클래스 추가
- AfternoteMapper object를 제거하고 Kotlin 확장 함수(Extension Functions) 형태로 전환
- AfternoteRepositoryImpl에서 변경된 확장 함수를 사용하도록 수정
- Detail 도메인 매핑 로직의 가독성 개선을 위해 내부 구조 정리 및 리팩토링
- `AfternoteMapper.kt`에 집중되어 있던 매퍼 함수들을 역할에 따라 분리
- `PlaylistInputMapper.kt`: 플레이리스트 입력 관련 DTO 변환 로직 추가
- `ResponseMapper.kt`: API 응답값에 대한 도메인 모델 변환 로직 이동 및 가독성 개선
- `AfternoteInputMapper.kt`: 중복된 DTO 변환 로직 제거
- `formatDateFromServer` 함수 접근 제어자를 `internal`로 변경하여 공유 가능하도록 수정
- `ResponseMapper.kt`를 삭제하고 `DetailResponseMapper.kt`와 `ListResponseMapper.kt`로 분리
- `DetailResponseMapper` 내 복잡한 변환 로직을 도메인 모델별 확장 함수 및 private 함수로 분할하여 가독성 향상
- `AfternoteMapper.kt`의 날짜 포맷팅 함수 파라미터명 변경 및 `updatedAt` 매핑 오류 수정
- 파일 분리에 따른 `AfternoteRepositoryImpl.kt`의 import 경로 수정
- `CreateSocialInput`, `CreateGalleryInput`, `CreatePlaylistInput`에 DTO 요청 객체로 변환하는 `toRequest()` 확장 함수 추가
- `AfternoteRepositoryImpl`에서 직접 요청 객체를 생성하던 로직을 도메인 모델의 `toRequest()` 호출로 간결화
- `PlaylistInputMapper`, `AfternoteInputMapper`, `DetailResponseMapper` 내부 변환 함수들을 `private`으로 캡슐화하고 리스트 변환 로직 개선
- `AfternoteRepositoryImpl`의 `updateAfternote` 로직 가독성 개선 및 로그 출력 구조 변경
- `PhotoUploadRepositoryModule.kt` 파일을 `com.kuit.afternote.data.di`에서 `com.kuit.afternote.di`로 이동
- 파일 이동에 따른 패키지 경로 선언 수정
@1hyok 1hyok merged commit cb925ae into main Mar 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant