[#39] '시간' -> '일정' 스키마 변경으로 테마별 시간 지정 #40

Merged
pricelees merged 16 commits from refactor/#39 into main 2025-09-04 04:14:12 +00:00
2 changed files with 22 additions and 0 deletions
Showing only changes of commit 9409d24983 - Show all commits

View File

@ -0,0 +1,15 @@
package roomescape.schedule.exception
import org.springframework.http.HttpStatus
import roomescape.common.exception.ErrorCode
enum class ScheduleErrorCode(
override val httpStatus: HttpStatus,
override val errorCode: String,
override val message: String
) : ErrorCode {
SCHEDULE_NOT_FOUND(HttpStatus.NOT_FOUND, "S001", "일정을 찾을 수 없어요."),
SCHEDULE_ALREADY_EXISTS(HttpStatus.CONFLICT, "S002", "이미 동일한 일정이 있어요."),
PAST_DATE_TIME(HttpStatus.BAD_REQUEST, "S003", "과거 날짜와 시간은 선택할 수 없어요."),
SCHEDULE_IN_USE(HttpStatus.CONFLICT, "S004", "예약이 진행중이거나 완료된 일정은 삭제할 수 없어요."),
}

View File

@ -0,0 +1,7 @@
import roomescape.common.exception.ErrorCode
import roomescape.common.exception.RoomescapeException
class ScheduleException(
override val errorCode: ErrorCode,
override val message: String = errorCode.message
) : RoomescapeException(errorCode, message)