apskel-pos-backend/internal/contract/product_ingredient_contract.go
2025-08-03 23:55:51 +07:00

18 lines
924 B
Go

package contract
import (
"apskel-pos-be/internal/models"
"github.com/google/uuid"
)
type ProductIngredientContract interface {
Create(request *models.CreateProductIngredientRequest, organizationID uuid.UUID) (*models.ProductIngredientResponse, error)
GetByID(id uuid.UUID, organizationID uuid.UUID) (*models.ProductIngredientResponse, error)
GetByProductID(productID uuid.UUID, organizationID uuid.UUID) ([]*models.ProductIngredientResponse, error)
GetByIngredientID(ingredientID uuid.UUID, organizationID uuid.UUID) ([]*models.ProductIngredientResponse, error)
Update(id uuid.UUID, request *models.UpdateProductIngredientRequest, organizationID uuid.UUID) (*models.ProductIngredientResponse, error)
Delete(id uuid.UUID, organizationID uuid.UUID) error
BulkCreate(productID uuid.UUID, ingredients []models.CreateProductIngredientRequest, organizationID uuid.UUID) ([]*models.ProductIngredientResponse, error)
}