package com.tzy.common.enums;

/**
 * 积分类型枚举
 * @author po'yi
 */

public enum PointTypeEnum {

    common("common","平台积分"),
    mer_act_sp("mer_act_sp","拼团SP积分"),
    sp("sp","sp");

    private String type;
    private String desc;

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    PointTypeEnum(String type, String desc){
        this.type = type;
        this.desc =desc;
    }

    public static String of(String pointType) {
        for (PointTypeEnum temp : PointTypeEnum.values()) {
            if (pointType.equalsIgnoreCase(temp.getType())) {
                return temp.desc;
            }
        }
        return null;
    }
}