modified: serv_nginx/api_bb/internal/handlers/handlers.go

new file:   serv_nginx/api_bb/internal/handlers/user_workout_handler.go
	modified:   serv_nginx/api_bb/internal/models/workout.go
	modified:   serv_nginx/api_bb/internal/repository/workout_repository.go
	modified:   serv_nginx/api_bb/internal/routes/routes.go
	new file:   serv_nginx/api_bb/internal/service/user_workout_service.go
	new file:   serv_nginx/api_bb/pkg/utils/response.go
	new file:   serv_nginx/api_bb/pkg/utils/validation.go
add workout EndPoints for workout struct, CRUD operations and logics
This commit is contained in:
2025-10-19 08:20:21 +05:00
parent 15c59b2f55
commit 6c02f11570
8 changed files with 1077 additions and 9 deletions
@@ -3,6 +3,7 @@ package repository
import (
"api_bb/internal/models"
"errors"
"fmt"
"time"
@@ -26,6 +27,10 @@ type workoutRepository struct {
db *gorm.DB
}
var (
ErrNotFound = errors.New("record not found")
)
func NewWorkoutRepository(db *gorm.DB) WorkoutRepository {
return &workoutRepository{db: db}
}