-
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.
- Loading branch information
Showing
10 changed files
with
49 additions
and
5 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
10 changes: 10 additions & 0 deletions
10
...announcement/src/main/java/com/easyhz/noffice/data/announcement/mapper/task/TaskMapper.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.easyhz.noffice.data.announcement.mapper.task | ||
|
||
import com.easyhz.noffice.core.model.task.Task | ||
import com.easyhz.noffice.core.network.model.response.task.TaskResponse | ||
|
||
fun TaskResponse.toModel(): Task = Task( | ||
id = this.id, | ||
content = this.content, | ||
isDone = false | ||
) |
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
.../java/com/easyhz/noffice/domain/announcement/usecase/task/FetchAnnouncementTaskUseCase.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.easyhz.noffice.domain.announcement.usecase.task | ||
|
||
import com.easyhz.noffice.core.common.base.BaseUseCase | ||
import com.easyhz.noffice.core.model.task.Task | ||
import com.easyhz.noffice.data.announcement.repository.announcement.AnnounceRepository | ||
import javax.inject.Inject | ||
|
||
class FetchAnnouncementTaskUseCase @Inject constructor( | ||
private val announcementRepository: AnnounceRepository | ||
): BaseUseCase<Int, List<Task>>() { | ||
override suspend fun invoke(param: Int): Result<List<Task>> { | ||
return announcementRepository.fetchAnnouncementTask(param) | ||
} | ||
} |
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