package internal

import (
	"context"
	"golang.source-fellows.com/training-fellow/booking/internal/model"
)

type TrainingListingService struct {
	trainingStore TrainingStore
}

func NewTrainingListingService(trainingStore TrainingStore) *TrainingListingService {
	return &TrainingListingService{trainingStore: trainingStore}
}

func (s TrainingListingService) GetAllTrainings(ctx context.Context) ([]*model.Training, error) {
	return s.trainingStore.FindTrainings(ctx)
}
