Files
rootandClaude Opus 5.5 7974a42301 Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 11:07:42 +08:00

701 lines
36 KiB
Go
Raw Permalink 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 proto
import (
"time"
"videoweb/pub/common/response"
"videoweb/pub/models/playletchaptermod"
"videoweb/pub/models/playletmod"
"videoweb/pub/pubdef"
)
// PlayletResourceListReq web端短剧媒资列表请求
type PlayletResourceListReq struct {
Title *string `form:"title" json:"title"` // 标题
Tag *string `form:"tag" json:"tag"` // 标签
MediaType *int `form:"media_type" json:"media_type"` // 媒体类型 1-动漫 2-漫画 4-漫画短剧 5-短剧 6-普通短剧
SyncType *int `form:"sync_type" json:"sync_type"` // 同步类型 1-全量同步 2-增量同步
IsAdd *bool `form:"isAdd" json:"isAdd,omitempty"` // 是否已加入后台数据:true只查已加入,false只查未加入,不传查全部
PageNumber int `form:"pageNumber" json:"pageNumber"` // 页码
PageSize int `form:"pageSize" json:"pageSize"` // 个数
}
// PlayletResourceJHListReq web端嘉华短剧媒资列表请求
type PlayletResourceJHListReq struct {
Title *string `form:"title"` // 标题
Tag *string `form:"tag"` // 标签
SyncType *int `form:"sync_type"` // 同步类型 1-全量同步 2-增量同步
IsAdd *bool `form:"isAdd" json:"isAdd,omitempty"` // 是否已入库:true只查已入库,false只查未入库,不传查全部
PageNumber int `form:"pageNumber"` // 页码
PageSize int `form:"pageSize"` // 个数
}
// PlayletResourceMediaActor web端短剧媒资演员
type PlayletResourceMediaActor struct {
Name string `json:"name"` // 名称
Avatar string `json:"avatar"` // 头像
Gender int `json:"gender"` // 性别
}
// PlayletResourceListItem web端短剧媒资列表项
type PlayletResourceListItem struct {
ID uint `json:"id"`
VloggerId uint `json:"vlogger_id"`
Title string `json:"title"` // 标题
SaleCoin uint `json:"sale_coin"` // 整部售价
HorizontalCover string `json:"horizontal_cover"` // 横版封面
VerticalCover string `json:"vertical_cover"` // 竖版封面
Summary string `json:"summary"` // 简介
TotalEpisode uint `json:"total_episode"` // 总集数
UpdateStatus int `json:"update_status"` // 更新状态 1-连载中 2-已完结
MediaType int `json:"media_type"` // 媒体类型
Anchor string `json:"anchor"` // 作者
TagsText string `json:"tags_text"` // 标签文字
DataVersion int8 `json:"data_version"` // 数据版本
TerminalCdo string `json:"terminal_cdo"` // 上传者
CreateTime int64 `json:"create_time"` // 创建时间
UpdateTime int64 `json:"update_time"` // 修改时间
IsAdd bool `json:"isAdd"` // 是否已加入后台数据
}
// PlayletResourceJHListItem web端嘉华短剧媒资列表项
type PlayletResourceJHListItem struct {
ID uint `json:"id"`
VloggerId uint `json:"vlogger_id"`
Title string `json:"title"` // 标题
SaleCoin uint `json:"sale_coin"` // 整部售价
HorizontalCover string `json:"horizontal_cover"` // 横版封面
VerticalCover string `json:"vertical_cover"` // 竖版封面
HorizontalCoverAlt string `json:"horizontalCover"` // 兼容驼峰
VerticalCoverAlt string `json:"verticalCover"` // 兼容驼峰
Summary string `json:"summary"` // 简介
TotalEpisode uint `json:"total_episode"` // 总集数
UpdateStatus int `json:"update_status"` // 更新状态
MediaType int `json:"media_type"` // 媒体类型
Anchor string `json:"anchor"` // 作者
Actors []PlayletResourceMediaActor `json:"actors"` // 演员集合
TagsText string `json:"tags_text"` // 标签文字
DataVersion int8 `json:"data_version"` // 数据版本
TerminalCdo string `json:"terminal_cdo"` // 上传者
CreateTime int64 `json:"create_time"` // 创建时间
UpdateTime int64 `json:"update_time"` // 更新时间
IsAdd bool `json:"isAdd"` // 是否已入库
}
// PlayletResourceListResp web端短剧媒资列表响应
type PlayletResourceListResp struct {
List []*PlayletResourceListItem `json:"list"`
Total uint `json:"total"`
}
// PlayletResourceJHListResp web端嘉华短剧媒资列表响应
type PlayletResourceJHListResp struct {
List []*PlayletResourceJHListItem `json:"list"`
Total uint `json:"total"`
}
// PlayletResourceUseReq web端短剧媒资入库请求
type PlayletResourceUseReq struct {
Ids []uint `json:"ids"` // 媒资中心资源ID集合-多个用逗号隔开,请求示例[28830,28829,28828,28827,28826,28825]
}
// PlayletResourceChapterListReq web端短剧媒资剧集列表请求
type PlayletResourceChapterListReq struct {
Id uint `form:"id" json:"id" binding:"required"` // 媒资中心资源ID
}
// PlayletResourceChapterItem web端短剧媒资剧集项
type PlayletResourceChapterItem struct {
Id uint `json:"id"` // 媒资内容ID
EpisodeNumber int `json:"episodeNumber"` // 第几集
Title string `json:"title"` // 章节名
Cover string `json:"cover"` // 封面
VideoUrl string `json:"videoUrl"` // 播放地址
Height uint `json:"height"` // 高
Width uint `json:"width"` // 宽
MediaSize uint `json:"mediaSize"` // 资源大小
PlayTime uint `json:"playTime"` // 播放时长(秒)
SaleCoin uint `json:"saleCoin"` // 单集售价
HashId string `json:"hashId"` // 资源hash
CreateTime int64 `json:"createTime"` // 创建时间
UpdateTime int64 `json:"updateTime"` // 更新时间
}
// PlayletResourceChapterListResp web端短剧媒资剧集列表响应
type PlayletResourceChapterListResp struct {
MediaId uint `json:"mediaId"` // 媒资中心资源ID
Title string `json:"title"` // 短剧标题
List []*PlayletResourceChapterItem `json:"list"` // 剧集列表
Total int `json:"total"` // 剧集数量
}
// PlayletResourceUseSuccess web端短剧媒资入库成功项
type PlayletResourceUseSuccess struct {
MediaId uint `json:"mediaId"`
PlayletId int64 `json:"playletId"`
}
// PlayletResourceUseFailed web端短剧媒资入库失败项
type PlayletResourceUseFailed struct {
MediaId uint `json:"mediaId"`
Reason string `json:"reason"`
}
// PlayletResourceUseResp web端短剧媒资入库响应
type PlayletResourceUseResp struct {
Success []*PlayletResourceUseSuccess `json:"success"`
Failed []*PlayletResourceUseFailed `json:"failed"`
}
// PlayletListSortType web端短剧列表排序类型,均为降序
type PlayletListSortType int
const (
PlayletListSortCreatedAt PlayletListSortType = 0 // 创建时间(默认)
PlayletListSortRecommendRank PlayletListSortType = 1 // 推荐排序
PlayletListSortUpdatedAt PlayletListSortType = 2 // 修改时间
PlayletListSortCountLike PlayletListSortType = 3 // 点赞数
PlayletListSortCountBrowse PlayletListSortType = 4 // 浏览数
PlayletListSortCountCollect PlayletListSortType = 5 // 收藏数
PlayletListSortOnlineAt PlayletListSortType = 6 // 上架时间
)
// PlayletListReq web端短剧分页列表请求
type PlayletListReq struct {
pubdef.Page
Id *int64 `form:"id" json:"id"`
CategoryId *int64 `form:"categoryId" json:"categoryId"` // 分类ID
ThemeId *int64 `form:"themeId" json:"themeId"` // 题材id
TagId *int64 `form:"tagId" json:"tagId"` // 标签ID
ContentType *playletmod.ContentType `form:"contentType" json:"contentType"` // 0短剧 1普通短剧/影集 2漫画短剧 3动漫 4漫画
OperateType *playletmod.OperateType `form:"operateType" json:"operateType"` // 运营类型 1-短剧 2-漫剧
PayType *playletmod.PayType `form:"payType" json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
Status *playletmod.Status `form:"status" json:"status"` // 上架状态(0-下架 1-上架)
IsFeatured *bool `form:"isFeatured" json:"isFeatured"` // 是否爆剧(true-是,false-否)
IsOriginal *bool `form:"isOriginal" json:"isOriginal"` // 是否原创:true只查原创,false只查非原创,不传查全部
IsRecommend *bool `form:"isRecommend" json:"isRecommend"` // 是否原创(推荐)
ShowOnBanner *bool `form:"showOnBanner" json:"showOnBanner"`
Title string `form:"title" json:"title"`
Slug string `form:"slug" json:"slug"` // slug,精确匹配
OperatorName string `form:"operatorName" json:"operatorName"` // 最后操作人名称
SortType PlayletListSortType `form:"sortType" json:"sortType"` // 排序:0创建时间(默认) 1推荐排序(按分类查询时为该分类排序) 2修改时间 3点赞数 4浏览数 5收藏数 6上架时间,均为降序
}
// PlayletListResp web端短剧列表项
type PlayletListResp struct {
Id int64 `json:"id"`
Status playletmod.Status `json:"status"`
IsFeatured bool `json:"isFeatured"` // 是否爆剧(true-是,false-否)
IsOriginal bool `json:"isOriginal"` // 是否原创
IsRecommend bool `json:"isRecommend"`
ShowOnBanner bool `json:"showOnBanner"`
Banner string `json:"banner"`
ReviewAt time.Time `json:"reviewAt"`
OnlineAt time.Time `json:"onlineAt"`
CategoryIds []int64 `json:"categoryIds"`
CategoryNames []string `json:"categoryNames"`
CategoryBinds []PlayletCategoryBind `json:"categoryBinds"` // 分类及该分类下的排序
CategoryRank int64 `json:"categoryRank"` // 当前筛选分类下的排序,未按分类查询时为0
ThemeIds []int64 `json:"themeIds"`
ThemeNames []string `json:"themeNames"`
Title string `json:"title"`
PlayName string `json:"playName"` // 剧名
Description string `json:"description"` // SEO Description
Slug string `json:"slug"` // slug
Desc string `json:"desc"`
Anchor string `json:"anchor"`
Cover string `json:"cover"`
Preview string `json:"preview"`
TagIds []int64 `json:"tagIds"`
TagNames []string `json:"tagNames"`
ContentType playletmod.ContentType `json:"contentType"`
OperateType playletmod.OperateType `json:"operateType"` // 运营类型 1-短剧 2-漫剧
PayType playletmod.PayType `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
SingleCoins int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时候生效)
TotalEpisode int64 `json:"totalEpisode"`
UpdateStatus int `json:"updateStatus"` // 连载状态 1-连载中 2-已完结
TopRank int64 `json:"topRank"`
RecommendRank int64 `json:"recommendRank"`
CountComment int64 `json:"countComment"`
CountBuy int64 `json:"countBuy"`
CountBrowse int64 `json:"countBrowse"`
HeatValue int64 `json:"heatValue"`
CountCollect int64 `json:"countCollect"`
CountLike int64 `json:"countLike"` // 真实点赞数
VirtualCountLike int64 `json:"virtualCountLike"` // 虚拟点赞数
DisplayCountLike int64 `json:"displayCountLike"` // 展示点赞数=真实点赞数+虚拟点赞数
CountDisLike int64 `json:"countDisLike"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
OperatorId int64 `json:"operatorId"` // 最后操作人ID
OperatorName string `json:"operatorName"` // 最后操作人名称
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CompressedCover string `json:"compressedCover"`
}
// PlayletListPageResp web端短剧分页列表响应
type PlayletListPageResp struct {
response.BasePageResp
}
// PlayletCategoryBind 短剧绑定的分类及该分类下的排序
type PlayletCategoryBind struct {
Id int64 `json:"id"` // 分类ID
Rank int64 `json:"rank"` // 该分类下的排序,越大越靠前
}
// PlayletAddReq web端新增短剧请求
type PlayletAddReq struct {
CategoryIds []int64 `json:"categoryIds"` // 短剧分类id集合,未传 categoryBinds 时使用,排序为0
CategoryBinds []PlayletCategoryBind `json:"categoryBinds"` // 分类及该分类下的排序,优先于 categoryIds
ThemeIds []int64 `json:"themeIds"`
Title string `json:"title" binding:"required"`
PlayName string `json:"playName"` // 剧名
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或标题自动生成
Desc string `json:"desc"`
Anchor string `json:"anchor"`
Cover string `json:"cover"`
Preview string `json:"preview"`
TagIds []int64 `json:"tagIds"`
ContentType playletmod.ContentType `json:"contentType"`
OperateType playletmod.OperateType `json:"operateType"` // 运营类型 1-短剧 2-漫剧,不传默认短剧
PayType playletmod.PayType `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
SingleCoins int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时候生效)
TotalEpisode int64 `json:"totalEpisode"`
TopRank int64 `json:"topRank"`
RecommendRank int64 `json:"recommendRank"`
Status playletmod.Status `json:"status"`
IsFeatured bool `json:"isFeatured"` // 是否爆剧(true-是,false-否)
IsRecommend bool `json:"isRecommend"`
ShowOnBanner bool `json:"showOnBanner"`
Banner string `json:"banner"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
OnlineAt *time.Time `json:"onlineAt"` // 上架时间,上架时不传则按当前时间
}
// PlayletAddResp web端新增短剧响应
type PlayletAddResp struct {
Id int64 `json:"id"`
}
// PlayletUpdateReq web端更新短剧请求
type PlayletUpdateReq struct {
Id int64 `json:"id" binding:"required"`
Status *playletmod.Status `json:"status"`
IsFeatured *bool `json:"isFeatured"` // 是否爆剧(true-是,false-否)
ShowOnBanner *bool `json:"showOnBanner"`
Banner *string `json:"banner"`
CategoryIds *[]int64 `json:"categoryIds"` // 短剧分类id集合,未传 categoryBinds 时使用,保留已有分类排序
CategoryBinds *[]PlayletCategoryBind `json:"categoryBinds"` // 分类及该分类下的排序,优先于 categoryIds
ThemeIds *[]int64 `json:"themeIds"`
Title *string `json:"title"`
PlayName *string `json:"playName"` // 剧名
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
Desc *string `json:"desc"`
Anchor *string `json:"anchor"`
Cover *string `json:"cover"`
Preview *string `json:"preview"`
TagIds *[]int64 `json:"tagIds"`
ContentType *playletmod.ContentType `json:"contentType"`
OperateType *playletmod.OperateType `json:"operateType"` // 运营类型 1-短剧 2-漫剧
PayType *playletmod.PayType `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
SingleCoins *int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时候生效)
TotalEpisode *int64 `json:"totalEpisode"`
TopRank *int64 `json:"topRank"`
RecommendRank *int64 `json:"recommendRank"`
IsRecommend *bool `json:"isRecommend"`
SeoInfo *pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
OnlineAt *time.Time `json:"onlineAt"` // 上架时间,新上架时不传则按当前时间
}
// PlayletPayTypeSetReq web端单/批量设置短剧默认支付方式请求
type PlayletPayTypeSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
PayType playletmod.PayType `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
SingleCoins *int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时必填且需>0)
}
// PlayletWatermarkResetReq web端按短剧ID批量重置剧集水印请求
type PlayletWatermarkResetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条,传多个表示批量;会重置其下全部剧集水印
}
// PlayletStatusSetReq web端单/批量设置短剧上下架请求
type PlayletStatusSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
Status playletmod.Status `json:"status"` // 上架状态 0-下架 1-上架
OnlineAt *time.Time `json:"onlineAt"` // 上架时间,上架时不传则按当前时间
}
// PlayletOnlineAtFillResp 回填已上架但上架时间为空的短剧
type PlayletOnlineAtFillResp struct {
UpdatedCount int64 `json:"updatedCount"` // 本次回填数量
}
// PlayletRecommendSetReq web端单/批量设置短剧推荐请求
type PlayletRecommendSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
IsRecommend bool `json:"isRecommend"` // 是否原创(推荐)(true-推荐,false-不推荐)
}
// PlayletFeaturedSetReq web端单/批量设置短剧是否爆剧请求
type PlayletFeaturedSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
IsFeatured bool `json:"isFeatured"` // 是否爆剧(true-是,false-否)
}
// PlayletOperateTypeSetReq web端单/批量设置短剧运营类型请求
type PlayletOperateTypeSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
OperateType playletmod.OperateType `json:"operateType"` // 运营类型 1-短剧 2-漫剧
}
// PlayletBannerSetReq web端单/批量设置短剧是否显示在首页banner请求
type PlayletBannerSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
ShowOnBanner bool `json:"showOnBanner"` // 是否显示在首页banner(true-显示,false-不显示)
}
// PlayletThemeSetReq web端单/批量设置短剧题材请求
type PlayletThemeSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
ThemeIds []int64 `json:"themeIds"` // 题材ID集合,可设置多个题材
}
// PlayletCategorySetReq web端单/批量设置短剧分类请求
type PlayletCategorySetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
CategoryIds *[]int64 `json:"categoryIds"` // 分类ID集合,未传 categoryBinds 时使用,排序为0;传空数组表示清空分类
CategoryBinds *[]PlayletCategoryBind `json:"categoryBinds"` // 分类及该分类下的排序,优先于 categoryIds;传空数组表示清空分类
}
// PlayletTagSetReq web端单/批量设置短剧标签请求
type PlayletTagSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
TagIds *[]int64 `json:"tagIds"` // 标签ID集合,可设置多个标签,传空数组表示清空标签,不传表示参数错误
}
// PlayletVirtualLikeSetReq web端单/批量设置短剧虚拟点赞数请求
type PlayletVirtualLikeSetReq struct {
Ids []int64 `json:"ids"` // 短剧ID集合,传1个表示单条设置,传多个表示批量设置
MinVirtualCountLike int64 `json:"minVirtualCountLike"` // 虚拟点赞数最小值,必须大于等于0
MaxVirtualCountLike int64 `json:"maxVirtualCountLike"` // 虚拟点赞数最大值,必须大于等于最小值
}
// PlayletCategoryListReq web端分类分页列表请求
type PlayletCategoryListReq struct {
pubdef.Page
Id *int64 `form:"id" json:"id"` // 分类ID
Name string `form:"name" json:"name"` // 分类名称,支持模糊查询
Slug string `form:"slug" json:"slug"` // slug,精确匹配
Status *bool `form:"status" json:"status"` // 启用状态
}
// PlayletCategoryListResp web端分类列表项
type PlayletCategoryListResp struct {
Id int64 `json:"id"` // 分类ID
Name string `json:"name"` // 分类名称
Slug string `json:"slug"` // slug
Desc string `json:"desc"` // 描述
Icon string `json:"icon"` // 分类图标
Status bool `json:"status"` // 启用状态
Rank int64 `json:"rank"` // 排序,越大越靠前
Remark string `json:"remark"` // 备注
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// PlayletCategoryListPageResp web端分类分页列表响应
type PlayletCategoryListPageResp struct {
response.BasePageResp
}
// PlayletCategoryAddReq web端新增分类请求
type PlayletCategoryAddReq struct {
Name string `json:"name" binding:"required"` // 分类名称
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或名称自动生成
Desc string `json:"desc"` // 描述
Icon string `json:"icon"` // 分类图标
Status bool `json:"status"` // 启用状态
Rank int64 `json:"rank"` // 排序,越大越靠前
Remark string `json:"remark"` // 备注
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletCategoryAddResp web端新增分类响应
type PlayletCategoryAddResp struct {
Id int64 `json:"id"` // 分类ID
}
// PlayletCategoryUpdateReq web端更新分类请求
type PlayletCategoryUpdateReq struct {
Id int64 `json:"id" binding:"required"` // 分类ID
Name *string `json:"name"` // 分类名称
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
Desc *string `json:"desc"` // 描述
Icon *string `json:"icon"` // 分类图标
Status *bool `json:"status"` // 启用状态
Rank *int64 `json:"rank"` // 排序,越大越靠前
Remark *string `json:"remark"` // 备注
SeoInfo *pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletCategoryDelReq web端删除分类请求
type PlayletCategoryDelReq struct {
Id int64 `json:"id" binding:"required"` // 分类ID
}
// PlayletThemeListReq web端题材分页列表请求
type PlayletThemeListReq struct {
pubdef.Page
Id *int64 `form:"id" json:"id"`
Name string `form:"name" json:"name"`
Slug string `form:"slug" json:"slug"` // slug,精确匹配
Status *bool `form:"status" json:"status"`
IsRecommend *bool `form:"isRecommend" json:"isRecommend"` // 是否推荐
}
// PlayletThemeListResp web端题材列表项
type PlayletThemeListResp struct {
Id int64 `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"` // slug
Icon string `json:"icon"`
Status bool `json:"status"`
IsRecommend bool `json:"isRecommend"` // 是否推荐
Rank int64 `json:"rank"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// PlayletThemeListPageResp web端题材分页列表响应
type PlayletThemeListPageResp struct {
response.BasePageResp
}
// PlayletThemeAddReq web端新增题材请求
type PlayletThemeAddReq struct {
Name string `json:"name" binding:"required"`
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或名称自动生成
Icon string `json:"icon"`
Status bool `json:"status"`
IsRecommend bool `json:"isRecommend"` // 是否推荐
Rank int64 `json:"rank"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletThemeAddResp web端新增题材响应
type PlayletThemeAddResp struct {
Id int64 `json:"id"`
}
// PlayletThemeUpdateReq web端更新题材请求
type PlayletThemeUpdateReq struct {
Id int64 `json:"id" binding:"required"`
Name *string `json:"name"`
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
Icon *string `json:"icon"`
Status *bool `json:"status"`
IsRecommend *bool `json:"isRecommend"` // 是否推荐
Rank *int64 `json:"rank"`
SeoInfo *pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletThemeDelReq web端删除题材请求
type PlayletThemeDelReq struct {
Id int64 `json:"id" binding:"required"`
}
// PlayletThemeRecommendSetReq web端单/批量设置题材是否推荐请求
type PlayletThemeRecommendSetReq struct {
Ids []int64 `json:"ids"` // 题材ID集合,传1个表示单条设置,传多个表示批量设置
IsRecommend bool `json:"isRecommend"` // 是否推荐(true-推荐,false-取消推荐)
}
// PlayletTagListReq web端标签分页列表请求
type PlayletTagListReq struct {
pubdef.Page
Id *int64 `form:"id" json:"id"`
Name string `form:"name" json:"name"`
Slug string `form:"slug" json:"slug"` // slug,精确匹配
Status *bool `form:"status" json:"status"`
}
// PlayletTagListResp web端标签列表项
type PlayletTagListResp struct {
Id int64 `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"` // slug
Status bool `json:"status"`
Rank int64 `json:"rank"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// PlayletTagListPageResp web端标签分页列表响应
type PlayletTagListPageResp struct {
response.BasePageResp
}
// PlayletTagAddReq web端新增标签请求
type PlayletTagAddReq struct {
Name string `json:"name" binding:"required"`
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或名称自动生成
Status bool `json:"status"`
Rank int64 `json:"rank"`
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletTagAddResp web端新增标签响应
type PlayletTagAddResp struct {
Id int64 `json:"id"`
}
// PlayletTagUpdateReq web端更新标签请求
type PlayletTagUpdateReq struct {
Id int64 `json:"id" binding:"required"`
Name *string `json:"name"`
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
Status *bool `json:"status"`
Rank *int64 `json:"rank"`
SeoInfo *pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
}
// PlayletTagDelReq web端删除标签请求
type PlayletTagDelReq struct {
Id int64 `json:"id" binding:"required"`
}
// PlayletChapterListReq web端章节分页列表请求
type PlayletChapterListReq struct {
pubdef.Page
PlayletId *int64 `form:"playletId" json:"playletId"`
Id *int64 `form:"id" json:"id"`
WatermarkStatus *playletchaptermod.WatermarkStatus `form:"watermarkStatus" json:"watermarkStatus"`
}
// PlayletChapterListResp web端章节列表项
type PlayletChapterListResp struct {
Id int64 `json:"id"`
PlayletId int64 `json:"playletId"`
MediaContentId uint `json:"mediaContentId"`
CurrentEpisode int64 `json:"currentEpisode"`
Title string `json:"title"`
Md5 string `json:"md5"`
Hash string `json:"hash"`
Height int64 `json:"height"`
Width int64 `json:"width"`
Ratio float64 `json:"ratio"`
VideoUrl string `json:"videoUrl"` // 原片视频地址
WatermarkVideoUrl string `json:"watermarkVideoUrl"` // 加水印后的视频地址
MediaSize int64 `json:"mediaSize"`
MediaTime int64 `json:"mediaTime"`
CountComment int64 `json:"countComment"`
CountBuy int64 `json:"countBuy"`
CountBrowse int64 `json:"countBrowse"`
CountCollect int64 `json:"countCollect"`
CountLike int64 `json:"countLike"`
CountDisLike int64 `json:"countDisLike"`
PayType playletchaptermod.PayType `json:"payType"`
SingleCoins int64 `json:"singleCoins"`
WatermarkStatus playletchaptermod.WatermarkStatus `json:"watermarkStatus"`
MediaSourceId string `json:"mediaSourceId"`
MediaTaskId string `json:"mediaTaskId"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// PlayletChapterListPageResp web端章节分页列表响应
type PlayletChapterListPageResp struct {
response.BasePageResp
}
// PlayletChapterAddReq web端新增章节请求
type PlayletChapterAddReq struct {
PlayletId int64 `json:"playletId" binding:"required"`
CurrentEpisode int64 `json:"currentEpisode" binding:"required"`
Title string `json:"title"`
Md5 string `json:"md5"`
Hash string `json:"hash"`
Height int64 `json:"height"`
Width int64 `json:"width"`
Ratio float64 `json:"ratio"`
VideoUrl string `json:"videoUrl"`
MediaSize int64 `json:"mediaSize"`
MediaTime int64 `json:"mediaTime"`
PayType playletchaptermod.PayType `json:"payType"`
SingleCoins int64 `json:"singleCoins"`
MediaSourceId string `json:"mediaSourceId"`
}
// PlayletChapterAddResp web端新增章节响应
type PlayletChapterAddResp struct {
Id int64 `json:"id"`
}
// PlayletChapterUpdateReq web端更新章节请求
type PlayletChapterUpdateReq struct {
Id int64 `json:"id" binding:"required"`
CurrentEpisode *int64 `json:"currentEpisode"`
Title *string `json:"title"`
Md5 *string `json:"md5"`
Hash *string `json:"hash"`
Height *int64 `json:"height"`
Width *int64 `json:"width"`
Ratio *float64 `json:"ratio"`
VideoUrl *string `json:"videoUrl"`
MediaSize *int64 `json:"mediaSize"`
MediaTime *int64 `json:"mediaTime"`
PayType *playletchaptermod.PayType `json:"payType"`
SingleCoins *int64 `json:"singleCoins"`
}
// PlayletChapterPayTypeSetReq web端单/批量设置章节支付方式请求
type PlayletChapterPayTypeSetReq struct {
Ids []int64 `json:"ids"` // 章节ID集合,传1个表示单条设置,传多个表示批量设置
PayType playletchaptermod.PayType `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
SingleCoins *int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时必填且需>0)
}
// PlayletChapterDelReq web端单/批量删除章节请求
type PlayletChapterDelReq struct {
Ids []int64 `json:"ids"` // 章节ID集合,传1个表示单条删除,传多个表示批量删除
}
// PlayletChapterSyncReq web端手动同步短剧剧集请求
type PlayletChapterSyncReq struct {
PlayletIds []int64 `json:"playletIds" binding:"required"` // 短剧ID集合,传1个表示单条同步,传多个表示批量同步
}
// PlayletChapterSyncResult web端手动同步短剧剧集结果项
type PlayletChapterSyncResult struct {
PlayletId int64 `json:"playletId"` // 短剧ID
NewChapterCount int `json:"newChapterCount"` // 本次新增剧集数量
Success bool `json:"success"` // 是否同步成功
Reason string `json:"reason"` // 失败原因
}
// PlayletChapterSyncResp web端手动同步短剧剧集响应
type PlayletChapterSyncResp struct {
Total int `json:"total"` // 同步总数
SuccessCount int `json:"successCount"` // 成功数量
FailedCount int `json:"failedCount"` // 失败数量
List []*PlayletChapterSyncResult `json:"list"` // 同步结果集合
}
// PlayletSlugSyncReq web端同步历史空 slug 请求
type PlayletSlugSyncReq struct {
MaxSize int64 `json:"maxSize"` // 本次最多处理的空 slug 记录数,默认500,最大2000
}
// PlayletSlugSyncResp web端同步历史空 slug 响应
type PlayletSlugSyncResp struct {
ThemeUpdated int64 `json:"themeUpdated"` // 本次补齐的题材数
TagUpdated int64 `json:"tagUpdated"` // 本次补齐的标签数
CategoryUpdated int64 `json:"categoryUpdated"` // 本次补齐的分类数
PlayletUpdated int64 `json:"playletUpdated"` // 本次补齐的短剧数
HasMore bool `json:"hasMore"` // 是否还有未处理的历史数据
}