-
Notifications
You must be signed in to change notification settings - Fork 0
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 #369 from 6QuizOnTheBlock/and/feat#364-group_mapping
And/feat#364 group mapping
- Loading branch information
Showing
22 changed files
with
440 additions
and
88 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
14 changes: 14 additions & 0 deletions
14
android/data/src/main/java/com/sixkids/data/model/response/GroupMatchingSuccessResponse.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.sixkids.data.model.response | ||
|
||
import com.sixkids.model.ChallengeGroup | ||
|
||
data class GroupMatchingSuccessResponse( | ||
val members: List<MemberSimpleResponse>, | ||
val headCount: Int | ||
) | ||
|
||
internal fun GroupMatchingSuccessResponse.toModel(): ChallengeGroup = | ||
ChallengeGroup( | ||
headCount = headCount, | ||
memberList = members.map { it.toModel() } | ||
) |
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
17 changes: 17 additions & 0 deletions
17
android/domain/src/main/java/com/sixkids/domain/usecase/group/GetMatchingGroupUseCase.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.sixkids.domain.usecase.group | ||
|
||
import com.sixkids.domain.repository.GroupRepository | ||
import javax.inject.Inject | ||
|
||
class GetMatchingGroupUseCase @Inject constructor( | ||
private val groupRepository: GroupRepository | ||
) { | ||
suspend operator fun invoke( | ||
organizationId: Long, | ||
minCount: Int, | ||
matchingType: String, | ||
members: List<Long> | ||
) = runCatching { | ||
groupRepository.getMatchingGroup(organizationId, minCount, matchingType, members) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -26,6 +26,6 @@ enum class ChallengeCreateStep { | |
INFO, | ||
GROUP_TYPE, | ||
MATCHING_TYPE, | ||
CREATE, | ||
MATCHING_SUCCESS, | ||
RESULT, | ||
} |
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.