feat: 添加通知管理功能,包括服务层逻辑和HTTP API处理。

This commit is contained in:
2026-01-28 09:05:07 +08:00
parent e29c808451
commit a18564c2d8
2 changed files with 26 additions and 5 deletions

View File

@@ -25,11 +25,11 @@ func NewNotificationService(repo *repository.NotificationRepository) *Notificati
// CreateNotificationInput represents input for creating a notification
type CreateNotificationInput struct {
UserID uint
Type models.NotificationType
Title string
Content string
RelatedID *uint
UserID uint `json:"user_id" binding:"required"`
Type models.NotificationType `json:"type" binding:"required"`
Title string `json:"title" binding:"required"`
Content string `json:"content" binding:"required"`
RelatedID *uint `json:"related_id"`
}
// CreateNotification creates a new notification