package com.ifish.enums;

import com.alibaba.fastjson.JSONObject;

/**
 * 商品位置
 * @author Administrator
 *
 */
public enum IfishShopPlaceEnum {
	one(1,"首页"),
	two(2,"鱼医生"),
	three(3,"探索-爱鱼严选"),
	fore(4,"商家-进货管理");
	
	private IfishShopPlaceEnum(Integer key,String value){
		this.key = key;
		this.value = value;
	}
	
	//普通方法
	public static IfishShopPlaceEnum getAdTypeEnum(Integer key) {
		for (IfishShopPlaceEnum c : IfishShopPlaceEnum.values()) {
			if (c.getKey().equals(key)) {
				return c;
			}
		}
		return null;
	}
	
	public static JSONObject getJson() {
		JSONObject json = new JSONObject();
		for (IfishShopPlaceEnum adTypeEnum : IfishShopPlaceEnum.values()) {
			json.put(adTypeEnum.getKey().toString(), adTypeEnum.getValue());
		}
		return json;
	}
		
	private Integer key;
	private String value;
	
	public Integer getKey() {
		return key;
	}
	public void setKey(Integer key) {
		this.key = key;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
}
