Potion/internal/domain/recipe/repository.go
Hayden Hargreaves 79bee1cde7 (FEAT): Updated recipe repo to include recipe favorite status.
This means we need to pass the user id into the various methods that
call it. But, since it is a pointer, we can use nil if we don't have a
user to check with (this is noted in the service).
2025-07-15 19:17:41 -07:00

12 lines
379 B
Go

package domain
type RecipeRepository interface {
CreateRecipe(recipe *Recipe) error
GetRecipe(id int, userId *int) (*Recipe, error)
SearchRecipes(filters SearchFilters) ([]Recipe, error)
CreateRecipeTags(recipe Recipe, tags []string) error
GetUserRecipes(id int) ([]Recipe, error)
GetRecipeTags(recipe *Recipe) error
GetRecipeFavorite(recipe *Recipe, userId int) error
}