Add user profile management for smoking data

- Introduced new API endpoints `GET /api/v1/smoke/profile` and `PUT /api/v1/smoke/profile` for retrieving and updating user smoking profiles.
- Added a new database table `fa_smoke_user_profile` to store user-specific smoking data, including daily smoking habits and motivations.
- Updated the smoke handler and service to integrate user profile data into AI advice generation.
- Enhanced documentation to reflect the new user profile features and their usage.
This commit is contained in:
nepiedg
2026-01-20 02:37:20 +00:00
parent 0b26ba6d35
commit dc54c4e934
11 changed files with 703 additions and 5 deletions
+3 -1
View File
@@ -16,12 +16,14 @@ import (
type SmokeHandler struct {
smokeLogService *smokeservice.SmokeLogService
smokeAIAdviceService *smokeservice.SmokeAIAdviceService
smokeProfileService *smokeservice.SmokeProfileService
}
func NewSmokeHandler(smokeLogService *smokeservice.SmokeLogService, smokeAIAdviceService *smokeservice.SmokeAIAdviceService) *SmokeHandler {
func NewSmokeHandler(smokeLogService *smokeservice.SmokeLogService, smokeAIAdviceService *smokeservice.SmokeAIAdviceService, smokeProfileService *smokeservice.SmokeProfileService) *SmokeHandler {
return &SmokeHandler{
smokeLogService: smokeLogService,
smokeAIAdviceService: smokeAIAdviceService,
smokeProfileService: smokeProfileService,
}
}