-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat/#34]: Info Item과 Page api model 구현
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/umc/coumo/data/remote/model/request/RequestLocationModel.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,6 @@ | ||
package com.umc.coumo.data.remote.model.request | ||
|
||
data class RequestLocationModel( | ||
val longitude: Double = 127.028194, | ||
val latitude: Double = 37.498085 | ||
) |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/umc/coumo/data/remote/model/response/ResponsePopularStoreModel.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.umc.coumo.data.remote.model.response | ||
|
||
data class ResponsePopularStoreModel( | ||
val storeId: Int, | ||
val name: String, | ||
val location: String, | ||
val description: String, | ||
val storeImage: String | ||
) |
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,7 @@ | ||
package com.umc.coumo.domain.model | ||
|
||
enum class Status { | ||
SUCCESS, | ||
ERROR, | ||
LOADING | ||
} |
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.umc.coumo.utils | ||
|
||
import com.umc.coumo.domain.model.Status | ||
|
||
|
||
data class ApiResponse<out T>(val status: Status, val data: T?, val throwable: Throwable?) { | ||
companion object { | ||
fun <T> success(data: T): ApiResponse<T> = ApiResponse(Status.SUCCESS, data, null) | ||
fun <T> error(throwable: Throwable): ApiResponse<T> = ApiResponse(Status.ERROR, null, throwable) | ||
fun <T> loading(data: T? = null): ApiResponse<T> = ApiResponse(Status.LOADING, data, null) | ||
} | ||
} |