Files
zt-closet-backend/internal/dto/notification.go
T
2026-09-11 01:41:52 +08:00

40 lines
1.3 KiB
Go

package dto
// NotificationListRequest 通知列表
type NotificationListRequest struct {
PageRequest
IsRead int8 `form:"is_read" binding:"omitempty,oneof=1 2"` // 1=未读 2=已读,不传=全部
MsgType int8 `form:"msg_type" binding:"omitempty,oneof=1 2 3"` // 1=点赞 2=订单 3=系统,不传=全部
}
// NotificationGetByUUIDRequest 获取通知详情
type NotificationGetByUUIDRequest struct {
NotificationUUID string `json:"notification_uuid" binding:"required"`
}
// NotificationGetByUUIDResponse 通知项
type NotificationGetByUUIDResponse struct {
NotificationUUID string `json:"notification_uuid"` // 消息UUID
MsgType int8 `json:"msg_type"` // 1=点赞通知 2=订单通知 3=系统通知
Title string `json:"title"`
Content string `json:"content"`
IsRead int8 `json:"is_read"` // 1=未读 2=已读
CreatedAt int64 `json:"created_at"`
}
// NotificationListResponse 通知列表
type NotificationListResponse struct {
PageResponse
List []NotificationGetByUUIDResponse `json:"list"`
}
// NotificationReadRequest 标记已读
type NotificationReadRequest struct {
NotificationUUID string `json:"notification_uuid" binding:"required"`
}
// NotificationUnreadResponse 未读数
type NotificationUnreadResponse struct {
UnreadCount int64 `json:"unread_count"`
}