package cn.com.qmth.examcloud.core.questions.service.yunkai;

public enum YunkaiQuesStructType {
	
	DANXUAN(1,"单选题",1,"单选题",true),
	DUOXUAN(2,"多选题",2,"多选题",true),
	BUDINGXIANG(3,"不定项选择题",2,"多选题",true),
	PANDUAN(4,"判断题",3,"判断题",true),
	JIANDA(5,"简答题",5,"问答题",false),
	MIGNCIJIESHI(6,"名词解释",5,"问答题",false),
	LIJIETI(7,"理解题",5,"问答题",false),
	ANLITI(8,"案例题",5,"问答题",false),
	LUNSHUTI(9,"论述题",5,"问答题",false),
	FENXITI(10,"分析题",5,"问答题",false),
	ZONGHETI(11,"综合题",5,"问答题",false),
	JISUANTI(12,"计算题",5,"问答题",false),
	TIANKONGTI(13,"填空题",4,"填空题",false),
	;
	
	private Integer yunKaiType;
	private String yunKaiDesc;
	private Integer type;
	private String desc;
	private boolean objective;//是否是客观题
	
	private YunkaiQuesStructType(Integer yunKaiType, String yunKaiDesc, Integer type, String desc, boolean objective) {
		this.yunKaiType = yunKaiType;
		this.yunKaiDesc = yunKaiDesc;
		this.type = type;
		this.desc = desc;
		this.objective = objective;
	}
	
	
		
	public Integer getYunKaiType() {
		return yunKaiType;
	}



	public void setYunKaiType(Integer yunKaiType) {
		this.yunKaiType = yunKaiType;
	}



	public String getYunKaiDesc() {
		return yunKaiDesc;
	}



	public void setYunKaiDesc(String yunKaiDesc) {
		this.yunKaiDesc = yunKaiDesc;
	}



	public Integer getType() {
		return type;
	}



	public void setType(Integer type) {
		this.type = type;
	}



	public String getDesc() {
		return desc;
	}



	public void setDesc(String desc) {
		this.desc = desc;
	}



	public boolean isObjective() {
		return objective;
	}



	public void setObjective(boolean objective) {
		this.objective = objective;
	}



	public static YunkaiQuesStructType getByYunKaiType(Integer yunKaiType) {
		if(yunKaiType==null) {
			throw new RuntimeException("题型异常");
		}
		for(YunkaiQuesStructType t:YunkaiQuesStructType.values()) {
			if(t.getYunKaiType().equals(yunKaiType)) {
				return t;
			}
		}
		throw new RuntimeException("题型异常");
	}
	
}

