package com.ho.business.mapper;

import com.ho.business.entity.ModelDevice;
import com.ho.business.entity.ModelDeviceCol;
import com.ho.business.entity.ModelType;
import com.ho.business.entity.ModelTypeCol;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author gyan
* @description 针对表【model_device_col】的数据库操作Mapper
* @createDate 2023-02-09 18:04:50
* @Entity generator.domain.ModelDeviceCol
*/
@Mapper
public interface ModelTypeMapper {

    /**
     * 新增ModelType表数据
     * @param modelType
     * @return
     */
    int insertModelType(ModelType modelType);

    List<ModelType> getModelTypeList(@Param("modelType") ModelType modelType);

    ModelType selectByModelType(String modelType);

    List<ModelType> getModelType(String modelType);

    List<ModelDevice> getDeviceType(String modelType);

    /**
     * 根据设备类型模糊查询
     * @param deviceType
     * @return
     */
    List<ModelDevice> selectByDeviceType(String deviceType);

    /**
     * 新增ModelDevice表数据
     * @param modelDevice
     * @return
     */
    int insertModelDevice(ModelDevice modelDevice);

    /**
     * 新增ModelDevice表数据
     * @param modelDevice
     * @return
     */
    int insertModelDeviceList(List<ModelDevice> modelDevice);

    /**
     * 更新ModelDevice表数据
     * @param modelDevice
     * @return
     */
    int updateModelDevice(ModelDevice modelDevice);

    /**
     * 删除ModelDevice表数据
     * @param ids
     * @return
     */
    int deleteModelDevice(List<Integer> ids);

    /**
     * 根据设备类型模型删除
     * @param deviceType
     * @return
     */
    int deleteModelDeviceByDeviceType(String deviceType);

    ModelType selectSameName(String modelName);

    ModelDevice selectByDict(@Param("deviceType")String deviceType, @Param("modelType")String modelType);
}
