package cn.newfeifan.mall.module.distri.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SocialStatusUpdateEnum {
    REGISTER_ONESELF(1, "本人注册用户"),
    REGISTER_OTHER(2, "成功推荐新用户注册"),
    SIGN_IN(3, "签到获取的基础身价值"),
    COLLECT(4, "收藏一个商品获取的身价值")
    ;

    /**
     * 来源
     */
    private final Integer type;
    /**
     * 类型的名字
     */
    private final String name;

    public static SocialStatusUpdateEnum getSocialStatusEnumByValue(int value) {
        for (SocialStatusUpdateEnum caclEnum : SocialStatusUpdateEnum.values()) {
            if (caclEnum.getType() == value) {
                return caclEnum;
            }
        }
        return null;
    }

}