package cn.yunzhixue.ability.center.kernel;

public enum ErrorCode {
    REPORT_NOT_FOUND("REPORT_NOT_FOUND", "report not found", 404),
    REPORT_TYPE_UNSUPPORTED("REPORT_TYPE_UNSUPPORTED", "report type unsupported", 400),
    EXAM_SPRINT_REPORT_DOWNLOAD_UNAVAILABLE(
            "EXAM_SPRINT_REPORT_DOWNLOAD_UNAVAILABLE",
            "exam sprint report download unavailable",
            500),
    VALIDATION_ERROR("VALIDATION_ERROR", "validation error", 400),
    INTERNAL_ERROR("INTERNAL_ERROR", "internal server error", 500);

    private final String code;
    private final String message;
    private final int httpStatusCode;

    ErrorCode(String code, String message, int httpStatusCode) {
        this.code = code;
        this.message = message;
        this.httpStatusCode = httpStatusCode;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public int getHttpStatusCode() {
        return httpStatusCode;
    }
}
