package tech.easyflow.ai.service;

import com.mybatisflex.core.service.IService;
import tech.easyflow.ai.entity.FaqCategory;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;

public interface FaqCategoryService extends IService<FaqCategory> {

    BigInteger ensureDefaultCategory(BigInteger collectionId);

    BigInteger ensureFaqItemCategory(BigInteger collectionId, BigInteger categoryId);

    List<FaqCategory> listByCollection(BigInteger collectionId, Boolean asTree);

    boolean saveCategory(FaqCategory entity);

    boolean updateCategory(FaqCategory entity);

    boolean removeCategory(BigInteger id);

    List<BigInteger> findDescendantIds(BigInteger collectionId, BigInteger categoryId);

    Map<BigInteger, String> buildPathMap(BigInteger collectionId);
}
