package com.example.bricklog.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.example.bricklog.model.LegoBuild;

@Repository
public interface LegoBuildRepository extends JpaRepository<LegoBuild, Long> {

    List<LegoBuild> findByBuilderContainingIgnoreCase(String builder);
    
    List<LegoBuild> findByNameContainingIgnoreCase(String name);
    
    List<LegoBuild> findByNameContainingIgnoreCaseOrBuilderContainingIgnoreCase(String name, String builder);
}

