package de.htwsaar.webshop.repository;

import de.htwsaar.webshop.repository.entities.Review;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.UUID;
import java.util.stream.Stream;

@Repository
public interface ReviewRepository extends JpaRepository<Review, Long> {
    Stream<Review> streamReviewsByArticleId(@NotNull @Positive Long id);

    List<Review> getReviewsByArticle_Uuid(UUID articleUuid);
}
