package fr.eni.enchere.bll;

import fr.eni.enchere.bo.Article;
import fr.eni.enchere.bo.Categorie;
import fr.eni.enchere.bo.SearchArticleCritere;
import fr.eni.enchere.dal.ArticleRepositoryImpl;
import fr.eni.enchere.dal.CategorieRepository;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategorieServiceImpl implements CategorieService {
    private final ArticleRepositoryImpl articleRepositoryImpl;
    private CategorieRepository categorieRepository;

    public CategorieServiceImpl(CategorieRepository categorieRepository, ArticleRepositoryImpl articleRepositoryImpl) {
        this.categorieRepository = categorieRepository;
        this.articleRepositoryImpl = articleRepositoryImpl;
    }
    @Override
    public List<Categorie> findAllCategories() {
        return categorieRepository.findAllCategories();
    }

    @Override
    public Categorie findCategorieById(int id) {
        return categorieRepository.findCategorieById(id);
    }


}
