feat: 添加核心金融模型、通知模型以及路由和通知仓库的基础结构

This commit is contained in:
2026-01-28 08:38:18 +08:00
parent 5d834204dd
commit 0414401ada
4 changed files with 24 additions and 59 deletions

View File

@@ -92,9 +92,6 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
interestService := service.NewInterestService(accountRepo, transactionRepo, db)
userSettingsServiceWithAccounts := service.NewUserSettingsServiceWithAccountRepo(userSettingsRepo, accountRepo)
// Feature: notification-center - Initialize notification service
notificationService := service.NewNotificationService(notificationRepo)
// Feature: health-score - Initialize health score service
healthScoreService := service.NewHealthScoreService(reportRepo, accountRepo, budgetRepo)
@@ -128,9 +125,6 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
defaultAccountHandler := handler.NewDefaultAccountHandler(userSettingsServiceWithAccounts)
interestHandler := handler.NewInterestHandler(interestService, nil)
// Feature: notification-center - Initialize notification handler
notificationHandler := handler.NewNotificationHandler(notificationService)
// Feature: health-score - Initialize health score handler
healthScoreHandler := handler.NewHealthScoreHandler(healthScoreService)
@@ -258,6 +252,9 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
// Register notification routes
notificationHandler.RegisterRoutes(protected)
// Register health score routes
healthScoreHandler.RegisterRoutes(protected)
}
}