[#44] 매장 기능 도입 #45

Merged
pricelees merged 116 commits from feat/#44 into main 2025-09-20 03:15:06 +00:00
Showing only changes of commit 9c279e1ec2 - Show all commits

View File

@ -0,0 +1,28 @@
package roomescape.schedule.business.domain
import roomescape.schedule.infrastructure.persistence.ScheduleStatus
import roomescape.theme.infrastructure.persistence.Difficulty
import java.time.LocalDate
import java.time.LocalTime
class ScheduleWithThemeSummary(
val id: Long,
val date: LocalDate,
val time: LocalTime,
val themeId: Long,
val themeName: String,
val themeDifficulty: Difficulty,
val themeAvailableMinutes: Short,
val status: ScheduleStatus
) {
fun getEndAt(): LocalTime {
return time.plusMinutes(themeAvailableMinutes.toLong())
}
fun containsTime(targetTime: LocalTime): Boolean {
val startFrom = this.time
val endAt = getEndAt()
return targetTime >= startFrom && targetTime < endAt
}
}