111 lines
4.3 KiB
Go
111 lines
4.3 KiB
Go
package dto
|
|
|
|
// OutfitCreateRequest 创建穿搭
|
|
type OutfitCreateRequest struct {
|
|
OutfitName string `json:"outfit_name" binding:"required,max=32"` // 穿搭名称
|
|
OutfitDesc string `json:"outfit_desc" binding:"max=500"` // 穿搭描述
|
|
Scene string `json:"scene" binding:"max=100"` // 适合场景
|
|
Source int8 `json:"source" binding:"oneof=1 2"` // 1=用户创建 2=AI推荐
|
|
Items []OutfitItemRequest `json:"items" binding:"required,min=1,max=10"`
|
|
}
|
|
|
|
// OutfitItemRequest 穿搭中的衣物
|
|
type OutfitItemRequest struct {
|
|
ClothesUUID string `json:"clothes_uuid" binding:"required"`
|
|
}
|
|
|
|
// OutfitCreateResponse 创建穿搭响应
|
|
type OutfitCreateResponse struct {
|
|
OutfitUUID string `json:"outfit_uuid"`
|
|
OutfitName string `json:"outfit_name"`
|
|
OutfitDesc string `json:"outfit_desc"`
|
|
Scene string `json:"scene"`
|
|
Source int8 `json:"source"` // 1=用户创建 2=AI推荐
|
|
IsPublic int8 `json:"is_public"` // 1=不公开 2=公开
|
|
AuditStatus int8 `json:"audit_status"` // 1=待审核 2=通过 3=不通过
|
|
Status int8 `json:"status"` // 1=正常 2=封禁 3=待用户保存(AI 推荐生成后未保存)
|
|
Items []OutfitItemResponse `json:"items"`
|
|
}
|
|
|
|
// OutfitItemResponse 穿搭明细
|
|
type OutfitItemResponse struct {
|
|
ClothesUUID string `json:"clothes_uuid"`
|
|
ProcessedImage string `json:"processed_image"` // 处理后图片可访问 URL(无则空)
|
|
}
|
|
|
|
// OutfitGetByUUIDRequest 获取穿搭详情
|
|
type OutfitGetByUUIDRequest struct {
|
|
OutfitUUID string `json:"outfit_uuid" binding:"required"` // 穿搭UUID
|
|
}
|
|
|
|
// OutfitGetByUUIDResponse 获取穿搭详情响应
|
|
type OutfitGetByUUIDResponse struct {
|
|
OutfitCreateResponse
|
|
}
|
|
|
|
// OutfitUpdateByUUIDRequest 修改穿搭
|
|
type OutfitUpdateByUUIDRequest struct {
|
|
OutfitUUID string `json:"outfit_uuid" binding:"required"` // 穿搭UUID
|
|
OutfitName string `json:"outfit_name" binding:"required,max=32"` // 穿搭名称
|
|
OutfitDesc string `json:"outfit_desc" binding:"max=500"` // 穿搭描述
|
|
Scene string `json:"scene" binding:"max=100"` // 适合场景
|
|
Items []OutfitItemRequest `json:"items" binding:"required,min=1,max=10"` // 穿搭中的衣物
|
|
}
|
|
|
|
// OutfitUpdateByUUIDResponse 修改穿搭响应
|
|
type OutfitUpdateByUUIDResponse struct{}
|
|
|
|
// OutfitListRequest 获取我的穿搭列表
|
|
type OutfitListRequest struct {
|
|
PageRequest
|
|
IsPublic int8 `form:"is_public" json:"is_public"` // 1=不公开 2=公开
|
|
Source int8 `form:"source" json:"source"` // 1=用户创建 2=AI推荐
|
|
}
|
|
|
|
// OutfitListResponse 我的穿搭列表响应
|
|
type OutfitListResponse struct {
|
|
PageResponse
|
|
List []OutfitCreateResponse `json:"list"`
|
|
}
|
|
|
|
// OutfitCommunityListRequest 社区穿搭列表请求
|
|
type OutfitCommunityListRequest struct {
|
|
PageRequest
|
|
}
|
|
|
|
// OutfitCommunityListResponse 社区穿搭列表响应
|
|
type OutfitCommunityListResponse struct {
|
|
PageResponse
|
|
List []OutfitCommunityItem `json:"list"`
|
|
}
|
|
|
|
// OutfitCommunityItem 社区穿搭列表项(含作者信息与互动计数)
|
|
type OutfitCommunityItem struct {
|
|
OutfitUUID string `json:"outfit_uuid"`
|
|
OutfitName string `json:"outfit_name"`
|
|
OutfitDesc string `json:"outfit_desc"`
|
|
Scene string `json:"scene"`
|
|
Source int8 `json:"source"` // 1=用户创建 2=AI推荐
|
|
CreatedAt int64 `json:"created_at"` // 秒级时间戳
|
|
Items []OutfitItemResponse `json:"items"`
|
|
OwnerName string `json:"owner_name"`
|
|
OwnerAvatar string `json:"owner_avatar"`
|
|
LikeCount int64 `json:"like_count"`
|
|
CollectCount int64 `json:"collect_count"`
|
|
}
|
|
|
|
// OutfitDeleteRequest 删除穿搭
|
|
type OutfitDeleteRequest struct {
|
|
OutfitUUID string `json:"outfit_uuid" binding:"required"`
|
|
}
|
|
|
|
// OutfitDeleteResponse 删除穿搭响应
|
|
type OutfitDeleteResponse struct{}
|
|
|
|
type OutfitPublicRequest struct {
|
|
OutfitUUID string `json:"outfit_uuid" binding:"required"` // 穿搭UUID
|
|
IsPublic int8 `json:"is_public" binding:"required,oneof=1 2"` // 1=不公开 2=公开
|
|
}
|
|
|
|
type OutfitPublicResponse struct{}
|