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:
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user