-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor/#186] 탐색 기본 뷰 / 리팩토링
- Loading branch information
Showing
22 changed files
with
118 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
31 changes: 0 additions & 31 deletions
31
data/src/main/java/com/terning/data/dto/response/SearchViewsResponseDto.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
data/src/main/java/com/terning/data/mapper/search/SearchAnnouncementListMapper.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.terning.data.mapper.search | ||
|
||
import com.terning.data.dto.response.SearchAnnouncementResponseDto | ||
import com.terning.domain.entity.search.SearchPopularAnnouncement | ||
|
||
fun SearchAnnouncementResponseDto.toSearchPopularAnnouncementList(): List<SearchPopularAnnouncement> { | ||
return announcements.map { | ||
SearchPopularAnnouncement( | ||
announcementId = it.internshipAnnouncementId, | ||
companyImage = it.companyImage, | ||
title = it.title, | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
data/src/main/java/com/terning/data/mapper/search/SearchResultMapper.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.terning.data.mapper.search | ||
|
||
import com.terning.data.dto.response.SearchResultResponseDto | ||
import com.terning.domain.entity.search.SearchResult | ||
|
||
|
||
fun SearchResultResponseDto.toSearchResultList(): List<SearchResult> { | ||
return announcements.map { | ||
SearchResult( | ||
internshipAnnouncementId = it.internshipAnnouncementId, | ||
title = it.title, | ||
dDay = it.dDay, | ||
workingPeriod = it.workingPeriod, | ||
companyImage = it.companyImage, | ||
scrapId = it.scrapId, | ||
deadline = it.deadline, | ||
startYearMonth = it.startYearMonth, | ||
color = it.color | ||
) | ||
} | ||
} |
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
...y/response/InternshipAnnouncementModel.kt → ...ntity/search/SearchPopularAnnouncement.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
...main/entity/response/SearchResultModel.kt → ...ning/domain/entity/search/SearchResult.kt
This file contains 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
10 changes: 5 additions & 5 deletions
10
domain/src/main/java/com/terning/domain/repository/SearchRepository.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.terning.domain.repository | ||
|
||
import com.terning.domain.entity.response.SearchResultModel | ||
import com.terning.domain.entity.response.InternshipAnnouncementModel | ||
import com.terning.domain.entity.search.SearchResult | ||
import com.terning.domain.entity.search.SearchPopularAnnouncement | ||
|
||
interface SearchRepository { | ||
suspend fun getSearchList( | ||
query: String, | ||
sortBy: String, | ||
page: Int, | ||
size: Int, | ||
): Result<List<SearchResultModel>> | ||
suspend fun getSearchViewsList(): Result<List<InternshipAnnouncementModel>> | ||
suspend fun getSearchScrapsList(): Result<List<InternshipAnnouncementModel>> | ||
): Result<List<SearchResult>> | ||
suspend fun getSearchViewsList(): Result<List<SearchPopularAnnouncement>> | ||
suspend fun getSearchScrapsList(): Result<List<SearchPopularAnnouncement>> | ||
} |
This file contains 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
Oops, something went wrong.