feat: 添加核心金融模型、通知模型以及路由和通知仓库的基础结构
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user