package com.inspect.metadata.prodevmnt.mapper;

import com.inspect.metadata.prodevmnt.domain.BasedataDeviceType;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BasedataDeviceTypeMapper {
    BasedataDeviceType selectBasedataDeviceTypeByDeviceTypeId(Long typeId);

    List<BasedataDeviceType> selectBasedataDeviceTypeList(BasedataDeviceType deviceType);

    int insertBasedataDeviceType(BasedataDeviceType deviceType);

    int updateBasedataDeviceType(BasedataDeviceType deviceType);

    int deleteBasedataDeviceTypeByDeviceTypeId(Long typeId);

    int deleteBasedataDeviceTypeByDeviceTypeIds(Long[] typeIds);

    Map getDeviceTypeIdByDeviceTypeName(BasedataDeviceType deviceType);

    BasedataDeviceType checkDeviceTypeNameUnique(@Param("deviceTypeName") String deviceTypeName, @Param("parentId") Long parentId);

    BasedataDeviceType checkDeviceTypeCodeUnique(@Param("deviceTypeCode") String deviceTypeCode, @Param("deviceTypeId") Long deviceTypeId);

    int getMaxDeviceTypeId();
}
