package com.xjrsoft.common.enums;

public enum GenderEnum {
    /**
     * 男
     */
    MALE(1, "男"),
    /**
     * 女
     */
    FEMALE(2, "女");

    final int code;
    final String value;

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

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

    public static String getValue(int code) {
        for (GenderEnum item : values()) {
            if (item.getCode() == code) {
                return  item.getValue();
            }
        }
        return null;
    }

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


}
