diff --git a/serv_nginx/api_bb/internal/models/training_plan.go b/serv_nginx/api_bb/internal/models/training_plan.go index 551a9b8..a8092d6 100644 --- a/serv_nginx/api_bb/internal/models/training_plan.go +++ b/serv_nginx/api_bb/internal/models/training_plan.go @@ -3,41 +3,41 @@ package models import ( "time" - + "gorm.io/gorm" ) type TrainingPlan struct { - ID uint `json:"id" gorm:"primaryKey"` - UserID uint `json:"user_id" gorm:"not null;index"` - Title string `json:"title" gorm:"size:255;not null"` - Description string `json:"description" gorm:"type:text"` - Weeks int `json:"weeks" gorm:"not null;default:12"` // Длительность плана в неделях - WorkoutsPerWeek int `json:"workouts_per_week" gorm:"not null;default:3"` // Тренировок в неделю - TargetDistance string `json:"target_distance" gorm:"size:50"` // Целевая дистанция - TargetDate time.Time `json:"target_date"` // Дата цели - CurrentWeek int `json:"current_week" gorm:"default:1"` // Текущая неделя - Completed bool `json:"completed" gorm:"default:false"` // Завершен ли план - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + ID uint `json:"id" gorm:"primaryKey"` + UserID uint `json:"user_id" gorm:"not null;index"` + Title string `json:"title" gorm:"size:255;not null"` + Description string `json:"description" gorm:"type:text"` + Weeks int `json:"weeks" gorm:"not null;default:12"` // Длительность плана в неделях + WorkoutsPerWeek int `json:"workouts_per_week" gorm:"not null;default:3"` // Тренировок в неделю + TargetDistance string `json:"target_distance" gorm:"size:50"` // Целевая дистанция + TargetDate time.Time `json:"target_date"` // Дата цели + CurrentWeek int `json:"current_week" gorm:"default:1"` // Текущая неделя + Completed bool `json:"completed" gorm:"default:false"` // Завершен ли план + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` // Связи - User User `json:"user,omitempty" gorm:"foreignKey:UserID"` + User User `json:"user,omitempty" gorm:"foreignKey:UserID"` Workouts []TrainingWorkout `json:"workouts,omitempty" gorm:"foreignKey:PlanID"` } type TrainingWorkout struct { - ID uint `json:"id" gorm:"primaryKey"` - PlanID uint `json:"plan_id" gorm:"not null;index"` - Week int `json:"week" gorm:"not null"` // Неделя плана - Day int `json:"day" gorm:"not null"` // День недели (1-7) + ID uint `json:"id" gorm:"primaryKey"` + PlanID uint `json:"plan_id" gorm:"not null;index"` + Week int `json:"week" gorm:"not null"` // Неделя плана + Day int `json:"day" gorm:"not null"` // День недели (1-7) Type WorkoutType `json:"type" gorm:"type:varchar(20);not null"` - Description string `json:"description" gorm:"type:text"` - Distance float64 `json:"distance_km" gorm:"type:decimal(5,2)"` - Duration int `json:"duration_min"` - Completed bool `json:"completed" gorm:"default:false"` - CompletedAt *time.Time `json:"completed_at"` - CreatedAt time.Time `json:"created_at"` + Description string `json:"description" gorm:"type:text"` + Distance float64 `json:"distance_km" gorm:"type:decimal(5,2)"` + Duration int `json:"duration_min"` + Completed bool `json:"completed" gorm:"default:false"` + CompletedAt *time.Time `json:"completed_at"` + CreatedAt time.Time `json:"created_at"` } // BeforeCreate hooks @@ -72,4 +72,4 @@ type TrainingPlanCreateRequest struct { WorkoutsPerWeek int `json:"workouts_per_week" validate:"required,min=1,max=7"` TargetDistance string `json:"target_distance" validate:"max=50"` TargetDate time.Time `json:"target_date"` -} \ No newline at end of file +} diff --git a/serv_nginx/bbvue/src/views/Profile.vue b/serv_nginx/bbvue/src/views/Profile.vue index 342c13c..a6f3336 100644 --- a/serv_nginx/bbvue/src/views/Profile.vue +++ b/serv_nginx/bbvue/src/views/Profile.vue @@ -698,6 +698,7 @@ export default { isolation: isolate; /* Новое свойство */ background-image: none !important; + box-shadow: 0.2rem 0.2rem 0.3rem rgb(155, 155, 155); /* Явно убираем фоновое изображение */ } @@ -707,6 +708,7 @@ export default { object-fit: cover; transition: transform 0.3s ease; display: block; + box-shadow: 0.2rem 0.2rem 0.3rem rgb(155, 155, 155); /* Убедитесь, что block */ }