Enhance smoking tracking features with AI next smoke time suggestions
- Added new API endpoint `GET /api/v1/smoke/next_smoke_time` to provide AI-generated suggestions for the next smoking time based on user data. - Introduced a new database table `fa_smoke_ai_next_smoke` to store structured AI time node suggestions. - Updated smoke handler and service to integrate the new AI next smoke time functionality. - Enhanced documentation to reflect the new API endpoint and its usage, including details on how to generate AI time nodes.
This commit is contained in:
+4
-1
@@ -52,6 +52,7 @@ func main() {
|
||||
&smokemodel.SmokeUserProfile{},
|
||||
&smokemodel.SmokeAIAdvice{},
|
||||
&smokemodel.SmokeAIAdviceUnlock{},
|
||||
&smokemodel.SmokeAINextSmoke{},
|
||||
); err != nil {
|
||||
log.Fatalf("auto migrate failed: %v", err)
|
||||
}
|
||||
@@ -73,7 +74,9 @@ func main() {
|
||||
smokeLogService := smokeservice.NewSmokeLogService(database.DB)
|
||||
smokeAIAdviceService := smokeservice.NewSmokeAIAdviceService(database.DB, config.AppConfig.AI)
|
||||
smokeProfileService := smokeservice.NewSmokeProfileService(database.DB)
|
||||
smokeHandler := smokehandler.NewSmokeHandler(smokeLogService, smokeAIAdviceService, smokeProfileService)
|
||||
smokeNextService := smokeservice.NewSmokeNextService(database.DB)
|
||||
smokeAINextService := smokeservice.NewSmokeAINextSmokeService(database.DB, config.AppConfig.AI)
|
||||
smokeHandler := smokehandler.NewSmokeHandler(smokeLogService, smokeAIAdviceService, smokeProfileService, smokeNextService, smokeAINextService)
|
||||
|
||||
redeemCodeService := membershipservice.NewRedeemCodeService(database.DB, config.AppConfig.Admin.Token)
|
||||
redeemCodeHandler := membershiphandler.NewRedeemCodeHandler(redeemCodeService)
|
||||
|
||||
Reference in New Issue
Block a user