generated from pricelees/issue-pr-template
18 lines
942 B
Kotlin
18 lines
942 B
Kotlin
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", "예약이 진행중이거나 완료된 일정은 삭제할 수 없어요."),
|
|
SCHEDULE_NOT_AVAILABLE(HttpStatus.CONFLICT, "S005", "예약이 완료되었거나 예약할 수 없는 일정이에요."),
|
|
SCHEDULE_TIME_CONFLICT(HttpStatus.CONFLICT, "S006", "시간이 겹치는 다른 일정이 있어요.")
|
|
}
|