package com.bonus.material.devConfig.mapper;

import com.bonus.material.devConfig.domain.EquipmentProperty;
import com.bonus.material.devConfig.domain.EquipmentPropertyDTO;

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

import java.util.List;

@Mapper
public interface EquipmentPropertyMapper {
    void deleteById(@Param("id") Long id);

    void update(EquipmentProperty equipmentProperty);

    void insert(EquipmentProperty equipmentProperty);


    EquipmentProperty getByPropertyName(EquipmentProperty equipmentProperty);
    void updateById(EquipmentProperty equipmentProperty);







    List<EquipmentProperty> selectByTypeId(@Param("typeId") Long typeId);

    List<EquipmentProperty> selectByType(@Param("typeId") Long typeId);

    EquipmentProperty selectById(@Param("typeId") Long id);

    List<EquipmentProperty> selectAll();


    // 新增关联查询方法
    List<EquipmentPropertyDTO> selectTypeWithProperties(@Param("typeId") Long typeId);
    List<EquipmentPropertyDTO> selectAllTypesWithProperties();
    EquipmentPropertyDTO selectTypeDetailWithProperties(@Param("typeId") Long typeId);

    List<EquipmentProperty> selectNameByTypeId(@Param("typeId") Long typeId);
}
