Potion/internal/domain/recipe/repository.go
Hayden Hargreaves 7951945c3b (FEAT): Recipe editing is complete!
This will be deployed for testing!
2026-02-01 00:30:13 -07:00

19 lines
751 B
Go

package domain
type RecipeRepository interface {
CreateRecipe(recipe *Recipe) error
EditRecipe(recipe *Recipe, userId int) error
DeleteRecipe(recipeId int) error
GetRecipe(id int, userId *int) (*Recipe, error)
GetRecipes(ids []int, userId *int) ([]Recipe, error)
SearchRecipes(filters SearchFilters, userId *int, favorites bool) ([]int, error)
CreateRecipeTags(recipe Recipe, tags []string) error
UpdateRecipeTags(recipe Recipe, tags []string) error
GetUserRecipesIds(userId int) ([]int, error)
GetUserFavoriteRecipesIds(userId int) ([]int, error)
GetRecipeTags(recipe *Recipe) error
GetRecipeFavorite(recipe *Recipe, userId int) error
GetRecipeOfTheWeekId(userId *int) (*int, error)
IsRecipeOwner(userId, recipeId int) (bool, error)
}