fix:分享

This commit is contained in:
2026-09-13 23:32:22 +08:00
parent 646fd99887
commit 77eec37af1
17 changed files with 903 additions and 28 deletions
+54
View File
@@ -0,0 +1,54 @@
package dto
// OutfitShareCreateRequest 创建穿搭分享
type OutfitShareCreateRequest struct {
OutfitUUID string `json:"outfit_uuid" binding:"required"` // 穿搭UUID
}
// OutfitShareCreateResponse 创建穿搭分享响应
type OutfitShareCreateResponse struct {
ShareUUID string `json:"share_uuid"` // 分享UUID,供他人访问分享详情
}
// OutfitShareDetailResponse 穿搭分享详情(访客 / 属主视角)
type OutfitShareDetailResponse struct {
ShareUUID string `json:"share_uuid"`
OwnerName string `json:"owner_name"`
OwnerAvatar string `json:"owner_avatar"`
Status int8 `json:"status"` // 1=正常 2=已取消
IsOwner bool `json:"is_owner"` // 是否本人分享
Outfit OutfitCreateResponse `json:"outfit"` // 穿搭内容(含 items 的 processed_image)
}
// OutfitShareItemResponse 穿搭分享列表项
type OutfitShareItemResponse struct {
ShareUUID string `json:"share_uuid"`
OutfitUUID string `json:"outfit_uuid"`
OutfitName string `json:"outfit_name"`
CoverImage string `json:"cover_image"` // 封面(首件衣物抠图 URL,无则空)
ItemsCount int `json:"items_count"` // 包含衣物数量
Status int8 `json:"status"` // 1=正常 2=已取消
OwnerName string `json:"owner_name"` // 分享者昵称("分享给我的"列表返回)
OwnerAvatar string `json:"owner_avatar"`
CreatedAt int64 `json:"created_at"` // 分享创建时间(秒)
}
// OutfitShareListRequest 穿搭分享列表请求
type OutfitShareListRequest struct {
PageRequest
Status int8 `form:"status" json:"status"` // 状态 1=正常 2=已取消(0 不筛选)
}
// OutfitShareListResponse 穿搭分享列表响应
type OutfitShareListResponse struct {
PageResponse
List []OutfitShareItemResponse `json:"list"`
}
// OutfitShareCancelRequest 取消穿搭分享
type OutfitShareCancelRequest struct {
ShareUUID string `json:"share_uuid" binding:"required"`
}
// OutfitShareCancelResponse 取消穿搭分享响应
type OutfitShareCancelResponse struct{}