package com.yonge.cooleshow.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.yonge.toolset.base.enums.BaseEnum;

/**
 * @author sunzl 
 * 2015年9月7日 下午1:57:10 
 * 会员性别枚举
 */
public enum UserGenderEnum implements BaseEnum<Integer, UserGenderEnum> {

	WOMAN(0, "女"), MAN(1, "男");
	@EnumValue
	private Integer code;

	private String description;

	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;
	}

}
