Add Customer users

This commit is contained in:
Aditya Siregar
2025-08-03 23:55:51 +07:00
parent 96743cf50b
commit 5741243425
69 changed files with 3005 additions and 158 deletions
+38
View File
@@ -0,0 +1,38 @@
package service
import (
"apskel-pos-be/internal/models"
"context"
"github.com/google/uuid"
)
type IngredientServiceImpl struct {
ingredientProcessor IngredientProcessor
}
func NewIngredientService(ingredientProcessor IngredientProcessor) *IngredientServiceImpl {
return &IngredientServiceImpl{
ingredientProcessor: ingredientProcessor,
}
}
func (s *IngredientServiceImpl) CreateIngredient(ctx context.Context, req *models.CreateIngredientRequest) (*models.IngredientResponse, error) {
return s.ingredientProcessor.CreateIngredient(ctx, req)
}
func (s *IngredientServiceImpl) UpdateIngredient(ctx context.Context, id uuid.UUID, req *models.UpdateIngredientRequest) (*models.IngredientResponse, error) {
return s.ingredientProcessor.UpdateIngredient(ctx, id, req)
}
func (s *IngredientServiceImpl) DeleteIngredient(ctx context.Context, id uuid.UUID) error {
return s.ingredientProcessor.DeleteIngredient(ctx, id)
}
func (s *IngredientServiceImpl) GetIngredientByID(ctx context.Context, id uuid.UUID) (*models.IngredientResponse, error) {
return s.ingredientProcessor.GetIngredientByID(ctx, id)
}
func (s *IngredientServiceImpl) ListIngredients(ctx context.Context, organizationID uuid.UUID, outletID *uuid.UUID, page, limit int, search string) (*models.PaginatedResponse[models.IngredientResponse], error) {
return s.ingredientProcessor.ListIngredients(ctx, organizationID, outletID, page, limit, search)
}