package com.zioinfo.mes.warehouse.mapper;

import com.zioinfo.mes.warehouse.MesLocation;
import com.zioinfo.mes.warehouse.MesWarehouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WarehouseMapper {
    List<MesWarehouse> findAll(@Param("status") String status);
    MesWarehouse findById(@Param("id") Long id);
    int countByCode(@Param("warehouseCode") String warehouseCode, @Param("excludeId") Long excludeId);
    int insert(MesWarehouse w);
    int update(MesWarehouse w);
    int delete(@Param("id") Long id);

    // locations
    List<MesLocation> findLocations(@Param("warehouseCode") String warehouseCode);
    int insertLocation(MesLocation l);
    int deleteLocation(@Param("id") Long id);
}
