Files
web_huakui_server/web/service/srv_videoinfo/define.go
T
rootandClaude Opus 4.7 85c0071fd8 feat: 从黄果 NET hgdjnet-server 9bfbafe 导入 HKDJ 官网后端
来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83
项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet
测试目录 /server/hkdj_net,App/Web API 30331/30332

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-10-16 11:20:04 +08:00

114 lines
7.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package srv_videoinfo
import (
"hkdj-web-server/pub/models/videoinformationmod"
"hkdj-web-server/pub/pubdef"
"time"
)
type VideoInfoReq struct {
Id *int64 `json:"id"` // Id
Title *string `json:"title"` // 标题
CreatorId *int64 `json:"creatorId"` // 作者Id
Status *videoinformationmod.InformationSatus `json:"status"` // 帖子上架状态
CategoryId *int64 `json:"categoryId"` // 分类Id
TopicId *int64 `json:"topicId"` // 专题Id
Tag *int64 `json:"tag" ` // 标签
IsHot *bool `json:"isHot"` // 是否热门
MediaType videoinformationmod.MediaType `json:"mediaType"` // 资源类型
CreatorName *string `json:"creatorName"` // 作者名称
Keyworld *string `json:"keyworld"` // 关键字
VideoTaskId *string `json:"videoTaskId"` // 视频任务id
VideoFileId *string `json:"videoFileId"` // 切片id(切片列表的ID)
IsTop *bool `json:"isTop" bson:"isTop"` // 是否置顶
IsH265 *bool `json:"isH265"` // 是否支持 H265
Sort int64 `json:"sort"` // 排序方式 0=创建时间 1=上架时间 2=更新时间 3=排序值 4=播放次数
pubdef.Page
StartTime *string `json:"startTime"` // 创建时间-开始
EndTime *string `json:"endTime"` // 创建时间-截止
OptionAccount *string `json:"optionAccount"` // 最后操作人
}
type VideoInfoResp struct {
Total int64 `json:"total"`
List videoinformationmod.VideoInformationList `json:"list"`
}
type AddVideoReq struct {
FileIds []string `json:"fileId"` // 资源id
}
type VideoInfoUpdate struct {
Title *string `json:"title,omitempty" bson:"title,omitempty"` // 帖子标题
Slug *string `json:"slug,omitempty" bson:"slug,omitempty"` // slug
AddedTime *time.Time `json:"addedTime,omitempty" bson:"addedTime,omitempty"`
CreatorId *int64 `json:"creatorId,omitempty" bson:"creatorId,omitempty"` // 作者Id
Keyworld *[]string `bson:"keyworld,omitempty" json:"keyworld"` //
MediaType *videoinformationmod.MediaType `json:"mediaType,omitempty" bson:"mediaType,omitempty"` // 资源类型
FirstTag *string `bson:"firstTag,omitempty" json:"firstTag,omitempty"` // 一级标签
SecondTags *[]string `bson:"secondTags,omitempty" json:"secondTags,omitempty"` // 二级标签标签
CoverImg *string `bson:"coverImg,omitempty" json:"coverImg,omitempty"` // 封面
UnencryptedImage *string `bson:"unencryptedImage,omitempty" json:"unencryptedImage"` // 不加密封面
Desc *string `bson:"desc,omitempty" json:"desc,omitempty"` // 详细描述
Remark *string `bson:"remark,omitempty" json:"remark,omitempty"` // 备注
Nodes *[]videoinformationmod.Node `json:"nodes,omitempty" bson:"nodes,omitempty"` // 节点
Status *videoinformationmod.InformationSatus `json:"status,omitempty" bson:"status,omitempty"` // 帖子上架状态
Sort *int64 `json:"sort,omitempty" bson:"sort,omitempty"` // 排序
Cover *string `json:"cover,omitempty" bson:"cover,omitempty"` // 视频封面
Height *int64 `json:"height,omitempty" bson:"height,omitempty"` // 分辨率高(视频才会存在)
Width *int64 `json:"width,omitempty" bson:"width,omitempty"` // 分辨率宽(视频才会存在)
VideoTime *int32 `bson:"videoTime,omitempty" json:"videoTime,omitempty"` // 影片长度
CategoryIds []int64 `json:"categoryIds" bson:"categoryIds"` // 分类ID集合,可为空;不传或空数组表示清空
TopicIds *[]int64 `json:"topicIds,omitempty" bson:"topicIds,omitempty"` // 专题ID
Tags *[]int64 `json:"tags,omitempty" bson:"tags,omitempty"` // 标签
IsHot *bool `json:"isHot,omitempty" bson:"isHot,omitempty"` // 是否热门
UpdatedAt *time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` // 更新时间
CreatorName *string `bson:"creatorName,omitempty"` // 作者名
IsTop *bool `json:"isTop,omitempty" bson:"isTop,omitempty"` // 是否置顶
Video *videoinformationmod.VideoInfo `bson:"video,omitempty"` // 视频
IsReIndexNow *bool `json:"isReIndexNow" bson:"isReIndexNow"` // 是否重新提交索引
IndexNow *int64 `bson:"indexNow,omitempty"`
Content *string `json:"content,omitempty" bson:"content,omitempty"`
SecondUpdatedAt *time.Time `json:"secondUpdatedAt,omitempty" bson:"secondUpdatedAt,omitempty"` // 二次修改时间
}
type VideoInfoUpdateReq struct {
Id int64 `json:"id" binding:"required"`
Param VideoInfoUpdate `json:"param" bson:"param"` // appId,唯一id
}
type VideoInfoDelReq struct {
Id int64 `json:"id" binding:"required"`
}
type AddVideoCollectionReq struct {
Title string `json:"title,omitempty" bson:"title,omitempty"` // 帖子标题
Slug string `json:"slug,omitempty" bson:"slug,omitempty"` // slug
Keyworld []string `bson:"keyworld,omitempty" json:"keyworld,omitempty"` // 关键字
FirstTag string `bson:"firstTag,omitempty" json:"firstTag,omitempty"` // 一级标签
SecondTags []string `bson:"secondTags,omitempty" json:"secondTags,omitempty"` // 二级标签标签
CoverImg string `bson:"coverImg,omitempty" json:"coverImg,omitempty"` // 封面
Desc string `bson:"desc,omitempty" json:"desc,omitempty"` // 详细描述
Remark string `bson:"remark,omitempty" json:"remark,omitempty"` // 备注
Tags []int64 `json:"tags,omitempty" bson:"tags,omitempty"` // 标签
CategoryIds []int64 `json:"categoryIds" bson:"categoryIds"` // 分类ID集合,可为空;不传或空数组表示清空
}
type SetFakeWatchTimesReq struct {
Ids []int64 `json:"ids"` // 视频ID集合,支持单个或批量
WatchTimesMin int64 `json:"watchTimesMin"` // 假观看次数随机最小值
WatchTimesMax int64 `json:"watchTimesMax"` // 假观看次数随机最大值
}
type SetFakeCountResp struct {
MatchedCount int64 `json:"matchedCount"` // 匹配到的视频数量
ModifiedCount int64 `json:"modifiedCount"` // 实际修改的视频数量
}
// SetVideoCategoryReq 单/批量设置视频分类请求
type SetVideoCategoryReq struct {
Ids []int64 `json:"ids"` // 视频ID集合,传1个表示单条设置,传多个表示批量设置
CategoryIds []int64 `json:"categoryIds"` // 分类ID集合,可为空;不传或空数组表示清空
}