-
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 pull request #96 from team-JMT/feat/search_group
그룹 검색 기능 일부 구현
- Loading branch information
Showing
14 changed files
with
133 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.gdsc.data.database | ||
|
||
import org.gdsc.domain.model.GroupPreview | ||
|
||
data class GroupPaging( | ||
val groupList: List<GroupPreview>, | ||
val page: Page | ||
) |
3 changes: 3 additions & 0 deletions
3
data/src/main/java/org/gdsc/data/datasource/GroupDataSource.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,10 +1,13 @@ | ||
package org.gdsc.data.datasource | ||
|
||
import org.gdsc.domain.model.GroupPreview | ||
import org.gdsc.domain.model.response.Group | ||
|
||
|
||
interface GroupDataSource { | ||
suspend fun getMyGroups(): List<Group> | ||
|
||
suspend fun selectGroup(groupId: Int): String | ||
|
||
suspend fun searchGroup(keyword: String, limitCount: Int): List<GroupPreview> | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.gdsc.domain.model | ||
|
||
data class GroupPreview( | ||
val groupId: Int, | ||
val groupIntroduce: String, | ||
val groupName: String, | ||
val memberCnt: Int, | ||
val restaurantCnt: Int | ||
) |
5 changes: 5 additions & 0 deletions
5
domain/src/main/java/org/gdsc/domain/model/request/GroupSearchRequest.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 org.gdsc.domain.model.request | ||
|
||
data class GroupSearchRequest( | ||
val keyword: String | ||
) |
3 changes: 3 additions & 0 deletions
3
domain/src/main/java/org/gdsc/domain/repository/GroupRepository.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,9 +1,12 @@ | ||
package org.gdsc.domain.repository | ||
|
||
import org.gdsc.domain.model.GroupPreview | ||
import org.gdsc.domain.model.response.Group | ||
|
||
interface GroupRepository { | ||
suspend fun getMyGroups(): List<Group> | ||
|
||
suspend fun selectGroup(groupId: Int): String | ||
|
||
suspend fun searchGroup(keyword: String, limitCount: Int): List<GroupPreview> | ||
} |
10 changes: 10 additions & 0 deletions
10
domain/src/main/java/org/gdsc/domain/usecase/GetGroupBySearchWithLimitCountUseCase.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 org.gdsc.domain.usecase | ||
|
||
import org.gdsc.domain.repository.GroupRepository | ||
import javax.inject.Inject | ||
|
||
class GetGroupBySearchWithLimitCountUseCase @Inject constructor( | ||
private val groupRepository: GroupRepository | ||
) { | ||
suspend operator fun invoke(keyword: String, limitCount: Int) = groupRepository.searchGroup(keyword, limitCount) | ||
} |
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