优化结构

This commit is contained in:
Yvan
2026-08-23 00:38:33 +08:00
parent 64459574b2
commit 4e5071ee65
22 changed files with 301 additions and 127 deletions
+24
View File
@@ -0,0 +1,24 @@
// Package modules owns the static declarations of built-in business modules.
// It is intentionally separate from app: modules describe what they provide,
// while app composes runtime objects that need constructed dependencies.
package modules
import (
integrationmodule "kra/internal/modules/integration"
paymentmodule "kra/internal/modules/payment"
systemmodule "kra/internal/modules/system"
taskmodule "kra/internal/modules/task"
"kra/pkg/module"
)
// Catalog returns the modules enabled in this binary in dependency order.
// Keep this as the single static registration point for migrations, admin
// metadata and dependency-free timed tasks.
func Catalog() module.Catalog {
return module.Catalog{Definitions: []module.Definition{
systemmodule.Definition(),
integrationmodule.Definition(),
taskmodule.Definition(),
paymentmodule.Definition(),
}}
}