generated from pricelees/issue-pr-template
[#39] '시간' -> '일정' 스키마 변경으로 테마별 시간 지정 #40
@ -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", "예약이 진행중이거나 완료된 일정은 삭제할 수 없어요."),
|
||||||
|
}
|
||||||
@ -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)
|
||||||
Loading…
x
Reference in New Issue
Block a user