优化结构

This commit is contained in:
Yvan
2026-08-28 16:37:53 +08:00
parent 295ee5c49e
commit 6f9908d926
14 changed files with 56 additions and 58 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ func NewTaskUsecaseWithRegistry(repo TaskRepo, methods TaskMethodRegistry) *Task
return &TaskUsecase{TaskRepo: repo, methods: methods}
}
func (uc *TaskUsecase) RegisteredMethods() []TaskMethod { return uc.methods.List() }
func (uc *TaskUsecase) RegisteredMethods() []platformtask.Method { return uc.methods.List() }
func (uc *TaskUsecase) Validate(value *TimedTask) error {
if value.Name == "" {
@@ -165,7 +165,7 @@ func NewTaskApplicationUsecase(tasks *TaskUsecase, runtime TaskRuntime) *TaskApp
return &TaskApplicationUsecase{tasks: tasks, runtime: runtime}
}
func (uc *TaskApplicationUsecase) RegisteredMethods() []TaskMethod {
func (uc *TaskApplicationUsecase) RegisteredMethods() []platformtask.Method {
return uc.tasks.RegisteredMethods()
}