package com.ruoyi.platform.service;

import com.ruoyi.platform.domain.ModelDependency;
import com.ruoyi.platform.vo.ModelDependcyTreeVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.io.IOException;
import java.util.List;

/**
 * (ModelDependency)表服务接口
 *
 * @author Xidaray
 * @since 2024-05-29 13:51:23
 */
public interface ModelDependencyService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    ModelDependency queryById(Integer id);

    /**
     * 分页查询
     *
     * @param modelDependency 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<ModelDependency> queryByPage(ModelDependency modelDependency, PageRequest pageRequest);

    /**
     * 修改数据
     *
     * @param modelDependency 实例对象
     * @return 实例对象
     */
    ModelDependency update(ModelDependency modelDependency);

    /**
     * 新增数据
     *
     * @param modelDependency 实例对象
     * @return 实例对象
     */
    ModelDependency insert(ModelDependency modelDependency);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    String removeById(Integer id) throws Exception;

    List<ModelDependency> queryByModelDependency(ModelDependency modelDependency) throws IOException;

    ModelDependcyTreeVo getModelDependencyTree(ModelDependency modelDependency) throws Exception;

    List<ModelDependency> queryByIns(Integer expInsId);

    ModelDependency queryByInsAndTrainTaskId(Integer expInsId, String taskId);
}
