package com.testor.module.train.project.model.enums;

/**
 *
 * @author
 * @date 2024/9/6
 * @description  是否参加考试 0 否 1 是
 */
public enum TrainTakeExamStateEnum {

    NO("0", "否"),
    YES("1", "是"),

    ;
    private String value;
    private String name;

    TrainTakeExamStateEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getName(String value) {
        for (TrainTakeExamStateEnum bean : TrainTakeExamStateEnum.values()) {
            if (bean.getValue().equals(value)) {
                return bean.getName();
            }
        }
        return value;
    }
}
