package com.ylx.point.enums;

import lombok.Getter;

@Getter
public enum PointActivityTypeEnum {

    SIGN_TASK(0, "签到任务"),
    NEW_USER_ACTIVITY(1, "新手活动"),
    DAILY_ACTIVITY(2, "每日活动"),
    MONTHLY_ACTIVITY(3, "每月活动");



    private final Integer code;
    private final String info;

    PointActivityTypeEnum(Integer code, String info) {
        this.code = code;
        this.info = info;
    }


    public static PointActivityTypeEnum valueOf(Integer code) {
        if (code == null) {
            return null;
        }
        for (PointActivityTypeEnum value : PointActivityTypeEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
