package com.yeejoin.precontrol.common.enums;

/**
 * 证件类型
 *
 * @author sqy
 */
public enum IdTypeEum {
    /*
     * 身份证
     */
    身份证("身份证", 0L);

    private String label;
    private Long value;

    IdTypeEum(String label, Long value) {
        this.label = label;
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public static String getLabelByValue(Long value) {
        String label = null;
        for (IdTypeEum type : IdTypeEum.values()) {
            if (type.getValue().equals(value)) {
                label = type.getLabel();
                break;
            }
        }
        return label;
    }
}
