package org.dromara.knowledge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.knowledge.domain.KnowledgeAttach;
import org.dromara.knowledge.domain.bo.KnowledgeAttachBo;
import org.dromara.knowledge.domain.vo.KnowledgeAttachVo;

import java.util.Collection;
import java.util.List;

/**
 * 知识库附件Service接口
 *
 * @author pengles
 */
public interface KnowledgeAttachService extends IService<KnowledgeAttach> {

    /**
     * 查询知识库附件
     */
    KnowledgeAttachVo queryById(Long id);

    /**
     * 查询知识库附件列表
     */
    TableDataInfo<KnowledgeAttachVo> queryPageList(KnowledgeAttachBo bo, PageQuery pageQuery);

    /**
     * 查询知识库附件列表
     */
    List<KnowledgeAttachVo> queryList(KnowledgeAttachBo bo);

    /**
     * 新增知识库附件
     */
    Boolean insertByBo(KnowledgeAttachBo bo);

    /**
     * 修改知识库附件
     */
    Boolean updateByBo(KnowledgeAttachBo bo);

    /**
     * 校验并批量删除知识库附件
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 根据知识库ID查询附件列表
     */
    List<KnowledgeAttachVo> queryListByKnowledgeId(String knowledgeId);

    /**
     * 根据文档ID查询附件信息
     */
    KnowledgeAttachVo queryByDocId(String docId);
}