forked from wine-area/DMS-Backend
-
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
89 changed files
with
1,266 additions
and
305 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
|
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
2 changes: 1 addition & 1 deletion
2
dms-core/src/main/kotlin/team/aliens/dms/domain/file/service/WriteFileServiceImpl.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
28 changes: 14 additions & 14 deletions
28
dms-core/src/main/kotlin/team/aliens/dms/domain/outing/dto/ApplyOutingRequest.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,14 @@ | ||
package team.aliens.dms.domain.outing.dto | ||
|
||
import java.time.LocalDate | ||
import java.time.LocalTime | ||
import java.util.UUID | ||
|
||
data class ApplyOutingRequest( | ||
val outAt: LocalDate, | ||
val outingTime: LocalTime, | ||
val arrivalTime: LocalTime, | ||
val outingTypeTitle: String, | ||
val reason: String?, | ||
val companionIds: List<UUID>? | ||
) | ||
package team.aliens.dms.domain.outing.dto | ||
|
||
import java.time.LocalDate | ||
import java.time.LocalTime | ||
import java.util.UUID | ||
|
||
data class ApplyOutingRequest( | ||
val outingDate: LocalDate, | ||
val outingTime: LocalTime, | ||
val arrivalTime: LocalTime, | ||
val outingTypeTitle: String, | ||
val reason: String?, | ||
val companionIds: List<UUID>? | ||
) |
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ package team.aliens.dms.domain.outing.model | |
enum class OutingStatus { | ||
REQUESTED, | ||
OUTING, | ||
DONE | ||
DONE, | ||
APPROVED | ||
} |
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
108 changes: 57 additions & 51 deletions
108
dms-core/src/main/kotlin/team/aliens/dms/domain/outing/service/GetOutingServiceImpl.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,51 +1,57 @@ | ||
package team.aliens.dms.domain.outing.service | ||
|
||
import org.springframework.stereotype.Service | ||
import team.aliens.dms.domain.outing.exception.OutingApplicationNotFoundException | ||
import team.aliens.dms.domain.outing.exception.OutingTypeNotFoundException | ||
import team.aliens.dms.domain.outing.model.OutingApplication | ||
import team.aliens.dms.domain.outing.model.OutingType | ||
import team.aliens.dms.domain.outing.spi.QueryOutingApplicationPort | ||
import team.aliens.dms.domain.outing.spi.QueryOutingAvailableTimePort | ||
import team.aliens.dms.domain.outing.spi.QueryOutingTypePort | ||
import team.aliens.dms.domain.outing.spi.vo.CurrentOutingApplicationVO | ||
import team.aliens.dms.domain.outing.spi.vo.OutingHistoryVO | ||
import java.time.DayOfWeek | ||
import java.time.LocalDate | ||
import java.util.UUID | ||
|
||
@Service | ||
class GetOutingServiceImpl( | ||
private val queryOutingTypePort: QueryOutingTypePort, | ||
private val queryOutingApplicationPort: QueryOutingApplicationPort, | ||
private val queryOutingAvailableTimePort: QueryOutingAvailableTimePort | ||
) : GetOutingService { | ||
|
||
override fun getOutingType(outingType: OutingType) = | ||
queryOutingTypePort.queryOutingType(outingType) ?: throw OutingTypeNotFoundException | ||
|
||
override fun getAllOutingTypeTitlesBySchoolIdAndKeyword(schoolId: UUID, keyword: String?) = | ||
queryOutingTypePort.queryAllOutingTypeTitlesBySchoolIdAndKeyword(schoolId, keyword) | ||
|
||
override fun getOutingApplicationById(outingApplicationId: UUID): OutingApplication = | ||
queryOutingApplicationPort.queryOutingApplicationById(outingApplicationId) | ||
?: throw OutingApplicationNotFoundException | ||
|
||
override fun getAllOutingApplicationVOsBetweenStartAndEnd(start: LocalDate, end: LocalDate) = | ||
queryOutingApplicationPort.queryAllOutingApplicationVOsBetweenStartAndEnd(start, end) | ||
|
||
override fun getCurrentOutingApplication(studentId: UUID): CurrentOutingApplicationVO = | ||
queryOutingApplicationPort.queryCurrentOutingApplicationVO(studentId) | ||
?: throw OutingApplicationNotFoundException | ||
|
||
override fun getOutingHistoriesByStudentNameAndDate( | ||
studentName: String?, | ||
date: LocalDate | ||
): List<OutingHistoryVO> = queryOutingApplicationPort.queryOutingHistoriesByStudentNameAndDate(studentName, date) | ||
|
||
override fun getOutingAvailableTimesByDayOfWeek( | ||
dayOfWeek: DayOfWeek | ||
) = queryOutingAvailableTimePort.queryOutingAvailableTimesByDayOfWeek( | ||
dayOfWeek = dayOfWeek | ||
) | ||
} | ||
package team.aliens.dms.domain.outing.service | ||
|
||
import team.aliens.dms.common.annotation.Service | ||
import team.aliens.dms.domain.outing.exception.OutingApplicationNotFoundException | ||
import team.aliens.dms.domain.outing.exception.OutingTypeNotFoundException | ||
import team.aliens.dms.domain.outing.model.OutingApplication | ||
import team.aliens.dms.domain.outing.model.OutingType | ||
import team.aliens.dms.domain.outing.spi.QueryOutingApplicationPort | ||
import team.aliens.dms.domain.outing.spi.QueryOutingAvailableTimePort | ||
import team.aliens.dms.domain.outing.spi.QueryOutingCompanionPort | ||
import team.aliens.dms.domain.outing.spi.QueryOutingTypePort | ||
import team.aliens.dms.domain.outing.spi.vo.CurrentOutingApplicationVO | ||
import team.aliens.dms.domain.outing.spi.vo.OutingCompanionDetailsVO | ||
import team.aliens.dms.domain.outing.spi.vo.OutingHistoryVO | ||
import java.time.DayOfWeek | ||
import java.time.LocalDate | ||
import java.util.UUID | ||
|
||
@Service | ||
class GetOutingServiceImpl( | ||
private val queryOutingTypePort: QueryOutingTypePort, | ||
private val queryOutingApplicationPort: QueryOutingApplicationPort, | ||
private val queryOutingAvailableTimePort: QueryOutingAvailableTimePort, | ||
private val queryOutingCompanionPort: QueryOutingCompanionPort | ||
) : GetOutingService { | ||
|
||
override fun getOutingType(outingType: OutingType) = | ||
queryOutingTypePort.queryOutingType(outingType) ?: throw OutingTypeNotFoundException | ||
|
||
override fun getAllOutingTypeTitlesBySchoolIdAndKeyword(schoolId: UUID, keyword: String?) = | ||
queryOutingTypePort.queryAllOutingTypeTitlesBySchoolIdAndKeyword(schoolId, keyword) | ||
|
||
override fun getOutingApplicationById(outingApplicationId: UUID): OutingApplication = | ||
queryOutingApplicationPort.queryOutingApplicationById(outingApplicationId) | ||
?: throw OutingApplicationNotFoundException | ||
|
||
override fun getAllOutingApplicationVOsBetweenStartAndEnd(start: LocalDate, end: LocalDate) = | ||
queryOutingApplicationPort.queryAllOutingApplicationVOsBetweenStartAndEnd(start, end) | ||
|
||
override fun getCurrentOutingApplication(studentId: UUID): CurrentOutingApplicationVO = | ||
queryOutingApplicationPort.queryCurrentOutingApplicationVO(studentId) | ||
?: throw OutingApplicationNotFoundException | ||
|
||
override fun getOutingHistoriesByStudentNameAndDate( | ||
studentName: String?, | ||
date: LocalDate | ||
): List<OutingHistoryVO> = queryOutingApplicationPort.queryOutingHistoriesByStudentNameAndDate(studentName, date) | ||
|
||
override fun getOutingAvailableTimesByDayOfWeek( | ||
dayOfWeek: DayOfWeek | ||
) = queryOutingAvailableTimePort.queryOutingAvailableTimesByDayOfWeek( | ||
dayOfWeek = dayOfWeek | ||
) | ||
|
||
override fun getOutingCompanionsByApplicationId(outingApplicationId: UUID): List<OutingCompanionDetailsVO> = | ||
queryOutingCompanionPort.queryOutingCompanionsById(outingApplicationId) | ||
} |
1 change: 1 addition & 0 deletions
1
dms-core/src/main/kotlin/team/aliens/dms/domain/outing/spi/OutingCompanionPort.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,4 +1,5 @@ | ||
package team.aliens.dms.domain.outing.spi | ||
|
||
interface OutingCompanionPort : | ||
QueryOutingCompanionPort, | ||
CommandOutingCompanionPort |
Oops, something went wrong.