package com.carmaintenance.repository;

import com.carmaintenance.entity.PartsInventory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * 配件库存Repository
 */
@Repository
public interface PartsInventoryRepository extends JpaRepository<PartsInventory, Integer> {

    Optional<PartsInventory> findByPartNo(String partNo);

    List<PartsInventory> findByCategory(String category);

    List<PartsInventory> findByStatus(Integer status);
}
