package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumScoreType {

    LOGIN(1, "每日登录"),
    CONSUMPTION(2, "消费"),
    BIND_CAR(3, "绑车牌"),
    //WIFI_CONNECTION(4, "连接WIFI"),
    WECHAT_PERSION(5, "微信用户昵称授权"),
    WECHAT_PHONE(6, "微信用户手机授权"),
    COMPLETE_INFO(7, "完善个人信息"),
    MEM_IMPORT(8, "会员导入"),
    MEM_REDUCE(9, "会员成长值扣减"),
    SPEND_CREDIT(10, "新增积分"),
    CHANGE_CREDIT(11, "积分兑换"),
    REDUCE_CREDIT(12, "消费积分"),
    ACTIVITY_JOIN(13, "活动报名"),;

    public static EnumScoreType getEnum(Integer code) {
        for (EnumScoreType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumScoreType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
