package com.ifish.enums;

import com.alibaba.fastjson.JSONObject;


public enum AddTypeEnum {
	once("once","一次"),
	everyDay("everyDay","每天"),
	everyTime("everyTime","每次"),
	keepSignIn("keepSignIn","连续签到"),
	addUpSignIn("addUpSignIn","累计签到");
	
	private AddTypeEnum(String key,String value){
		this.key = key;
		this.value = value;
	}
	
	//普通方法
	public static String getValue(String key) {
		for (AddTypeEnum c : AddTypeEnum.values()) {
			if (c.getKey().equals(key)) {
				return c.getValue();
			}
		}
		return null;
	}
	
	//普通方法
	public static JSONObject getJson() {
		JSONObject json = new JSONObject();
		for (AddTypeEnum addTypeEnum : AddTypeEnum.values()) {
			json.put(addTypeEnum.getKey(), addTypeEnum.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;
	}
	
}
