UserVipLevelEnum.java 1.25 KB
/**
 * 
 */
package com.yoho.message.sdk.common.constants;

/**
 * 描述:黑名单用户类型
 * 
 *
 */
public enum UserVipLevelEnum {

	NORMAL(0, "普通会员","7天退换货、极速发货"),
	LEVEL_1(1, "银卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包"),
	LEVEL_2(3, "金卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包、免邮服务"),
	LEVEL_3(4, "白金卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包、免邮服务、优享客服");


	private int value;
	private String name;
	private String desc;

	UserVipLevelEnum(int value, String name,String desc) {
		this.value = value;
		this.name = name;
		this.desc = desc;
	}
	
	public static String getNameByValue(int value) {
		for (UserVipLevelEnum e : values()) {
			if (value == e.getValue()) {
				return e.getName();
			}
		}
		return null;
	}

	public static String getDescByValue(int value) {
		for (UserVipLevelEnum e : values()) {
			if (value == e.getValue()) {
				return e.getDesc();
			}
		}
		return null;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}

	public String getDesc() {
		return desc;
	}
}