58 lines
1.6 KiB
Go
58 lines
1.6 KiB
Go
package model
|
|
|
|
// VideoScanRequest 视频审核请求结构
|
|
type VideoScanRequest struct {
|
|
Tasks []VideoTask `json:"tasks"`
|
|
Scenes []string `json:"scenes"`
|
|
}
|
|
|
|
// VideoTask 视频任务结构
|
|
type VideoTask struct {
|
|
DataID string `json:"dataId"`
|
|
URL string `json:"url"`
|
|
Interval int `json:"interval,omitempty"` // 截帧间隔,单位秒
|
|
MaxFrames int `json:"maxFrames,omitempty"` // 最大截帧数
|
|
}
|
|
|
|
// VideoScanResponse 视频审核响应结构
|
|
type VideoScanResponse struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data []struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
DataID string `json:"dataId"`
|
|
TaskID string `json:"taskId"`
|
|
URL string `json:"url"`
|
|
} `json:"data"`
|
|
}
|
|
|
|
// VideoResultResponse 视频审核结果响应结构
|
|
type VideoResultResponse struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data []struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
DataID string `json:"dataId"`
|
|
TaskID string `json:"taskId"`
|
|
Status string `json:"status"`
|
|
Results []struct {
|
|
Scene string `json:"scene"`
|
|
Label string `json:"label"`
|
|
Suggestion string `json:"suggestion"`
|
|
Rate float64 `json:"rate"`
|
|
Frames []struct {
|
|
Offset int `json:"offset"`
|
|
URL string `json:"url"`
|
|
Results []struct {
|
|
Scene string `json:"scene"`
|
|
Label string `json:"label"`
|
|
Suggestion string `json:"suggestion"`
|
|
Rate float64 `json:"rate"`
|
|
} `json:"results"`
|
|
} `json:"frames"`
|
|
} `json:"results"`
|
|
} `json:"data"`
|
|
}
|