package org.jeecg.modules.oroqen.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.oroqen.entity.OroqenUserFavorite;

import java.util.List;

/**
 * @Description: 用户收藏
 * @Author: jeecg-boot
 * @Date: 2025-01-08
 * @Version: V1.0
 */
public interface IOroqenUserFavoriteService extends IService<OroqenUserFavorite> {

    /**
     * 根据用户ID查询收藏
     */
    List<OroqenUserFavorite> getByUserId(String userId);

    /**
     * 根据用户ID和收藏类型查询收藏
     */
    List<OroqenUserFavorite> getByUserIdAndType(String userId, Integer favoriteType);

    /**
     * 添加收藏
     */
    void addFavorite(String userId, Integer favoriteType, String targetId);

    /**
     * 取消收藏
     */
    void removeFavorite(String userId, Integer favoriteType, String targetId);

    /**
     * 检查是否已收藏
     */
    boolean isFavorited(String userId, Integer favoriteType, String targetId);
}