package com.jeesharp.business.modules.member.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单消费送积分支持的业务场景（一期白名单）。
 *
 * @author jeesharp
 * @since 2026-06-24
 */
@Getter
@AllArgsConstructor
public enum MemberPointsOrderBizSceneEnum {

    MALL_ORDER("MALL_ORDER", "商城订单"),
    YEAR_CARD("YEAR_CARD", "年卡");

    private final String code;

    private final String desc;

    public static boolean isEnabledInPhase1(String bizScene) {
        if (bizScene == null || bizScene.isBlank()) {
            return false;
        }
        for (MemberPointsOrderBizSceneEnum item : values()) {
            if (item.code.equals(bizScene)) {
                return true;
            }
        }
        return false;
    }
}
