-
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.
Merge pull request #341 from Runnect/feature/feat-my-draw-course-shar…
…e-edit [FEAT] 보관함 / 내가 그린 코스 수정, 삭제, 공유 기능 구현
- Loading branch information
Showing
40 changed files
with
1,306 additions
and
836 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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/runnect/runnect/data/dto/request/RequestPatchMyDrawCourseTitle.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,10 @@ | ||
package com.runnect.runnect.data.dto.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestPatchMyDrawCourseTitle( | ||
@SerialName("title") | ||
val title: String | ||
) |
94 changes: 47 additions & 47 deletions
94
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseGetMyDrawDetail.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,61 +1,61 @@ | ||
package com.runnect.runnect.data.dto.response | ||
|
||
|
||
import com.runnect.runnect.domain.entity.MyDrawCourseDetail | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponseGetMyDrawDetail( | ||
@SerialName("data") | ||
val data: Data, | ||
@SerialName("message") | ||
val message: String, | ||
@SerialName("status") | ||
val status: Int, | ||
@SerialName("success") | ||
val success: Boolean, | ||
@SerialName("user") | ||
val user: User, | ||
@SerialName("course") | ||
val course: Course | ||
) { | ||
@Serializable | ||
data class Data( | ||
@SerialName("course") | ||
val course: Course, | ||
@SerialName("user") | ||
val user: User, | ||
) { | ||
data class User( | ||
@SerialName("userId") | ||
val id: Int, | ||
) | ||
|
||
@Serializable | ||
data class Course( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("isNowUser") | ||
val isNowUser: Boolean, | ||
@SerialName("createdAt") | ||
val createdAt: String, | ||
@SerialName("path") | ||
val path: List<List<Double>>, | ||
@SerialName("distance") | ||
val distance: Float, | ||
@SerialName("image") | ||
val image: String, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("departure") | ||
val departure: Departure, | ||
) { | ||
@Serializable | ||
data class User( | ||
@SerialName("userId") | ||
val id: Int, | ||
data class Departure( | ||
@SerialName("region") | ||
val region: String, | ||
@SerialName("city") | ||
val city: String, | ||
@SerialName("town") | ||
val town: String, | ||
@SerialName("name") | ||
val name: String?, | ||
) | ||
@Serializable | ||
data class Course( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("createdAt") | ||
val createdAt: String, | ||
@SerialName("path") | ||
val path: List<List<Double>>, | ||
@SerialName("distance") | ||
val distance: Float, | ||
@SerialName("image") | ||
val image: String, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("departure") | ||
val departure: Departure, | ||
) { | ||
@Serializable | ||
data class Departure( | ||
@SerialName("region") | ||
val region: String, | ||
@SerialName("city") | ||
val city: String, | ||
@SerialName("town") | ||
val town: String, | ||
@SerialName("name") | ||
val name: String, | ||
) | ||
} | ||
} | ||
|
||
fun toMyDrawCourseDetail() = MyDrawCourseDetail( | ||
title = course.title, | ||
imgUrl = course.image, | ||
isNowUser = course.isNowUser, | ||
distance = course.distance, | ||
courseId = course.id, | ||
path = course.path, | ||
departureName = course.departure.name | ||
) | ||
} |
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/runnect/runnect/data/dto/response/ResponsePatchMyDrawCourseTitle.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,23 @@ | ||
package com.runnect.runnect.data.dto.response | ||
|
||
import com.runnect.runnect.domain.entity.EditableMyDrawCourseDetail | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponsePatchMyDrawCourseTitle( | ||
@SerialName("course") | ||
val course: Course | ||
) { | ||
@Serializable | ||
data class Course( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("title") | ||
val title: String | ||
) | ||
|
||
fun toEditableMyDrawCourseDetail() = EditableMyDrawCourseDetail( | ||
title = course.title | ||
) | ||
} |
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
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/runnect/runnect/domain/entity/EditableMyDrawCourseDetail.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.runnect.runnect.domain.entity | ||
|
||
data class EditableMyDrawCourseDetail( | ||
val title: String | ||
) |
Oops, something went wrong.