From 54d5164b730ba1d9819001c35e9a7ea713db746d Mon Sep 17 00:00:00 2001 From: furu04 Date: Tue, 17 Jun 2025 11:03:25 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=93=E3=82=B8=E3=83=8D=E3=82=B9=E3=83=AD?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/workout_service.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/services/workout_service.py b/app/services/workout_service.py index e69de29..226e50d 100644 --- a/app/services/workout_service.py +++ b/app/services/workout_service.py @@ -0,0 +1,15 @@ +from app.repositories.workout_repository import WorkoutRepository +from app.models.workout import Workout + +class WorkoutService: + def __init__(self): + self.workout_repository = WorkoutRepository() + + def get_all_workouts(self): + return self.workout_repository.get_all() + + def get_workout_by_id(self, workout_id): + workout = self.workout_repository.get_by_id(workout_id) + if not workout: + return None + return workout \ No newline at end of file