-
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]/#92 여행 입장 뷰 / 서버통신 구현 #104
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0f1d11b
[FEAT/#92] datasource 구현 완료
crownjoe 8564717
[FEAT/#92] repository 구현 완료
crownjoe e2e127a
[FEAT/#92] Dto 구현 완료
crownjoe 6e4d663
[FEAT/#92] entity response, request 구현 완료
crownjoe 264c601
[FEAT/#92] 레이어 분리
crownjoe 9eb59bf
[FEAT/#92] 코드 수정
crownjoe 2db4aaf
[FEAT/#92] 코드 수정
crownjoe 3185df6
[FEAT/#92] 여행 입장 presentation API 구현
crownjoe d7f09d7
[FEAT/#92] 여행 입장 data API 구현
crownjoe c07f25b
[FEAT/#92] 여행 입장 API 구현 완료
crownjoe 34648d2
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
crownjoe 84fd9d5
[FEAT/#92] 코드리뷰 반영 수정
crownjoe 1fb576b
[FEAT/#92] 패키징 수정
crownjoe 14f8953
[FEAT/#92] 코리 반영 수정
crownjoe 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
15 changes: 15 additions & 0 deletions
15
data/src/main/java/com/going/data/datasource/StartInviteTripDataSource.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.datasource | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.StartInviteTripRequestDto | ||
import com.going.data.dto.response.StartInviteTripResponseDto | ||
import retrofit2.http.Body | ||
import retrofit2.http.Path | ||
|
||
interface StartInviteTripDataSource { | ||
|
||
suspend fun postStartInviteTrip( | ||
@Path("tripId") tripId: Long, | ||
@Body request: StartInviteTripRequestDto, | ||
): BaseResponse<StartInviteTripResponseDto> | ||
} |
19 changes: 19 additions & 0 deletions
19
data/src/main/java/com/going/data/datasourceImpl/StartInviteTripDataSourceImpl.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.datasourceImpl | ||
|
||
import com.going.data.datasource.StartInviteTripDataSource | ||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.StartInviteTripRequestDto | ||
import com.going.data.dto.response.StartInviteTripResponseDto | ||
import com.going.data.service.StartInviteTripService | ||
import javax.inject.Inject | ||
|
||
class StartInviteTripDataSourceImpl @Inject constructor( | ||
private val startInviteTripService: StartInviteTripService, | ||
) : StartInviteTripDataSource { | ||
|
||
override suspend fun postStartInviteTrip( | ||
tripId: Long, | ||
request: StartInviteTripRequestDto | ||
): BaseResponse<StartInviteTripResponseDto> = | ||
startInviteTripService.postStartInviteTrip(tripId, request) | ||
} |
22 changes: 22 additions & 0 deletions
22
data/src/main/java/com/going/data/dto/request/StartInviteTripRequestDto.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,22 @@ | ||
package com.going.data.dto.request | ||
|
||
import com.going.domain.entity.request.StartInviteTripRequestModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
class StartInviteTripRequestDto( | ||
@SerialName("styleA") | ||
val styleA: Int, | ||
@SerialName("styleB") | ||
val styleB: Int, | ||
@SerialName("styleC") | ||
val styleC: Int, | ||
@SerialName("styleD") | ||
val styleD: Int, | ||
@SerialName("styleE") | ||
val styleE: Int, | ||
) | ||
|
||
fun StartInviteTripRequestModel.toStartInviteTripRequestDto(): StartInviteTripRequestDto = | ||
StartInviteTripRequestDto(styleA, styleB, styleC, styleD, styleE) |
14 changes: 14 additions & 0 deletions
14
data/src/main/java/com/going/data/dto/response/StartInviteTripResponseDto.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.data.dto.response | ||
|
||
import com.going.domain.entity.response.StartInviteTripModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
class StartInviteTripResponseDto ( | ||
@SerialName("tripId") | ||
val tripId: Long, | ||
){ | ||
fun toStartInviteTripModel() = | ||
StartInviteTripModel(tripId) | ||
} |
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
24 changes: 24 additions & 0 deletions
24
data/src/main/java/com/going/data/repositoryImpl/StartInviteTripRepositoryImpl.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,24 @@ | ||
package com.going.data.repositoryImpl | ||
|
||
import com.going.data.datasource.StartInviteTripDataSource | ||
import com.going.data.dto.request.toStartInviteTripRequestDto | ||
import com.going.domain.entity.request.StartInviteTripRequestModel | ||
import com.going.domain.entity.response.StartInviteTripModel | ||
import com.going.domain.repository.StartInviteTripRepository | ||
import javax.inject.Inject | ||
|
||
class StartInviteTripRepositoryImpl @Inject constructor( | ||
private val startInviteTripDataSource: StartInviteTripDataSource | ||
) : StartInviteTripRepository { | ||
|
||
override suspend fun postStartInviteTrip( | ||
tripId: Long, | ||
requestStartInviteTripModel: StartInviteTripRequestModel | ||
): Result<StartInviteTripModel> = | ||
runCatching { | ||
startInviteTripDataSource.postStartInviteTrip( | ||
tripId, requestStartInviteTripModel.toStartInviteTripRequestDto(), | ||
).data.toStartInviteTripModel() | ||
} | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
data/src/main/java/com/going/data/service/StartInviteTripService.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.service | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.StartInviteTripRequestDto | ||
import com.going.data.dto.response.StartInviteTripResponseDto | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
import retrofit2.http.Path | ||
|
||
interface StartInviteTripService { | ||
@POST("/api/trips/{tripId}/entry") | ||
suspend fun postStartInviteTrip( | ||
@Path("tripId") tripId: Long, | ||
@Body request: StartInviteTripRequestDto, | ||
): BaseResponse<StartInviteTripResponseDto> | ||
} |
9 changes: 9 additions & 0 deletions
9
domain/src/main/kotlin/com/going/domain/entity/request/StartInviteTripRequestModel.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.entity.request | ||
|
||
data class StartInviteTripRequestModel( | ||
val styleA: Int, | ||
val styleB: Int, | ||
val styleC: Int, | ||
val styleD: Int, | ||
val styleE: Int, | ||
) |
5 changes: 5 additions & 0 deletions
5
domain/src/main/kotlin/com/going/domain/entity/response/StartInviteTripModel.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,5 @@ | ||
package com.going.domain.entity.response | ||
|
||
data class StartInviteTripModel( | ||
val tripId: Long, | ||
) |
11 changes: 11 additions & 0 deletions
11
domain/src/main/kotlin/com/going/domain/repository/StartInviteTripRepository.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,11 @@ | ||
package com.going.domain.repository | ||
|
||
import com.going.domain.entity.request.StartInviteTripRequestModel | ||
import com.going.domain.entity.response.StartInviteTripModel | ||
|
||
interface StartInviteTripRepository { | ||
suspend fun postStartInviteTrip( | ||
tripId: Long, | ||
requestStartInviteTripModel: StartInviteTripRequestModel | ||
): Result<StartInviteTripModel> | ||
} |
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
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.
요것도 다른 엑스트라처럼 모아서 const val로 설정해주시면 좋을듯 ~