/*
 * *************************************************
 * Copyright (c) 2018 QMTH. All Rights Reserved.
 * Created by Deason on 2018-07-12 15:31:09.
 * *************************************************
 */

package cn.com.qmth.examcloud.core.questions.base.converter.model;

/**
 * 调卷规则类型
 */
public enum PolicyType {

    Random("随机抽卷", 1), BlueMap("蓝图组卷", 2);

    private String name;

    private int id;

    PolicyType(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public static PolicyType findById(int id) {
        for (PolicyType type : PolicyType.values()) {
            if (type.id == id) {
                return type;
            }
        }
        return null;
    }

}