Initial commit: web_hghl_server
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
package srv_videoinfo
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/pub/models/videoinformationmod"
|
||||
"videoweb/pub/pubdef"
|
||||
)
|
||||
|
||||
type VideoInfoReq struct {
|
||||
Id *int64 `json:"id"` //
|
||||
ActressIds *[]int64 `json:"actressIds" bson:"actressIds"` // 女优ID
|
||||
Title *string `json:"title"` // 标题
|
||||
Bango *string `json:"bango"` // 番号,
|
||||
CreatorId *int64 `json:"creatorId"` // 作者Id
|
||||
Status *pubdef.InformationStatus `json:"status"` // 帖子上架状态
|
||||
Tag *int64 `json:"tag" ` // 标签
|
||||
IsHot *bool `json:"isHot"` // 是否热门
|
||||
IsRecommend *bool `json:"isRecommend"` // 是否推荐 true-推荐 false-不推荐
|
||||
MediaType *videoinformationmod.MediaType `json:"mediaType"` // 资源类型
|
||||
CreatorName *string `json:"creatorName"` // 作者名称
|
||||
Keyworld *string `json:"keyworld"` // 关键字
|
||||
CategoryId *int64 `json:"categoryId"` // 分类ID
|
||||
VideoTaskId *string `json:"videoTaskId"` // 视频任务id
|
||||
IsTop *bool `json:"isTop" bson:"isTop"` // 是否置顶
|
||||
VideoFileId *string `json:"videoFileId"` // 切片id(切片列表的ID)
|
||||
Sort int64 `json:"sort"` // 排序方式 0=创建时间 1=上架时间 2=更新时间 3=排序值 4=播放次数。按分类查询且排序方式为排序值时,使用该分类的 categoryRanks 排序
|
||||
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 SyncMediaFileReq struct {
|
||||
FileIds []string `json:"fileId"` // 媒资库影片 ID
|
||||
SourceVersion string `json:"sourceVersion,omitempty"` // v1 / v2
|
||||
FirstTagMap map[string]string `json:"firstTagMap,omitempty"` // 覆盖一级标签
|
||||
MinVideoSeconds int32 `json:"minVideoSeconds,omitempty"` // 最短时长,0 表示不限制
|
||||
VideoList []SyncMediaFileItem `json:"videoList,omitempty"` // 媒资库搜索结果,优先使用
|
||||
}
|
||||
|
||||
type SyncMediaFileItem struct {
|
||||
Id string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
FieldNameFs string `json:"fieldNameFs"`
|
||||
FirstTag string `json:"firstTag"`
|
||||
SecondTags []string `json:"secondTags"`
|
||||
VideoTime int32 `json:"videoTime"`
|
||||
CoverImg string `json:"coverImg"`
|
||||
Publish string `json:"publish"`
|
||||
Bango string `json:"bango"`
|
||||
TaskID string `json:"taskId"`
|
||||
Keyworld []string `json:"keyworld"`
|
||||
Width int64 `json:"width"`
|
||||
Height int64 `json:"height"`
|
||||
}
|
||||
|
||||
type SyncMediaFileResp struct {
|
||||
Synced int `json:"synced"`
|
||||
Failed int `json:"failed"`
|
||||
}
|
||||
type VideoInfoUpdate struct {
|
||||
Title *string `json:"title,omitempty" bson:"title,omitempty"` // 帖子标题
|
||||
Slug *string `json:"slug,omitempty" bson:"slug,omitempty"` // slug
|
||||
ActressIds *[]int64 `json:"actressIds" bson:"actressIds,omitempty"` // 女优ID
|
||||
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,omitempty"` //
|
||||
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 *pubdef.InformationStatus `json:"status,omitempty" bson:"status,omitempty"` // 帖子上架状态
|
||||
Sort *int64 `json:"sort,omitempty" bson:"sort,omitempty"` // 排序
|
||||
CategoryId *int64 `json:"categoryId" bson:"categoryId,omitempty"` // 分类ID
|
||||
CategoryRanks *[]videoinformationmod.VideoCategoryRank `json:"categoryRanks" bson:"categoryRanks,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"` // 影片长度
|
||||
|
||||
Tags *[]int64 `json:"tags,omitempty" bson:"tags,omitempty"` // 标签
|
||||
IsHot *bool `json:"isHot,omitempty" bson:"isHot,omitempty"` // 是否热门
|
||||
IsRecommend *bool `json:"isRecommend,omitempty" bson:"isRecommend,omitempty"` // 是否推荐 true-推荐 false-不推荐
|
||||
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"`
|
||||
IssuedAt *time.Time `json:"issuedAt" bson:"issuedAt"` // 发行时间
|
||||
IssuedBrand *string `json:"issuedBrand" bson:"issuedBrand"` // 发行商
|
||||
Bango *string `bson:"bango,omitempty" json:"bango"` // 番号,唯一
|
||||
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"` // 帖子标题
|
||||
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"` // 标签
|
||||
}
|
||||
|
||||
type VideoAddTagsReq struct {
|
||||
VideoIds []int64 `json:"videoIds" binding:"required"` // 视频ID集合
|
||||
Tags []int64 `json:"tags" binding:"required"` // 统一标签ID集合
|
||||
}
|
||||
|
||||
type VideoSetTagsReq struct {
|
||||
Ids []int64 `json:"ids" binding:"required"` // 视频ID集合,传1个表示单条设置,传多个表示批量设置
|
||||
TagIds *[]int64 `json:"tagIds"` // 标签ID集合,可设置多个标签,传空数组表示清空标签,不传表示参数错误
|
||||
}
|
||||
|
||||
type SetFakeLikesReq struct {
|
||||
Ids []int64 `json:"ids"` // 视频ID集合,支持单个或批量
|
||||
LikesMin int64 `json:"likesMin"` // 假点赞数随机最小值,包含该值
|
||||
LikesMax int64 `json:"likesMax"` // 假点赞数随机最大值,包含该值
|
||||
}
|
||||
|
||||
type SetFakeWatchTimesReq struct {
|
||||
Ids []int64 `json:"ids"` // 视频ID集合,支持单个或批量
|
||||
WatchTimesMin int64 `json:"watchTimesMin"` // 假观看次数随机最小值,包含该值
|
||||
WatchTimesMax int64 `json:"watchTimesMax"` // 假观看次数随机最大值,包含该值
|
||||
}
|
||||
|
||||
// SetVideoHeatReq 单/批量设置视频热度
|
||||
type SetVideoHeatReq struct {
|
||||
Ids []int64 `json:"ids"` // 视频ID集合
|
||||
HeatMin int64 `json:"heatMin"` // 热度最小值
|
||||
HeatMax int64 `json:"heatMax"` // 热度最大值
|
||||
}
|
||||
|
||||
type SetRecommendReq struct {
|
||||
Ids []int64 `json:"ids"` // 视频ID集合,传1个表示单条设置,传多个表示批量设置
|
||||
IsRecommend bool `json:"isRecommend"` // 是否推荐 true-推荐 false-不推荐
|
||||
}
|
||||
|
||||
type SetFakeCountResp struct {
|
||||
MatchedCount int64 `json:"matchedCount"` // 匹配到的视频数量
|
||||
ModifiedCount int64 `json:"modifiedCount"` // 实际修改的视频数量
|
||||
}
|
||||
Reference in New Issue
Block a user