同步视频
This commit is contained in:
73
model/dto/tencent/video_dto.go
Normal file
73
model/dto/tencent/video_dto.go
Normal file
@@ -0,0 +1,73 @@
|
||||
package tencent
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// SyncVideoReq 同步视频素材请求
|
||||
type SyncVideoReq struct {
|
||||
g.Meta `path:"/syncVideo" method:"post" tags:"腾讯广告视频素材" summary:"同步视频素材" dc:"遍历所有账户,自动分页获取视频素材并保存到数据库"`
|
||||
AccessToken string `json:"access_token" dc:"访问令牌(可选,不传则从配置读取)"`
|
||||
}
|
||||
|
||||
// SyncVideoRes 同步视频素材响应
|
||||
type SyncVideoRes struct {
|
||||
TotalAccounts int `json:"total_accounts" dc:"处理的账户数"`
|
||||
TotalVideos int `json:"total_videos" dc:"总视频数"`
|
||||
SyncedCount int `json:"synced_count" dc:"同步成功数量"`
|
||||
Message string `json:"message" dc:"消息"`
|
||||
}
|
||||
|
||||
// ListVideoReq 获取视频素材列表请求(旧接口,无分页)
|
||||
type ListVideoReq struct {
|
||||
g.Meta `path:"/listVideo" method:"post" tags:"腾讯广告视频素材" summary:"获取视频素材列表" dc:"从本地数据库查询所有视频素材(无分页)"`
|
||||
}
|
||||
|
||||
// ListVideoPageReq 分页查询视频素材请求
|
||||
type ListVideoPageReq struct {
|
||||
g.Meta `path:"/listVideoPage" method:"post" tags:"腾讯广告视频素材" summary:"分页查询视频素材" dc:"支持分页、时间过滤、账户过滤等条件查询"`
|
||||
Page int `json:"page" dc:"页码" d:"1"`
|
||||
PageSize int `json:"page_size" dc:"每页数量" d:"20"`
|
||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
||||
}
|
||||
|
||||
// ListVideoQueryReq 视频素材查询请求(Service层使用)
|
||||
type ListVideoQueryReq struct {
|
||||
Page int `json:"page" dc:"页码"`
|
||||
PageSize int `json:"page_size" dc:"每页数量"`
|
||||
AccountId *int64 `json:"account_id,omitempty" dc:"账户ID(可选)"`
|
||||
StartTime *int64 `json:"start_time,omitempty" dc:"开始时间戳(秒,可选)"`
|
||||
EndTime *int64 `json:"end_time,omitempty" dc:"结束时间戳(秒,可选)"`
|
||||
Status string `json:"status,omitempty" dc:"状态筛选(可选)"`
|
||||
}
|
||||
|
||||
// ListVideoRes 获取视频素材列表响应
|
||||
type ListVideoRes struct {
|
||||
List []VideoItem `json:"list" dc:"视频素材列表"`
|
||||
Total int `json:"total" dc:"总记录数"`
|
||||
Page int `json:"page" dc:"当前页码"`
|
||||
PageSize int `json:"page_size" dc:"每页数量"`
|
||||
TotalPages int `json:"total_pages" dc:"总页数"`
|
||||
}
|
||||
|
||||
// VideoItem 视频素材项
|
||||
type VideoItem struct {
|
||||
Id int64 `json:"id" dc:"主键ID"`
|
||||
VideoId string `json:"video_id" dc:"视频ID"`
|
||||
AccountId int64 `json:"account_id" dc:"账户ID"`
|
||||
Width int `json:"width" dc:"宽度"`
|
||||
Height int `json:"height" dc:"高度"`
|
||||
VideoFrames int `json:"video_frames" dc:"视频帧数"`
|
||||
VideoFps int `json:"video_fps" dc:"帧率"`
|
||||
FileSize int64 `json:"file_size" dc:"文件大小"`
|
||||
Type string `json:"type" dc:"媒体类型"`
|
||||
Description string `json:"description" dc:"描述"`
|
||||
PreviewUrl string `json:"preview_url" dc:"预览URL"`
|
||||
KeyFrameImageUrl string `json:"key_frame_image_url" dc:"关键帧图片URL"`
|
||||
Status string `json:"status" dc:"状态"`
|
||||
CreatedTime int64 `json:"created_time" dc:"创建时间戳"`
|
||||
LastModifiedTime int64 `json:"last_modified_time" dc:"最后修改时间戳"`
|
||||
CreatedAt string `json:"created_at" dc:"数据库创建时间"`
|
||||
UpdatedAt string `json:"updated_at" dc:"数据库更新时间"`
|
||||
}
|
||||
Reference in New Issue
Block a user