package com.yeejoin.precontrol.common.enums;

/*
 * sqy
 */
public enum SexEum {
    /*
     * 男
     */
    man("男", 0L),
    /*
     * 女
     */
    woman("女", 1L);

    private String label;
    private Long value;

    SexEum(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 (SexEum type : SexEum.values()) {
            if (type.getValue().equals(value)) {
                label = type.getLabel();
                break;
            }
        }
        return label;
    }
}
