package cn.com.qmth.stmms.common.enums;

public enum ExamStatus {

    START("开始考试", 0), CALCULATING("正在统分", 1), CHECKING("数据检查中", 2), ENDED("已结束", 3);

    private String name;

    private int value;

    private ExamStatus(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static ExamStatus findByValue(int value) {
        ExamStatus status = null;
        for (ExamStatus s : ExamStatus.values()) {
            if (s.getValue() == value) {
                status = s;
                break;
            }
        }
        return status;
    }
}
