package com.ifish.enums;

import com.alibaba.fastjson.JSONObject;

/**
 * 金币获取方式
 * @author Administrator
 *
 */
public enum GoldGetTypeEnum {
	//每天加成
	everyDaySignin("everyDaySignin","每天签到"),
	readInformation("readInformation","阅读资讯"),
	openGoodsLink("openGoodsLink","查看商品"),
	roomLeaveMsg("roomLeaveMsg","爱鱼看看留言"),
	ifishCommunity("ifishCommunity","爱鱼圈"),
	shareCameraPicture("shareCameraPicture","图片分享"),
	shareLookReport("shareLookReport","看护报告"),
	hitGoldenEgg("hitGoldenEgg","砸金蛋"),
	shareIfishApp("shareIfishApp","分享爱鱼奇"),
	//一次加成
	rename("rename","更换姓名"),
	uploadHeadImg("uploadHeadImg","上传头像"),
	openShareCamera("openShareCamera","开启分享"),
	choiceLookShops("choiceLookShops","优选商家"),
	ifishDoctor("ifishDoctor","鱼医生"),
	//每次加成
	questionPayTour("questionPayTour","问题打赏"),
	liveRoomPayTour("liveRoomPayTour","爱鱼看看打赏"),
	//系统赠送
	registerGive("registerGive","注册赠送");
	
	private GoldGetTypeEnum(String key,String value){
		this.key = key;
		this.value = value;
	}
	
	//普通方法
	public static String getValue(String key) {
		for (GoldGetTypeEnum c : GoldGetTypeEnum.values()) {
			if (c.getKey().equals(key)) {
				return c.getValue();
			}
		}
		return null;
	}
	
	//普通方法
	public static JSONObject getJson() {
		JSONObject json = new JSONObject();
		for (GoldGetTypeEnum ruleEnum : GoldGetTypeEnum.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;
	}
	
}
