package idm3.project.gallery.repository;

import idm3.project.gallery.model.Showcase;
import org.springframework.data.repository.ListCrudRepository;
import org.springframework.scheduling.annotation.Async;

import java.util.List;
import java.util.concurrent.CompletableFuture;

public interface ShowcaseRepository extends ListCrudRepository<Showcase, Integer> {

    @Async
    CompletableFuture<List<Showcase>> findByTheme_NameContainingIgnoreCaseOrDescriptionContainingIgnoreCase(String name, String description);
}