lots of stuff, don't truly remember
This commit is contained in:
@@ -13,6 +13,7 @@ type User struct {
|
||||
Username string `gorm:"uniqueIndex;not null" json:"username"`
|
||||
Email string `gorm:"uniqueIndex;not null" json:"email"`
|
||||
Password string `gorm:"not null" json:"-"`
|
||||
Role string `gorm:"default:'athlete'" json:"role"`
|
||||
IsActive bool `gorm:"default:true" json:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
@@ -33,6 +34,14 @@ type Profile struct {
|
||||
MaxHR int `gorm:"default:0" json:"max_hr"`
|
||||
FTP int `gorm:"default:0" json:"ftp"`
|
||||
Weight float64 `gorm:"default:0" json:"weight"`
|
||||
Height float64 `gorm:"default:0" json:"height"` // cm
|
||||
Age int `gorm:"default:0" json:"age"`
|
||||
Gender string `gorm:"default:''" json:"gender"` // male, female
|
||||
NutritionGoal string `gorm:"default:''" json:"nutrition_goal"` // weight_loss, maintenance, performance
|
||||
TargetWeight float64 `gorm:"default:0" json:"target_weight"` // kg
|
||||
ActivityLevel string `gorm:"default:''" json:"activity_level"` // sedentary, lightly_active, active, very_active
|
||||
DietaryPref string `gorm:"default:''" json:"dietary_preference"` // balanced, high_carb, high_protein, keto
|
||||
Units string `gorm:"default:'metric'" json:"units"` // metric, imperial
|
||||
TotalRides int `gorm:"default:0" json:"total_rides"`
|
||||
TotalDistance float64 `gorm:"default:0" json:"total_distance"`
|
||||
TotalTime int `gorm:"default:0" json:"total_time"`
|
||||
@@ -102,4 +111,4 @@ func (prt *PasswordReset) IsValid() bool {
|
||||
|
||||
func (s *Session) IsValid() bool {
|
||||
return time.Now().Before(s.ExpiresAt)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user