package de.htwsaar.webshop.repository;

import de.htwsaar.webshop.repository.entities.Article;
import lombok.NonNull;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;
import java.util.UUID;

@Repository
@SuppressWarnings("unused")
public interface ArticleRepository extends JpaRepository<Article, Long> {
    Optional<Article> findArticleById(@NonNull Long id);

    Optional<Article> findArticleByName(@NonNull String Name);

    Optional<Article> findArticleByUuid(@NonNull UUID uuid);

    void deleteByUuid(UUID uuid);
}
