modified: serv_nginx/api_bb/internal/database/migrate.go
modified: serv_nginx/api_bb/internal/handlers/handlers.go new file: serv_nginx/api_bb/internal/handlers/personal_best_handler.go modified: serv_nginx/api_bb/internal/models/personal_best.go modified: serv_nginx/api_bb/internal/models/user_stats.go modified: serv_nginx/api_bb/internal/repository/personal_best_repository.go modified: serv_nginx/api_bb/internal/routes/routes.go modified: serv_nginx/api_bb/internal/service/personal_best_service.go modified: serv_nginx/bbvue/src/stores/user.js personal bests add handler, rout, service, repository, logic and migrations for
This commit is contained in:
@@ -70,4 +70,16 @@ type PersonalBestUpdateRequest struct {
|
||||
EventName string `json:"event_name" validate:"omitempty,max=255"`
|
||||
Location string `json:"location" validate:"omitempty,max=255"`
|
||||
Verified bool `json:"verified"`
|
||||
}
|
||||
|
||||
// PersonalBestsSummary представляет сводку лучших результатов по дистанциям
|
||||
type PersonalBestsSummary struct {
|
||||
Best5K string `json:"best_5k,omitempty"`
|
||||
Best5KPace string `json:"best_5k_pace,omitempty"`
|
||||
Best10K string `json:"best_10k,omitempty"`
|
||||
Best10KPace string `json:"best_10k_pace,omitempty"`
|
||||
BestHalf string `json:"best_half_marathon,omitempty"`
|
||||
BestHalfPace string `json:"best_half_marathon_pace,omitempty"`
|
||||
BestMarathon string `json:"best_marathon,omitempty"`
|
||||
BestMarathonPace string `json:"best_marathon_pace,omitempty"`
|
||||
}
|
||||
@@ -58,11 +58,4 @@ type UserStatsResponse struct {
|
||||
WeeklyDistance float64 `json:"weekly_distance"`
|
||||
MonthlyDistance float64 `json:"monthly_distance"`
|
||||
PersonalBests PersonalBestsSummary `json:"personal_bests"`
|
||||
}
|
||||
|
||||
type PersonalBestsSummary struct {
|
||||
Best5K string `json:"best_5k"`
|
||||
Best10K string `json:"best_10k"`
|
||||
BestHalf string `json:"best_half"`
|
||||
BestMarathon string `json:"best_marathon"`
|
||||
}
|
||||
Reference in New Issue
Block a user