-
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.
Merge branch 'develop' into feat/#81-splash-api
- Loading branch information
Showing
104 changed files
with
2,010 additions
and
583 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.going.ui.extension | ||
|
||
enum class EnumUiState { | ||
SUCCESS, FAILURE, LOADING, EMPTY | ||
LOADING, SUCCESS, FAILURE, EMPTY | ||
} |
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> | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/going/data/datasource/EnterTripDataSource.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.request.EnterTripRequestDto | ||
import com.going.data.dto.response.EnterTripResponseDto | ||
import retrofit2.http.Body | ||
|
||
interface EnterTripDataSource { | ||
suspend fun postEnterTrip( | ||
@Body request: EnterTripRequestDto, | ||
): BaseResponse<EnterTripResponseDto> | ||
} |
29 changes: 28 additions & 1 deletion
29
data/src/main/java/com/going/data/datasource/TodoDataSource.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,13 +1,40 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.request.TodoCreateRequestDto | ||
import com.going.data.dto.response.MyTripInfoResponseDto | ||
import com.going.data.dto.response.OurTripInfoResponseDto | ||
import com.going.data.dto.response.TodoDetailResponseDto | ||
import com.going.data.dto.response.TodoResponseDto | ||
|
||
interface TodoDataSource { | ||
|
||
suspend fun getTodoListData( | ||
tripId: Long, | ||
category: String, | ||
progress: String, | ||
progress: String | ||
): BaseResponse<List<TodoResponseDto>> | ||
|
||
suspend fun postToCreateTodoData( | ||
tripId: Long, | ||
request: TodoCreateRequestDto | ||
): NonDataBaseResponse | ||
|
||
suspend fun deleteTodoData( | ||
todoId: Long | ||
): NonDataBaseResponse | ||
|
||
suspend fun getTodoDetailData( | ||
todoId: Long | ||
): BaseResponse<TodoDetailResponseDto> | ||
|
||
suspend fun getMyTripInfo( | ||
tripId: Long | ||
): BaseResponse<MyTripInfoResponseDto> | ||
|
||
suspend fun getOurTripInfo( | ||
tripId: Long | ||
): BaseResponse<OurTripInfoResponseDto> | ||
|
||
} |
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) | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
data/src/main/java/com/going/data/datasourceImpl/EnterTripDataSourceImpl.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,17 @@ | ||
package com.going.data.datasourceImpl | ||
|
||
import com.going.data.datasource.EnterTripDataSource | ||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.EnterTripRequestDto | ||
import com.going.data.dto.response.EnterTripResponseDto | ||
import com.going.data.service.EnterTripService | ||
import javax.inject.Inject | ||
|
||
class EnterTripDataSourceImpl @Inject constructor( | ||
private val enterTripService: EnterTripService, | ||
) : EnterTripDataSource { | ||
override suspend fun postEnterTrip( | ||
code: EnterTripRequestDto | ||
): BaseResponse<EnterTripResponseDto> = | ||
enterTripService.postEnterTrip(code) | ||
} |
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/dto/request/EnterTripRequestDto.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.dto.request | ||
|
||
import com.going.domain.entity.request.EnterTripRequestModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class EnterTripRequestDto( | ||
@SerialName("code") | ||
val code: String, | ||
) | ||
|
||
fun EnterTripRequestModel.toEnterTripRequestDto(): EnterTripRequestDto = | ||
EnterTripRequestDto(code) | ||
|
22 changes: 22 additions & 0 deletions
22
data/src/main/java/com/going/data/dto/request/TodoCreateRequestDto.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.TodoCreateRequestModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class TodoCreateRequestDto( | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("endDate") | ||
val endDate: String, | ||
@SerialName("allocators") | ||
val allocators: List<Long>, | ||
@SerialName("memo") | ||
val memo: String?, | ||
@SerialName("secret") | ||
val secret: Boolean | ||
) | ||
|
||
fun TodoCreateRequestModel.toTodoCreateRequestDto(): TodoCreateRequestDto = | ||
TodoCreateRequestDto(title, endDate, allocators, memo, secret) |
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() | ||
}) | ||
} | ||
|
Oops, something went wrong.