18 lines
924 B
Go
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)
|
||
|
|
}
|