package com.yonge.cooleshow.auth.dal.enums;

import com.yonge.toolset.base.enums.BaseEnum;

/**
 * 会员性别枚举
 */
public enum UserGenderEnum implements BaseEnum<Integer, UserGenderEnum> {

	WOMAN(0, "女"), MAN(1, "男");

	private int code;

	private String description;

	private UserGenderEnum(int code, String description) {
		this.code = code;
		this.description = description;
	}

	public static UserGenderEnum get(int code) {
		for (UserGenderEnum info : UserGenderEnum.values()) {
			if (info.getCode() == code) {
				return info;
			}
		}
		return null;
	}

	public String getDescription() {
		return description;
	}

	@Override
	public Integer getCode() {
		return code;
	}

}
