Refactor brand service and related components

- Removed ListQuestionVersions method and associated types from BrandService and Queries.
- Updated PromptRuleGenerationService to change task naming and handling.
- Enhanced ScheduleTaskService to support filtering by created date range and keyword.
- Introduced InstantTaskService for managing instant tasks with appropriate filtering and response structures.
- Added InstantTaskHandler for handling API requests related to instant tasks.
- Created InstantTaskTab component for the admin web interface to display and manage instant tasks.
- Updated database migrations to rename source types for articles and generation tasks.
- Adjusted models and repository queries to reflect the removal of question version handling.
This commit is contained in:
2026-04-02 21:16:12 +08:00
parent 111498a65f
commit 8958cb44c0
36 changed files with 1378 additions and 358 deletions
+4 -1
View File
@@ -64,7 +64,6 @@ func RegisterRoutes(app *bootstrap.App) {
brands.POST("/:id/questions", brandHandler.CreateQuestion)
brands.PUT("/:id/questions/:qid", brandHandler.UpdateQuestion)
brands.DELETE("/:id/questions/:qid", brandHandler.DeleteQuestion)
brands.GET("/:id/question-versions", brandHandler.ListQuestionVersions)
brands.GET("/:id/competitors", brandHandler.ListCompetitors)
brands.POST("/:id/competitors", brandHandler.CreateCompetitor)
brands.PUT("/:id/competitors/:cid", brandHandler.UpdateCompetitor)
@@ -95,4 +94,8 @@ func RegisterRoutes(app *bootstrap.App) {
schedules.PUT("/:id", schHandler.Update)
schedules.DELETE("/:id", schHandler.Delete)
schedules.PUT("/:id/status", schHandler.ToggleStatus)
instantTasks := protected.Group("/tenant/instant-tasks")
instHandler := NewInstantTaskHandler(app)
instantTasks.GET("", instHandler.List)
}