package shop.alien.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import shop.alien.entity.store.PlatformShopMembershipPlan;

import java.util.List;

public interface PlatformShopMembershipPlanPlatformService extends IService<PlatformShopMembershipPlan> {

    IPage<PlatformShopMembershipPlan> pagePlans(String planName, Integer enabled, int pageNum, int pageSize);

    boolean saveOrUpdatePlan(PlatformShopMembershipPlan plan);

    boolean toggleEnabled(Integer id, Integer enabled);

    /** recommended：0 否 1 是 */
    boolean toggleRecommended(Integer id, Integer recommended);

    /**
     * 按方案主键 id 逻辑删除（{@link com.baomidou.mybatisplus.annotation.TableLogic}），支持单个与批量。
     *
     * @return 实际删除（标记）条数；已删除或不存在的 id 不计入
     */
    int logicDeleteByIds(List<Integer> ids);
}
