package com.reyun.dic;

/**
 * Created by nolan on 26/10/2016.
 * description:
 */
public enum WhatEventEnumType {
    INSTALL("install", "激活"),
    REGED("reged", "注册"),
    LOGGEDIN("loggedin", "登录"),
    PAYMENT("payment", "付费"),
    EVENT("event", "效果点");

    private String id;
    private String value;

    WhatEventEnumType(String id, String value) {
        this.id = id;
        this.value = value;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static WhatEventEnumType get(String key){
        for (WhatEventEnumType dic : WhatEventEnumType.values()) {
            if(dic.getId().equals(key)){
                return dic;
            }
        }
        return null;
    }
}
