package com.xjrsoft.common.enums;

public enum GenderDictionaryEnum {
    /**
     * 男
     */
    MALE("SB10001", "男"),
    /**
     * 女
     */
    FEMALE("SB10002", "女");

    final String code;
    final String value;

    public String getCode() {
        return this.code;
    }

    public String getValue() {
        return this.value;
    }

    public static String getValue(String code) {
        for (GenderDictionaryEnum item : values()) {
            if (item.getCode().equals(code)) {
                return  item.getValue();
            }
        }
        return null;
    }

    GenderDictionaryEnum(final String code, final String message) {
        this.code = code;
        this.value = message;
    }

    public static String getCode(String value) {
        for (GenderDictionaryEnum item : values()) {
            if (item.getValue().equals(value)) {
                return  item.getCode();
            }
        }
        return null;
    }


}
