This commit is contained in:
Aditya Siregar
2025-09-13 02:17:51 +07:00
parent 75ec5274d2
commit 4f6208e479
17 changed files with 398 additions and 207 deletions
+6 -6
View File
@@ -56,12 +56,12 @@ type OrderIngredientTransactionRepository interface {
BulkCreate(ctx context.Context, transactions []*entities.OrderIngredientTransaction) error
}
type ProductIngredientRepository interface {
Create(ctx context.Context, productIngredient *entities.ProductIngredient) error
GetByID(ctx context.Context, id, organizationID uuid.UUID) (*entities.ProductIngredient, error)
GetByProductID(ctx context.Context, productID, organizationID uuid.UUID) ([]*entities.ProductIngredient, error)
GetByIngredientID(ctx context.Context, ingredientID, organizationID uuid.UUID) ([]*entities.ProductIngredient, error)
Update(ctx context.Context, productIngredient *entities.ProductIngredient) error
type ProductRecipeRepository interface {
Create(ctx context.Context, productRecipe *entities.ProductRecipe) error
GetByID(ctx context.Context, id, organizationID uuid.UUID) (*entities.ProductRecipe, error)
GetByProductID(ctx context.Context, productID, organizationID uuid.UUID) ([]*entities.ProductRecipe, error)
GetByIngredientID(ctx context.Context, ingredientID, organizationID uuid.UUID) ([]*entities.ProductRecipe, error)
Update(ctx context.Context, productRecipe *entities.ProductRecipe) error
Delete(ctx context.Context, id, organizationID uuid.UUID) error
DeleteByProductID(ctx context.Context, productID, organizationID uuid.UUID) error
}