-
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 #284 from Runnect/feature/refactor-course-discover…
…-screen [REFACTOR] 코스 발견 / 전면 리팩토링
- Loading branch information
Showing
182 changed files
with
2,906 additions
and
1,965 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
7 changes: 0 additions & 7 deletions
7
app/src/main/java/com/runnect/runnect/data/dto/DiscoverPromotionItemDTO.kt
This file was deleted.
Oops, something went wrong.
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
4 changes: 3 additions & 1 deletion
4
...data/dto/request/RequestUpdateNickName.kt → .../data/dto/request/RequestPatchNickName.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,8 +1,10 @@ | ||
package com.runnect.runnect.data.dto.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestUpdateNickName( | ||
data class RequestPatchNickName( | ||
@SerialName("nickname") | ||
val nickname: 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
8 changes: 6 additions & 2 deletions
8
...ct/data/dto/request/RequestCourseScrap.kt → ...ata/dto/request/RequestPostCourseScrap.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,8 +1,12 @@ | ||
package com.runnect.runnect.data.dto.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestCourseScrap( | ||
data class RequestPostCourseScrap( | ||
@SerialName("publicCourseId") | ||
val publicCourseId: Int, | ||
@SerialName("scrapTF") | ||
val scrapTF: String | ||
) | ||
) |
6 changes: 2 additions & 4 deletions
6
.../runnect/data/dto/request/RequestLogin.kt → ...nect/data/dto/request/RequestPostLogin.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,14 +1,12 @@ | ||
package com.runnect.runnect.data.dto.request | ||
|
||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestLogin( | ||
data class RequestPostLogin( | ||
@SerialName("token") | ||
val token: String?, | ||
|
||
@SerialName("provider") | ||
val provider: 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
3 changes: 1 addition & 2 deletions
3
.../data/dto/request/RequestPostRecordDTO.kt → .../dto/request/RequestPostRunningHistory.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
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
9 changes: 0 additions & 9 deletions
9
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseCourseScrap.kt
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseCourseSearch.kt
This file was deleted.
Oops, something went wrong.
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
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseGetDiscoverMarathon.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,46 @@ | ||
package com.runnect.runnect.data.dto.response | ||
|
||
import com.runnect.runnect.domain.entity.DiscoverMultiViewItem | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponseGetDiscoverMarathon( | ||
@SerialName("marathonPublicCourses") | ||
val marathonPublicCourses: List<PublicCourse> | ||
) { | ||
@Serializable | ||
data class PublicCourse( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("courseId") | ||
val courseId: Int, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("image") | ||
val image: String, | ||
@SerialName("scrap") | ||
val scrap: Boolean, | ||
@SerialName("departure") | ||
val departure: Departure | ||
) { | ||
@Serializable | ||
data class Departure( | ||
@SerialName("city") | ||
val city: String, | ||
@SerialName("region") | ||
val region: String | ||
) | ||
} | ||
|
||
fun toMarathonCourses(): List<DiscoverMultiViewItem.MarathonCourse> = marathonPublicCourses.map { course -> | ||
DiscoverMultiViewItem.MarathonCourse( | ||
id = course.id, | ||
courseId = course.courseId, | ||
title = course.title, | ||
image = course.image, | ||
scrap = course.scrap, | ||
departure = "${course.departure.region} ${course.departure.city}" | ||
) | ||
} | ||
} |
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
48 changes: 48 additions & 0 deletions
48
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseGetDiscoverRecommend.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,48 @@ | ||
package com.runnect.runnect.data.dto.response | ||
|
||
import com.runnect.runnect.domain.entity.DiscoverMultiViewItem | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponseGetDiscoverRecommend( | ||
@SerialName("ordering") | ||
val ordering: String, | ||
@SerialName("publicCourses") | ||
val publicCourses: List<PublicCourse> | ||
) { | ||
@Serializable | ||
data class PublicCourse( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("courseId") | ||
val courseId: Int, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("image") | ||
val image: String, | ||
@SerialName("scrap") | ||
val scrap: Boolean, | ||
@SerialName("departure") | ||
val departure: Departure | ||
) { | ||
@Serializable | ||
data class Departure( | ||
@SerialName("city") | ||
val city: String, | ||
@SerialName("region") | ||
val region: String | ||
) | ||
} | ||
|
||
fun toRecommendCourses(): List<DiscoverMultiViewItem.RecommendCourse> = publicCourses.map { course -> | ||
DiscoverMultiViewItem.RecommendCourse( | ||
id = course.id, | ||
courseId = course.courseId, | ||
title = course.title, | ||
image = course.image, | ||
scrap = course.scrap, | ||
departure = "${course.departure.region} ${course.departure.city}" | ||
) | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/runnect/runnect/data/dto/response/ResponseGetDiscoverSearch.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,35 @@ | ||
package com.runnect.runnect.data.dto.response | ||
import com.runnect.runnect.domain.entity.DiscoverSearchCourse | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponseGetDiscoverSearch( | ||
val publicCourses: List<PublicCourse> | ||
) { | ||
@Serializable | ||
data class PublicCourse( | ||
val id: Int, | ||
val courseId: Int, | ||
val title: String, | ||
val image: String, | ||
val scrap: Boolean, | ||
val departure: Departure, | ||
) | ||
|
||
@Serializable | ||
data class Departure( | ||
val city: String, | ||
val region: String | ||
) | ||
|
||
fun toDiscoverSearchCourses(): List<DiscoverSearchCourse> = publicCourses.map { course -> | ||
DiscoverSearchCourse( | ||
id = course.id, | ||
courseId = course.courseId, | ||
title = course.title, | ||
image = course.image, | ||
scrap = course.scrap, | ||
departure = "${course.departure.region} ${course.departure.city}" | ||
) | ||
} | ||
} |
Oops, something went wrong.