-
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.
Browse files
Browse the repository at this point in the history
Feature/tgyuu/#78
- Loading branch information
Showing
19 changed files
with
659 additions
and
59 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
12 changes: 12 additions & 0 deletions
12
core/domain/src/main/java/com/wap/wapp/core/domain/usecase/event/GetEventUseCase.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,12 @@ | ||
package com.wap.wapp.core.domain.usecase.event | ||
|
||
import com.wap.wapp.core.data.repository.event.EventRepository | ||
import java.time.LocalDateTime | ||
import javax.inject.Inject | ||
|
||
class GetEventUseCase @Inject constructor( | ||
private val eventRepository: EventRepository, | ||
) { | ||
suspend operator fun invoke(date: LocalDateTime, eventId: String) = | ||
eventRepository.getEvent(date = date, eventId = eventId) | ||
} |
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
31 changes: 31 additions & 0 deletions
31
core/domain/src/main/java/com/wap/wapp/core/domain/usecase/event/UpdateEventUseCase.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,31 @@ | ||
package com.wap.wapp.core.domain.usecase.event | ||
|
||
import com.wap.wapp.core.data.repository.event.EventRepository | ||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
import java.time.LocalTime | ||
import javax.inject.Inject | ||
|
||
class UpdateEventUseCase @Inject constructor( | ||
private val eventRepository: EventRepository, | ||
) { | ||
suspend operator fun invoke( | ||
eventId: String, | ||
eventTitle: String, | ||
eventContent: String, | ||
eventLocation: String, | ||
eventStartDate: LocalDate, | ||
eventStartTime: LocalTime, | ||
eventEndDate: LocalDate, | ||
eventEndTime: LocalTime, | ||
): Result<Unit> = runCatching { | ||
eventRepository.updateEvent( | ||
eventId = eventId, | ||
title = eventTitle, | ||
content = eventContent, | ||
location = eventLocation, | ||
startDateTime = LocalDateTime.of(eventStartDate, eventStartTime), | ||
endDateTime = LocalDateTime.of(eventEndDate, eventEndTime), | ||
) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ecase/management/RegisterSurveyUseCase.kt → ...n/usecase/survey/RegisterSurveyUseCase.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
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
Oops, something went wrong.