Files
backend_v2/internal/dto/favorite.go
toom1996 1fd9c48f58 update
2026-09-02 21:51:35 +08:00

28 lines
905 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package dto
// ---------- 收藏 ----------
// FavoriteItem 对外返回的收藏项:id 即 target_uid,便于前端直接比对卡片 id。
type FavoriteItem struct {
ID string `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Cover string `json:"cover"`
Brand string `json:"brand"`
AddedAt uint32 `json:"added_at"`
}
// FavoriteAdd 添加收藏请求体。target_uid 为前端卡片的 it.id(编码串)。
type FavoriteAdd struct {
TargetType string `json:"target_type" binding:"required"` // runway | street
TargetUID string `json:"target_uid" binding:"required"`
Title string `json:"title"`
Cover string `json:"cover"`
Brand string `json:"brand"`
}
// FavoriteCheck 批量查询哪些 target_uid 已收藏(列表页打勾用,与收藏总量解耦)。
type FavoriteCheck struct {
IDs []string `json:"ids" binding:"required"`
}