package interfaces import ( "mengstack/internal/app/middleware" "mengstack/internal/kernel/tenant" "mengstack/internal/modules/notification/application" "mengstack/internal/modules/notification/infrastructure" "github.com/gin-gonic/gin" "go.uber.org/fx" ) func SetupRoutes( r *gin.Engine, h *Handler, authMW gin.HandlerFunc, tenantResolver tenant.Resolver, ) { notifications := r.Group("/api/v1/notifications") notifications.Use(authMW, middleware.MultiTenant(tenantResolver)) { notifications.POST("", h.Create) notifications.GET("/:id", h.Get) notifications.DELETE("/:id", h.Delete) notifications.PUT("/:id/read", h.MarkAsRead) notifications.PUT("/read-all", h.MarkAllAsRead) notifications.GET("/unread-count", h.CountUnread) notifications.GET("/user/:userId", h.ListByUser) } } var Module = fx.Module("notification", fx.Provide( infrastructure.NewNotificationRepository, application.NewService, NewHandler, ), )