package com.ruoyi.platform.mapper;

import com.ruoyi.platform.domain.ModelDependency1;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ModelDependency1Dao {

    int insert(ModelDependency1 modelDependency1);

    int updateState(@Param("repoId") Integer repoId, @Param("identifier") String identifier, @Param("version") String version, @Param("meta") String meta, @Param("state") Integer state);

    List<ModelDependency1> queryModelDependency(@Param("modelName") String modelName, @Param("repoId") Integer repoId, @Param("owner") String owner);

    ModelDependency1 getBuildingModel(@Param("repoId") Integer repoId, @Param("identifier") String identifier, @Param("version") String version);

    ModelDependency1 queryByRepoAndVersion(@Param("repoId") Integer repoId, @Param("identifier") String identifier, @Param("version") String version);

    List<ModelDependency1> queryByParentModel(@Param("parentModel") String parentModel);

    ModelDependency1 queryByTrainTask(@Param("trainTask") String trainTask);

    ModelDependency1 queryByInsId(@Param("insId") String insId);

    int deleteModel(@Param("repoId") Integer repoId, @Param("identifier") String identifier, @Param("owner") String owner, @Param("version") String version);

    int deleteModelById(@Param("id") Long id);

    int deleteModelDependency(@Param("parentModel") String parentModel);

    String getMeta(@Param("identifier") String identifier, @Param("owner") String owner, @Param("version") String version);
}
