package com.ruoyi.platform.service;



import com.ruoyi.platform.domain.ModelsVersion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

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

/**
 * (ModelsVersion)表服务接口
 *
 * @author Xidaray
 * @since 2024-01-05 09:02:42
 */
public interface ModelsVersionService {

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

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

    /**
     * 新增数据
     *
     * @param modelsVersion 实例对象
     * @return 实例对象
     */
    ModelsVersion insert(ModelsVersion modelsVersion) throws Exception;

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

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

    String removeById(Integer id);

    List<ModelsVersion> queryByModelsId(Integer modelsId);

    ModelsVersion duplicateModelsVersion(ModelsVersion oldModelsVersion) throws Exception;

    ModelsVersion queryByModelsVersion(ModelsVersion modelsVersion);

    Map<String,Object> queryByModelsIdAndVersion(Integer modelsId, String version);

    Map<Integer, String> deleteModelsVersion(Integer modelsId, String version) throws Exception;

    String addModelVersions(List<ModelsVersion> modelsVersions) throws Exception;

    void checkDeclaredVersion(ModelsVersion insert) throws Exception;
}
