32 lines
841 B
Go
32 lines
841 B
Go
package model
|
|
|
|
// ImageScanRequest 图片审核请求结构
|
|
type ImageScanRequest struct {
|
|
Tasks []ImageTask `json:"tasks"`
|
|
Scenes []string `json:"scenes"`
|
|
}
|
|
|
|
// ImageTask 图片任务结构
|
|
type ImageTask struct {
|
|
DataID string `json:"dataId"`
|
|
URL string `json:"url,omitempty"`
|
|
Content string `json:"content,omitempty"` // base64编码的图片内容
|
|
}
|
|
|
|
// ImageScanResponse 图片审核响应结构
|
|
type ImageScanResponse struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data []struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
DataID string `json:"dataId"`
|
|
Results []struct {
|
|
Scene string `json:"scene"`
|
|
Label string `json:"label"`
|
|
Suggestion string `json:"suggestion"`
|
|
Rate float64 `json:"rate"`
|
|
} `json:"results"`
|
|
} `json:"data"`
|
|
}
|