package com.ifish.enums;

import java.math.BigDecimal;

import com.alibaba.fastjson.JSONObject;


public enum PayTourTypeEnum {
	gold10("0",new BigDecimal(10)),
	gold20("1",new BigDecimal(20)),
	gold50("2",new BigDecimal(50));
	
	private PayTourTypeEnum(String key,BigDecimal value){
		this.key = key;
		this.value = value;
	}
	
	//普通方法
	public static BigDecimal getValue(String key) {
		for (PayTourTypeEnum c : PayTourTypeEnum.values()) {
			if (c.getKey().equals(key)) {
				return c.getValue();
			}
		}
		return null;
	}
	
	//普通方法
	public static JSONObject getJson() {
		JSONObject json = new JSONObject();
		for (PayTourTypeEnum addTypeEnum : PayTourTypeEnum.values()) {
			json.put(addTypeEnum.getKey(), addTypeEnum.getValue());
		}
		return json;
	}
		
	private String key;
	private BigDecimal value;
	
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public BigDecimal getValue() {
		return value;
	}
	public void setValue(BigDecimal value) {
		this.value = value;
	}
	
}
