package com.ynfy.buss.exam.paper.enmus;

/**
 * 组卷方式
 */
public enum JoinType {
    XT(1, "选题组卷"),
    SJ(2, "随机组卷"),
    CT(3, "抽题组卷");

    private Integer code;

    private String value;

    JoinType(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

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

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static JoinType getByCode(Integer code) {
        for (JoinType joinType : values()) {
            if (joinType.getCode().equals(code)) {
                return joinType;
            }
        }
        return null;
    }

}
