package jnpf.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ExamUpdateStatus {
    NO_UPDATE(1, "不需要更新"),
    NEED_UPDATE(2, "需要更新");

    private Integer code;
    private String description;

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