package com.testor.common.constant;

public enum IsOrNoEnum {
    NO("0", "否"),
    YES("1", "是");

    IsOrNoEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private String code;

    private String msg;


    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public  static String getName(String value){
        for (IsOrNoEnum bean : IsOrNoEnum.values()) {
            if (bean.getCode().equals(value)) {
                return bean.getMsg();
            }
        }
        return value;
    }
}
