package com.seer.teach.common.enums;

/**
 * @Author: Captain
 * @Description:
 * @Date: 2025-06-09 16:14
 */
public enum MakeQuestionTypeEnums {

    AI_CORRECT_KNOW_CHALLENGE(1, "AI批改-知识点挑战"),
    EVALUATION(2, "AI测评"),
    REVIEW(3, "AI复习挑战"),
    PREVIEW(4, "AI预习挑战"),
    PLAN(5, "黑马计划");
    private Integer code;
    private String msg;

    MakeQuestionTypeEnums(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static Integer getCodeByMsg(String msg) {
        if (msg == null) {
            return null;
        }
        for (MakeQuestionTypeEnums type : MakeQuestionTypeEnums.values()) {
            if (msg.equals(type.getMsg())) {
                return type.getCode();
            }
        }
        return null;
    }
}
