package de.effigenix.domain.production;

import de.effigenix.shared.common.RepositoryError;
import de.effigenix.shared.common.Result;

import java.util.List;
import java.util.Optional;

public interface RecipeRepository {

    Result<RepositoryError, Optional<Recipe>> findById(RecipeId id);

    Result<RepositoryError, List<Recipe>> findAll();

    Result<RepositoryError, Void> save(Recipe recipe);

    Result<RepositoryError, Void> delete(Recipe recipe);

    Result<RepositoryError, Boolean> existsByNameAndVersion(String name, int version);

    Result<RepositoryError, List<Recipe>> findByStatus(RecipeStatus status);

    Result<RepositoryError, List<Recipe>> findByArticleId(String articleId);
}
