package jnpf.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ExamUserStatisticsEnums {
    PARTICIPATE(0, "参与统计"),
    NOT_PARTICIPATE(1, "不参加统计(同时也不批阅了)");

    private Integer code;
    private String description;

    public static ExamUserStatisticsEnums fromCode(Integer code) {
        for (ExamUserStatisticsEnums formFieldType : ExamUserStatisticsEnums.values()) {
            if (formFieldType.getCode().equals(code)) {
                return formFieldType;
            }
        }
        return null;
    }
}
