package com.erp.inventory.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.erp.inventory.entity.Warehouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 仓库Repository
 */
@Mapper
public interface WarehouseRepository extends BaseMapper<Warehouse> {

    /**
     * 根据ID查询仓库名称
     */
    @Select("SELECT name FROM warehouses WHERE id = #{id} LIMIT 1")
    String findNameById(Long id);
}
