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:
@@ -10,6 +10,10 @@ func registerSmokeRoutes(protected *gin.RouterGroup, smokeHandler *smokehandler.
|
||||
// 戒烟/抽烟记录(与 video 去水印功能在路由前缀上区分开)
|
||||
smoke := protected.Group("/smoke")
|
||||
{
|
||||
// 首次进入/基础信息(用于基准、AI 个性化、作息规避等)
|
||||
smoke.GET("/profile", smokeHandler.GetProfile)
|
||||
smoke.PUT("/profile", smokeHandler.UpsertProfile)
|
||||
|
||||
smoke.GET("/dashboard", smokeHandler.Dashboard)
|
||||
smoke.POST("/logs", smokeHandler.Create)
|
||||
smoke.GET("/logs", smokeHandler.List)
|
||||
|
||||
Reference in New Issue
Block a user