-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor#186] 탐색 기본 뷰 / 리팩토링 #190
Changes from 5 commits
2dfda7e
c45f472
9532e72
72d2114
26bc27d
d96e173
2a35377
13d3a67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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, | ||
) | ||
} | ||
} |
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 | ||
) | ||
} | ||
} |
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>> | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NavHostController는 SearchRoute까지 호이스팅하거나 유빈이 코드처럼 아예 Navigation 파일로 호이스팅하는게 좋을 것 같아요!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네엡 감사합니당~!!! 바로 수정해볼게욤 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.terning.feature.search.search.model | ||
|
||
import com.terning.domain.entity.response.InternshipAnnouncementModel | ||
import com.terning.domain.entity.search.SearchPopularAnnouncement | ||
import com.terning.core.state.UiState | ||
|
||
data class SearchScrapsListState( | ||
var searchScrapsList: UiState<List<InternshipAnnouncementModel>> = UiState.Loading, | ||
var searchScrapsList: UiState<List<SearchPopularAnnouncement>> = UiState.Loading, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.terning.feature.search.search.model | ||
|
||
import com.terning.domain.entity.response.InternshipAnnouncementModel | ||
import com.terning.domain.entity.search.SearchPopularAnnouncement | ||
import com.terning.core.state.UiState | ||
|
||
data class SearchViewsListState( | ||
var searchViewsList: UiState<List<InternshipAnnouncementModel>> = UiState.Loading, | ||
var searchViewsList: UiState<List<SearchPopularAnnouncement>> = UiState.Loading, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 지금 사용되는 내용이 아니라면 삭제해주면 좋을 것 같아요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
섬세하시닷!~