diff --git a/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackRequest.java b/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackRequest.java index fcf74b1..66d461a 100644 --- a/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackRequest.java +++ b/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackRequest.java @@ -1,6 +1,6 @@ package com.group7.demo.dtos; -import com.group7.demo.models.enums.BodyPart; +import com.group7.demo.models.enums.FeedbackMuscle; import lombok.Data; @Data @@ -10,7 +10,7 @@ public class FeedbackRequest { private Long userId; - private BodyPart bodyPart; + private FeedbackMuscle feedbackMuscle; private int weekNumber; diff --git a/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackResponse.java b/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackResponse.java index 629258e..55e6f2c 100644 --- a/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackResponse.java +++ b/backend/demo-group7/src/main/java/com/group7/demo/dtos/FeedbackResponse.java @@ -1,6 +1,6 @@ package com.group7.demo.dtos; -import com.group7.demo.models.enums.BodyPart; +import com.group7.demo.models.enums.FeedbackMuscle; import lombok.Builder; import lombok.Data; @@ -16,7 +16,7 @@ public class FeedbackResponse { private String username; // User's username - private BodyPart bodyPart; + private FeedbackMuscle feedbackMuscle; private int weekNumber; diff --git a/backend/demo-group7/src/main/java/com/group7/demo/dtos/mapper/Mapper.java b/backend/demo-group7/src/main/java/com/group7/demo/dtos/mapper/Mapper.java index 5c517e3..3566acb 100644 --- a/backend/demo-group7/src/main/java/com/group7/demo/dtos/mapper/Mapper.java +++ b/backend/demo-group7/src/main/java/com/group7/demo/dtos/mapper/Mapper.java @@ -213,7 +213,7 @@ public FeedbackResponse mapToFeedbackResponse(Feedback feedback) { .id(feedback.getId()) .trainingProgramTitle(feedback.getTrainingProgram().getTitle()) // Map training program title .username(feedback.getUser().getUsername()) // Map user's username - .bodyPart(feedback.getBodyPart()) // Map body part + .feedbackMuscle(feedback.getFeedbackMuscle()) // Map body part .weekNumber(feedback.getWeekNumber()) // Map week number .workoutNumber(feedback.getWorkoutNumber()) // Map workout number .exerciseNumber(feedback.getExerciseNumber()) // Map exercise number diff --git a/backend/demo-group7/src/main/java/com/group7/demo/models/Feedback.java b/backend/demo-group7/src/main/java/com/group7/demo/models/Feedback.java index 7c204cf..cd0fc6d 100644 --- a/backend/demo-group7/src/main/java/com/group7/demo/models/Feedback.java +++ b/backend/demo-group7/src/main/java/com/group7/demo/models/Feedback.java @@ -1,7 +1,7 @@ package com.group7.demo.models; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.group7.demo.models.enums.BodyPart; +import com.group7.demo.models.enums.FeedbackMuscle; import jakarta.persistence.*; import lombok.*; import java.time.LocalDateTime; @@ -28,7 +28,7 @@ public class Feedback { private User user; @Enumerated(EnumType.STRING) - private BodyPart bodyPart; + private FeedbackMuscle feedbackMuscle; private int weekNumber; diff --git a/backend/demo-group7/src/main/java/com/group7/demo/models/enums/FeedbackMuscle.java b/backend/demo-group7/src/main/java/com/group7/demo/models/enums/FeedbackMuscle.java new file mode 100644 index 0000000..46e39d7 --- /dev/null +++ b/backend/demo-group7/src/main/java/com/group7/demo/models/enums/FeedbackMuscle.java @@ -0,0 +1,33 @@ +package com.group7.demo.models.enums; + +public enum FeedbackMuscle { + TRAPEZIUS, + UPPER_BACK, + LOWER_BACK, + + /* Chest */ + CHEST, + + /* Arms */ + BICEPS, + TRICEPS, + FOREARM, + BACK_DELTOIDS, + FRONT_DELTOIDS, + + /* Abs */ + ABS, + OBLIQUES, + + /* Legs */ + ADDUCTOR, + HAMSTRING, + QUADRICEPS, + ABDUCTORS, + CALVES, + GLUTEAL, + + /* Head */ + HEAD, + NECK +} \ No newline at end of file diff --git a/backend/demo-group7/src/main/java/com/group7/demo/services/FeedbackService.java b/backend/demo-group7/src/main/java/com/group7/demo/services/FeedbackService.java index fb26dbe..4ea3f0b 100644 --- a/backend/demo-group7/src/main/java/com/group7/demo/services/FeedbackService.java +++ b/backend/demo-group7/src/main/java/com/group7/demo/services/FeedbackService.java @@ -52,7 +52,7 @@ public FeedbackResponse addFeedback(FeedbackRequest feedbackRequest, HttpServlet Feedback feedback = Feedback.builder() .trainingProgram(trainingProgram) .user(user) - .bodyPart(feedbackRequest.getBodyPart()) + .feedbackMuscle(feedbackRequest.getFeedbackMuscle()) .weekNumber(feedbackRequest.getWeekNumber()) .workoutNumber(feedbackRequest.getWorkoutNumber()) .exerciseNumber(feedbackRequest.getExerciseNumber())