package org.springblade.common.enums;

import lombok.Getter;

/**
 * 商品类型枚举类
 */
@Getter
public enum GoodsSourceEnum {
	ZH("中宏", "0"),
	STBZ("胜天半子", "1"),
	WPS("唯品尚", "2");
	private String name;
	private String value;

	GoodsSourceEnum(String name, String value) {
		this.name = name;
		this.value = value;
	}

	public static String getNameByValue(String value) {
		for (GoodsSourceEnum e : GoodsSourceEnum.values()) {
			if (e.value.equals(value)) {
				return e.getName();
			}
		}
		return "";
	}

	public String getName() {
		return name;
	}

	public String getValue() {
		return value;
	}
}
