完成任务5

This commit is contained in:
2025-10-30 17:39:05 +08:00
parent 5b064b4015
commit 8ce553a9e4
8 changed files with 547 additions and 547 deletions

View File

@@ -11,20 +11,20 @@ import (
// SendTestNotificationRequest 定义了发送测试通知请求的 JSON 结构
type SendTestNotificationRequest struct {
// Type 指定要测试的通知渠道
Type notify.NotifierType `json:"type" binding:"required"`
Type notify.NotifierType `json:"type" validate:"required"`
}
// ListNotificationRequest 定义了获取通知列表的请求参数
type ListNotificationRequest struct {
Page int `form:"page,default=1"`
PageSize int `form:"pageSize,default=10"`
UserID *uint `form:"user_id"`
NotifierType *notify.NotifierType `form:"notifier_type"`
Status *models.NotificationStatus `form:"status"`
Level *zapcore.Level `form:"level"`
StartTime *time.Time `form:"start_time"`
EndTime *time.Time `form:"end_time"`
OrderBy string `form:"order_by"`
Page int `query:"page"`
PageSize int `query:"pageSize"`
UserID *uint `query:"user_id"`
NotifierType *notify.NotifierType `query:"notifier_type"`
Status *models.NotificationStatus `query:"status"`
Level *zapcore.Level `query:"level"`
StartTime *time.Time `query:"start_time"`
EndTime *time.Time `query:"end_time"`
OrderBy string `query:"order_by"`
}
// NotificationDTO 是用于API响应的通知结构