feat(admin): add fa_smoke CRUD APIs with Chinese comments (#45)

This commit is contained in:
root
2026-03-10 17:29:36 +08:00
parent 2ddb2403e4
commit a4b466744c
4 changed files with 2073 additions and 0 deletions
+37
View File
@@ -52,6 +52,43 @@ func registerAdminRoutes(
protected.GET("/watermark/video-parse-unlocks", handler.ListVideoParseUnlocks)
protected.GET("/watermark/video-download-failures", handler.ListVideoDownloadFailures)
// 戒烟小程序(fa_smoke)后台管理接口。
protected.GET("/smoke/logs", handler.ListSmokeLogs)
protected.GET("/smoke/logs/:id", handler.GetSmokeLog)
protected.POST("/smoke/logs", handler.CreateSmokeLog)
protected.PUT("/smoke/logs/:id", handler.UpdateSmokeLog)
protected.DELETE("/smoke/logs/:id", handler.DeleteSmokeLog)
protected.GET("/smoke/profiles", handler.ListSmokeProfiles)
protected.GET("/smoke/profiles/:id", handler.GetSmokeProfile)
protected.POST("/smoke/profiles", handler.CreateSmokeProfile)
protected.PUT("/smoke/profiles/:id", handler.UpdateSmokeProfile)
protected.DELETE("/smoke/profiles/:id", handler.DeleteSmokeProfile)
protected.GET("/smoke/ai-advices", handler.ListSmokeAIAdvices)
protected.GET("/smoke/ai-advices/:id", handler.GetSmokeAIAdvice)
protected.POST("/smoke/ai-advices", handler.CreateSmokeAIAdvice)
protected.PUT("/smoke/ai-advices/:id", handler.UpdateSmokeAIAdvice)
protected.DELETE("/smoke/ai-advices/:id", handler.DeleteSmokeAIAdvice)
protected.GET("/smoke/ai-unlocks", handler.ListSmokeAIUnlocks)
protected.GET("/smoke/ai-unlocks/:id", handler.GetSmokeAIUnlock)
protected.POST("/smoke/ai-unlocks", handler.CreateSmokeAIUnlock)
protected.PUT("/smoke/ai-unlocks/:id", handler.UpdateSmokeAIUnlock)
protected.DELETE("/smoke/ai-unlocks/:id", handler.DeleteSmokeAIUnlock)
protected.GET("/smoke/ai-next-smokes", handler.ListSmokeAINexts)
protected.GET("/smoke/ai-next-smokes/:id", handler.GetSmokeAINext)
protected.POST("/smoke/ai-next-smokes", handler.CreateSmokeAINext)
protected.PUT("/smoke/ai-next-smokes/:id", handler.UpdateSmokeAINext)
protected.DELETE("/smoke/ai-next-smokes/:id", handler.DeleteSmokeAINext)
protected.GET("/smoke/motivation-quotes", handler.ListSmokeMotivations)
protected.GET("/smoke/motivation-quotes/:id", handler.GetSmokeMotivation)
protected.POST("/smoke/motivation-quotes", handler.CreateSmokeMotivation)
protected.PUT("/smoke/motivation-quotes/:id", handler.UpdateSmokeMotivation)
protected.DELETE("/smoke/motivation-quotes/:id", handler.DeleteSmokeMotivation)
protected.GET("/memberships/overview", handler.MembershipOverview)
protected.GET("/memberships/redeem-codes", handler.ListMembershipRedeemCodes)
protected.POST("/memberships/redeem-codes", handler.CreateMembershipRedeemCodes)