package service import ( "context" "kontor-api-gin/internal/models" "kontor-api-gin/internal/repository" "log/slog" ) type VendorService struct { repository *repository.VendorRepository } func NewVendorService(repo *repository.VendorRepository) *VendorService { service := &VendorService{repository: repo} return service } func (service *VendorService) List(context context.Context) ([]models.Vendor, error) { slog.Info("VendorService#List") return service.repository.FindAll(context) } func (service *VendorService) Get(context context.Context, id string) (models.Vendor, error) { slog.Info("VendorService#Get") return service.repository.GetById(context, id) }