-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEAT/#73] 여행 대시 보드 뷰 / 서버 통신 구현 #83
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a5d69c9
[FEAT/#73] DTO 설정 및 코드 수정
leeeyubin 12bc5f6
[MOD/#73] 코드 수정
leeeyubin 832cd4b
[MOD/#73] 서버통신 로직 구현
leeeyubin 140478d
[MOD/#73] 여행 대시 보드 ViewModel 구현
leeeyubin a7c1526
[FEAT/#73] 진행 중인 여행 서버통신 구현
leeeyubin f2f845e
[FEAT/#73] 진행 중인 여행 서버통신 구현
leeeyubin f633066
[FEAT/#73] 지나간 여행 서버통신 구현
leeeyubin 8333877
[FEAT/#73] 지나간 여행 서버통신 구현
leeeyubin b2c86da
[FEAT/#73] 여행자 이름 서비통신 구현
leeeyubin 48e7291
[FEAT/#73] UiState가 Empty일 때의 상태 구현
leeeyubin 1c62950
[MOD/#73] 코드 수정
leeeyubin 0348fe8
[FIX/#73] 코드리뷰 반영
leeeyubin c9c0354
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
leeeyubin 5a756eb
[FIX/#73] 코드리뷰 반영
leeeyubin 100c0e2
[FIX/#73] 코드리뷰 반영
leeeyubin 992a39d
[FIX/#73] 코드리뷰 반영
leeeyubin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/going/data/datasource/DashBoardDataSource.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,12 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.DashBoardResponseDto | ||
|
||
interface DashBoardDataSource { | ||
|
||
suspend fun getTripList( | ||
progress: String | ||
): BaseResponse<DashBoardResponseDto> | ||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
data/src/main/java/com/going/data/datasourceImpl/DashBoardDataSourceImpl.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,16 @@ | ||
package com.going.data.datasourceImpl | ||
|
||
import com.going.data.datasource.DashBoardDataSource | ||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.DashBoardResponseDto | ||
import com.going.data.service.DashBoardService | ||
import javax.inject.Inject | ||
|
||
class DashBoardDataSourceImpl @Inject constructor( | ||
private val dashBoardService: DashBoardService | ||
) : DashBoardDataSource { | ||
|
||
override suspend fun getTripList(progress: String): BaseResponse<DashBoardResponseDto> = | ||
dashBoardService.getTripList(progress) | ||
|
||
} |
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
37 changes: 37 additions & 0 deletions
37
data/src/main/java/com/going/data/dto/response/DashBoardResponseDto.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,37 @@ | ||
package com.going.data.dto.response | ||
|
||
import com.going.domain.entity.response.DashBoardModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class DashBoardResponseDto( | ||
@SerialName("name") | ||
val name: String, | ||
@SerialName("trips") | ||
val trips: List<TripsResponseDto> | ||
|
||
) { | ||
@Serializable | ||
data class TripsResponseDto( | ||
@SerialName("tripId") | ||
val tripId: Long, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("startDate") | ||
val startDate: String, | ||
@SerialName("endDate") | ||
val endDate: String, | ||
@SerialName("day") | ||
val day: Int | ||
) { | ||
fun toTripsModel() = | ||
DashBoardModel.DashBoardTripModel(tripId, title, startDate, endDate, day) | ||
} | ||
|
||
fun toDashBoardModel() = | ||
DashBoardModel(name, trips.map { | ||
it.toTripsModel() | ||
}) | ||
} | ||
|
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
19 changes: 19 additions & 0 deletions
19
data/src/main/java/com/going/data/repositoryImpl/DashBoardRepositoryImpl.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,19 @@ | ||
package com.going.data.repositoryImpl | ||
|
||
import com.going.data.datasource.DashBoardDataSource | ||
import com.going.domain.entity.response.DashBoardModel | ||
import com.going.domain.repository.DashBoardRepository | ||
import javax.inject.Inject | ||
|
||
class DashBoardRepositoryImpl @Inject constructor( | ||
private val dashBoardSource: DashBoardDataSource | ||
) : DashBoardRepository { | ||
|
||
override suspend fun getDashBoardList( | ||
progress: String | ||
): Result<DashBoardModel> = | ||
runCatching { | ||
dashBoardSource.getTripList(progress).data.toDashBoardModel() | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
data/src/main/java/com/going/data/service/DashBoardService.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,15 @@ | ||
package com.going.data.service | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.DashBoardResponseDto | ||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
|
||
interface DashBoardService { | ||
|
||
@GET("api/trips") | ||
suspend fun getTripList( | ||
@Query("progress") progress: String | ||
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. 조아요 쿼리 |
||
) : BaseResponse<DashBoardResponseDto> | ||
|
||
} |
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
7 changes: 0 additions & 7 deletions
7
domain/src/main/kotlin/com/going/domain/entity/response/CompletedListModel.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
domain/src/main/kotlin/com/going/domain/entity/response/DashBoardModel.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.going.domain.entity.response | ||
|
||
data class DashBoardModel( | ||
val name: String, | ||
val trips: List<DashBoardTripModel> | ||
){ | ||
data class DashBoardTripModel( | ||
val tripId: Long, | ||
val title: String, | ||
val startDate: String, | ||
val endDate: String, | ||
val day: Int | ||
) | ||
} |
8 changes: 0 additions & 8 deletions
8
domain/src/main/kotlin/com/going/domain/entity/response/OngoingListModel.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
domain/src/main/kotlin/com/going/domain/repository/DashBoardRepository.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,9 @@ | ||
package com.going.domain.repository | ||
|
||
import com.going.domain.entity.response.DashBoardModel | ||
|
||
interface DashBoardRepository { | ||
suspend fun getDashBoardList( | ||
progress : String, | ||
) : Result<DashBoardModel> | ||
} |
Oops, something went wrong.
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.
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.
여기도...ㅎㅎ