Files
likedream/internal/api/v1/cpimage_req.go
T
sugarBecomer a6babba00d 🐛 适配新版ui
2026-03-24 19:36:16 +08:00

34 lines
1.3 KiB
Go

package v1
import (
"likedream-goframe/internal/ent/cptask"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
type UploadImageReq struct {
g.Meta `path:"/image/upload" method:"post" tags:"Image" summary:"上传图片"`
File *ghttp.UploadFile `json:"file" v:"required#请上传图片"`
CpUserId int64 `json:"cpUserId" v:"required#请指定今日校园用户"`
TaskType cptask.TaskType `json:"taskType" v:"required#请指定任务类型"`
}
type GetUploadPolicyReq struct {
g.Meta `path:"/image/policy" method:"post" tags:"Image" summary:"获取图片上传策略"`
CpUserId int64 `json:"cpUserId" v:"required#请指定今日校园用户"`
TaskType cptask.TaskType `json:"taskType" v:"required#请指定任务类型"`
}
type GetPreviewUrlReq struct {
g.Meta `path:"/image/previewUrl" method:"post" tags:"Image" summary:"获取图片预览地址"`
CpUserId int64 `json:"cpUserId" v:"required#请指定今日校园用户"`
TaskType cptask.TaskType `json:"taskType" v:"required#请指定任务类型"`
FileKey string `json:"fileKey" v:"required#请指定文件key"`
}
type PreviewImageReq struct {
g.Meta `path:"/image/preview" method:"get" tags:"Image" summary:"预览图片"`
Key string `json:"key" v:"required#请指定图片key" in:"query"`
}