package cn.nianxx.thhotel.platform.common.exception;

import org.springframework.http.HttpStatus;

/**
 * 系统管理业务受控异常。用于对象不存在、状态冲突和参数非法等管理后台错误。
 */
public class AdminOperationException extends RuntimeException {

    private final HttpStatus status;
    private final String errorCode;

    public AdminOperationException(HttpStatus status, String errorCode, String message) {
        super(message);
        this.status = status;
        this.errorCode = errorCode;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public String getErrorCode() {
        return errorCode;
    }
}
