package com.sundot.airport.exam.enums;


import com.sundot.airport.exam.common.AbstractBaseExceptionEnum;

/**
 * <b>功能名: </b>CloudSchoolBizExceptionEnum<br>
 * <b>说明: </b>云课堂的业务异常枚举。范围是225000 - 225999 <br>
 * <b>著作权: </b> Copyright (C) 2021 HUIFANEDU  CORPORATION<br>
 * <b>修改履历: </b><br>
 *
 * @author 2021/6/17 liangxiao
 */
public enum CloudSchoolBizExceptionEnum implements AbstractBaseExceptionEnum {

    /**
     * 通用问题
     */
    USER_INFO_CHECK_FAIL(225001, "用户信息获取失败"),

    /**
     * 创建记录的名称重复
     */
    DUPLICATE_NAME(225010, "名称重复！"),

    /**
     * 题目类型错误
     */
    QUES_TYPE_ERROR(225040, "题目类型错误"),
    QUES_CAT_NOT_FOUND(225041, "题目分类信息无效"),

    /**
     * 题目选项异常
     */
    QUES_NOT_FOUND(225051, "未查询到题目信息"),
    INCORRECT_ANSWER(225052, "答案设置错误"),
    AT_LEAST_ONE_OPTION(225053, "至少有一个选项"),
    MUST_BE_TWO_OPTION(225054, "必须有两个选项"),
    MAX_OPTIONS_TO_10(225055, "选项至多10个"),
    CONNECTION_OPTIONS_NOT_NULL(225056, "连线题选项内容不为空"),

    /**
     * 试卷异常
     */
    TEST_PAPER_NOT_FOUND(225100, "未查询到试卷信息"),
    DUPLICATE_QUES(225101, "存在重复题目"),
    INVALID_QUES(225102, "存在无效题目"),
    SCORE_RULE_ERROR(225103, "计分规则错误"),
    TEST_PAPER_CAT_NOT_FOUND(225104, "试卷分类信息无效"),

    /**
     * 考试异常
     */
    CERT_EMPTY(225110, "证书不能为空"),
    EXAM_NOT_FOUND(225111, "未查询到考试信息"),
    CERT_BG_NOT_FOUND(225112, "未查询到证书背景图片信息"),
    RELATE_PROD_ENABLE(225113, "存在关联的产品信息,请先删除关联得产品课程"),

    /**
     * 产品异常
     */
    PROD_TYPE_NOT_FOUND(225120, "产品类型未找到"),
    TYPE_OF_PRODUCT_TO_UPPER_LIMIT(225121, "该类型产品达到上限"),
    PROD_NOT_FOUND(225122, "未查询到产品信息"),
    PROD_COURSE_NOT_FOUND(225123, "未查询到课程信息"),
    VIP_SIGN_ENABLE_EXISTING(225124, "该会员权益存在已上架的产品"),
    PROD_ENABLE_CANT_MODIFY(225125, "产品已上架无法修改"),

    /**
     * 在线测试异常
     */
    EXAM_COUNT_TO_UPPER_LIMIT(225130, "考试次数已达上限"),
    EXAM_SERVICE_BUSY(225131, "考试服务繁忙"),

    /**
     * 未查询到结果
     */
    OBJ_NOT_FOUND(225200, "未查询到结果"),

    /**
     * 未查询到视频信息
     */
    VIDEO_NOT_FOUND(225600, "未查询到视频信息"),

    /**
     * 视频时间异常
     */
    VIDEO_TIME_UNEXPECTED(225601, "视频时长异常"),

    /**
     * 分页参数异常
     */
    PAGE_PARAM_UNEXPECTED(225602, "分页参数异常"),

    /**
     * 产品嵌套等级异常
     */
    PROD_NESTED_UNEXPECTED(225603, "产品嵌套等级异常"),

    /**
     * 查询用户权益失败
     */
    GET_MEMBER_USER_RIGHTS_FAIL(225604, "查询用户权益失败"),

    /**
     * 查询用户权益失败
     */
    GET_VIDEO_LIST_FAIL(225605, "查询视频列表失败"),

    /**
     * 产品类型异常
     */
    PRODUCT_TYPE_UNEXPECTED(225700, "产品类型异常"),

    /**
     * 未查询到试卷信息
     */
    TESTPAPER_NOT_FOUND(225800, "未查询到试卷信息"),

    /**
     * 未查询到题目信息
     */
    QUESTION_NOT_FOUND(225801, "未查询到题目信息"),

    /**
     * 未查询到测试记录
     */
    EXAMREC_NOT_FOUND(225802, "未查询到测试记录"),
    ;

    /**
     * code
     */
    private final Integer code;

    /**
     * message
     */
    private final String message;

    CloudSchoolBizExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
