256 lines
6.9 KiB
Go
256 lines
6.9 KiB
Go
package dto
|
|
|
|
import (
|
|
"slogan-agent/styleagent/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type LoginReq struct {
|
|
g.Meta `path:"/login" method:"post" tags:"用户" summary:"登录"`
|
|
Account string `v:"required" json:"account"`
|
|
Password string `v:"required" json:"password"`
|
|
}
|
|
|
|
type LoginRes struct {
|
|
Token string `json:"token"`
|
|
User *LoginUser `json:"user"`
|
|
}
|
|
|
|
type LoginUser struct {
|
|
Id int64 `json:"id"`
|
|
Role string `json:"role"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type ChangePasswordReq struct {
|
|
g.Meta `path:"/change-password" method:"post" tags:"用户" summary:"修改密码"`
|
|
OldPassword string `v:"required" json:"old_password"`
|
|
NewPassword string `v:"required|min-length:6" json:"new_password"`
|
|
}
|
|
|
|
type RegisterReq struct {
|
|
g.Meta `path:"/register" method:"post" tags:"用户" summary:"注册"`
|
|
Account string `v:"required" json:"account"`
|
|
Password string `v:"required|min-length:6" json:"password"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type ProfileRes struct {
|
|
Id int64 `json:"id"`
|
|
Role string `json:"role"`
|
|
Name string `json:"name"`
|
|
Username string `json:"username"`
|
|
Phone string `json:"phone"`
|
|
}
|
|
|
|
type UserPhotoUploadReq struct {
|
|
g.Meta `path:"/upload" method:"post" tags:"照片" summary:"上传照片"`
|
|
Type int `v:"required|in:1,2,3,4" json:"type"`
|
|
}
|
|
|
|
type UserPhotoUploadRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type UserPhotoListReq struct {
|
|
g.Meta `path:"/list" method:"get" tags:"照片" summary:"照片列表"`
|
|
Type int `json:"type"`
|
|
}
|
|
|
|
type UserPhotoListRes struct {
|
|
List []*entity.UserPhoto `json:"list"`
|
|
}
|
|
|
|
type UserPhotoDeleteReq struct {
|
|
g.Meta `path:"/delete" method:"post" tags:"照片" summary:"删除照片"`
|
|
Id int64 `v:"required" json:"id"`
|
|
}
|
|
|
|
type WardrobeUploadReq struct {
|
|
g.Meta `path:"/upload" method:"post" tags:"衣橱" summary:"上传服装"`
|
|
Category string `v:"required|in:上衣,下装,鞋,配饰" json:"category"`
|
|
Season string `json:"season"`
|
|
StyleTags string `json:"style_tags"`
|
|
ColorInfo string `json:"color_info"`
|
|
}
|
|
|
|
type WardrobeUploadRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type WardrobeListReq struct {
|
|
g.Meta `path:"/list" method:"get" tags:"衣橱" summary:"衣橱列表"`
|
|
Category string `json:"category"`
|
|
}
|
|
|
|
type WardrobeListRes struct {
|
|
List []*entity.WardrobeItem `json:"list"`
|
|
}
|
|
|
|
type WardrobeUpdateReq struct {
|
|
g.Meta `path:"/update" method:"post" tags:"衣橱" summary:"更新服装"`
|
|
Id int64 `v:"required" json:"id"`
|
|
Category string `json:"category"`
|
|
Season string `json:"season"`
|
|
StyleTags string `json:"style_tags"`
|
|
}
|
|
|
|
type WardrobeDeleteReq struct {
|
|
g.Meta `path:"/delete" method:"post" tags:"衣橱" summary:"删除服装"`
|
|
Id int64 `v:"required" json:"id"`
|
|
}
|
|
|
|
type BodyMeasurementSaveReq struct {
|
|
g.Meta `path:"/save" method:"post" tags:"身形" summary:"保存身形参数"`
|
|
Height int `json:"height"`
|
|
Weight int `json:"weight"`
|
|
SkinTone int `v:"in:1,2,3,4,5" json:"skin_tone"`
|
|
FitParams string `json:"fit_params"`
|
|
}
|
|
|
|
type BodyMeasurementGetRes struct {
|
|
Height int `json:"height"`
|
|
Weight int `json:"weight"`
|
|
SkinTone int `json:"skin_tone"`
|
|
FitParams string `json:"fit_params"`
|
|
}
|
|
|
|
type AvatarBuildReq struct {
|
|
g.Meta `path:"/build" method:"post" tags:"化身" summary:"构建化身"`
|
|
}
|
|
|
|
type AvatarBuildRes struct {
|
|
AvatarId int64 `json:"avatar_id"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type AvatarGetRes struct {
|
|
FaceTemplateId int `json:"face_template_id"`
|
|
BodyTemplateId int `json:"body_template_id"`
|
|
SkinToneIndex int `json:"skin_tone_index"`
|
|
GlbUrl string `json:"glb_url"`
|
|
BuildStatus string `json:"build_status"`
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
type HairstyleListRes struct {
|
|
List []*entity.HairstyleAsset `json:"list"`
|
|
}
|
|
|
|
type OutfitGenerateReq struct {
|
|
g.Meta `path:"/generate" method:"post" tags:"穿搭" summary:"生成穿搭方案"`
|
|
StartDate string `v:"required|date" json:"start_date"`
|
|
EndDate string `v:"required|date" json:"end_date"`
|
|
Location string `v:"required" json:"location"`
|
|
}
|
|
|
|
type OutfitGenerateRes struct {
|
|
TaskId int64 `json:"task_id"`
|
|
}
|
|
|
|
type OutfitTaskStatusReq struct {
|
|
g.Meta `path:"/task/status" method:"get" tags:"穿搭" summary:"任务状态"`
|
|
TaskId int64 `v:"required" json:"task_id"`
|
|
}
|
|
|
|
type OutfitTaskStatusRes struct {
|
|
Status string `json:"status"`
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
type OutfitPlanListReq struct {
|
|
g.Meta `path:"/plan/list" method:"get" tags:"穿搭" summary:"方案列表"`
|
|
}
|
|
|
|
type OutfitPlanListRes struct {
|
|
List []*entity.OutfitPlan `json:"list"`
|
|
}
|
|
|
|
type OutfitPlanDetailReq struct {
|
|
g.Meta `path:"/plan/detail" method:"get" tags:"穿搭" summary:"方案详情"`
|
|
PlanId int64 `v:"required" json:"plan_id"`
|
|
}
|
|
|
|
type OutfitPlanDetailRes struct {
|
|
Plan *entity.OutfitPlan `json:"plan"`
|
|
Items []*entity.PlanOutfitItem `json:"items"`
|
|
Images []*entity.PlanEffectImage `json:"images"`
|
|
Hairstyle *entity.HairstyleAsset `json:"hairstyle,omitempty"`
|
|
}
|
|
|
|
type OutfitSelectMainReq struct {
|
|
g.Meta `path:"/plan/select-main" method:"post" tags:"穿搭" summary:"选定主方案"`
|
|
PlanId int64 `v:"required" json:"plan_id"`
|
|
}
|
|
|
|
type OutfitReviewReq struct {
|
|
g.Meta `path:"/plan/review" method:"post" tags:"穿搭" summary:"方案反馈"`
|
|
PlanId int64 `v:"required" json:"plan_id"`
|
|
Action string `v:"required|in:fav,unfav" json:"action"`
|
|
Note string `json:"note"`
|
|
}
|
|
|
|
type StoreListReq struct {
|
|
g.Meta `path:"/list" method:"get" tags:"门店" summary:"合作门店列表"`
|
|
Type int `json:"type"`
|
|
}
|
|
|
|
type StoreListRes struct {
|
|
List []*entity.PartnerStore `json:"list"`
|
|
}
|
|
|
|
type MemberPlanListReq struct {
|
|
g.Meta `path:"/plan/list" method:"get" tags:"会员" summary:"会员套餐列表"`
|
|
}
|
|
|
|
type MemberPlanListRes struct {
|
|
List []*entity.MemberPlan `json:"list"`
|
|
}
|
|
|
|
type MemberStatusReq struct {
|
|
g.Meta `path:"/status" method:"get" tags:"会员" summary:"我的会员状态"`
|
|
}
|
|
|
|
type MemberStatusRes struct {
|
|
IsVip bool `json:"is_vip"`
|
|
ExpireAt string `json:"expire_at"`
|
|
PlanName string `json:"plan_name"`
|
|
Benefits []string `json:"benefits"`
|
|
}
|
|
|
|
type MemberOrderCreateReq struct {
|
|
g.Meta `path:"/order/create" method:"post" tags:"会员" summary:"创建支付订单"`
|
|
PlanId int64 `v:"required" json:"plan_id"`
|
|
}
|
|
|
|
type MemberOrderCreateRes struct {
|
|
OrderNo string `json:"order_no"`
|
|
PayUrl string `json:"pay_url"`
|
|
}
|
|
|
|
type MemberOrderStatusReq struct {
|
|
g.Meta `path:"/order/status" method:"get" tags:"会员" summary:"订单状态"`
|
|
OrderNo string `v:"required" json:"order_no"`
|
|
}
|
|
|
|
type MemberOrderStatusRes struct {
|
|
Status string `json:"status"`
|
|
TradeNo string `json:"trade_no"`
|
|
PaidAt string `json:"paid_at"`
|
|
}
|
|
|
|
type AdRewardClaimReq struct {
|
|
g.Meta `path:"/reward/claim" method:"post" tags:"广告" summary:"领取广告激励"`
|
|
AdType string `v:"required|in:effect_extra,vip_trial" json:"ad_type"`
|
|
}
|
|
|
|
type AdRewardInfo struct {
|
|
AdType string `json:"ad_type"`
|
|
RemainingToday int `json:"remaining_today"`
|
|
}
|
|
|
|
type AdRewardClaimRes struct {
|
|
Reward *AdRewardInfo `json:"reward"`
|
|
}
|