package com.ifish.enums;

import com.alibaba.fastjson.JSONObject;

/**
 * 金币消耗方式
 * @author Administrator
 *
 */
public enum GoldExpendTypeEnum {
	
	questionPayTour("questionPayTour","鱼医生打赏"),
	liveRoomPayTour("liveRoomPayTour","爱鱼看看打赏"),
	exchangeCoupon("exchangeCoupon","兑换优惠券");
	
	private GoldExpendTypeEnum(String key,String value){
		this.key = key;
		this.value = value;
	}
	
	//普通方法
	public static String getValue(String key) {
		for (GoldExpendTypeEnum c : GoldExpendTypeEnum.values()) {
			if (c.getKey().equals(key)) {
				return c.getValue();
			}
		}
		return null;
	}
	
	//普通方法
	public static JSONObject getJson() {
		JSONObject json = new JSONObject();
		for (GoldExpendTypeEnum ruleEnum : GoldExpendTypeEnum.values()) {
			json.put(ruleEnum.getKey(), ruleEnum.getValue());
		}
		return json;
	}
		
	private String key;
	private String value;
	
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
}
