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>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package proto
|
||||
|
||||
// AboutNodeItem 关于我们节点
|
||||
type AboutNodeItem struct {
|
||||
NodeId int64 `json:"nodeId"`
|
||||
Title string `json:"title"`
|
||||
SubTitle string `json:"subTitle"`
|
||||
Content string `json:"content"` // JSON字符串
|
||||
//类型描述:
|
||||
//文本:录入纯文本信息
|
||||
//声明:图片、文本信息
|
||||
//条目:可以录入多条,可删可增
|
||||
//收录:收录类型(文章、网址、工具)、价格、单位、时效、描述
|
||||
//图文:图片、文本信息
|
||||
//注意:图片、文本信息
|
||||
Type int `json:"type"`
|
||||
ServiceDuration string `json:"serviceDuration"` // 服务时效
|
||||
DurationIcon string `json:"durationIcon"` // 时效图标(CDN已处理)
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
// AboutData 关于我们页面数据
|
||||
type AboutData struct {
|
||||
Intro string `json:"intro"` // 简介
|
||||
Nodes []*AboutNodeItem `json:"nodes"` // 节点列表
|
||||
Categories []*ToolCategoryItem `json:"categories"` // 分类列表
|
||||
Site SiteCommonData `json:"site"` // 通用站点数据
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/storage/proxy"
|
||||
|
||||
type AdsClickReq struct {
|
||||
AdsId string `json:"adsId,omitempty" binding:"required"`
|
||||
Location int64 `json:"location,omitempty" binding:"required"` // 位置ID
|
||||
}
|
||||
|
||||
type AdsClickInfo struct {
|
||||
AppId int64 `json:"appId,omitempty" binding:"required"` // appId
|
||||
AdsId int64 `json:"adsId,omitempty" binding:"required"`
|
||||
Location int64 `json:"location,omitempty" binding:"required"` // 位置ID
|
||||
}
|
||||
|
||||
type AdvitiseData struct {
|
||||
HomeList []proxy.AdvitiseInfo `json:"homeList" bson:"homeList"` // 首页列表
|
||||
DetailTopList []proxy.AdvitiseInfo `json:"detailTopList" bson:"detailTopList"` // 详情页顶部广告
|
||||
NineGridList []proxy.AdvitiseInfo `json:"nineGridList" bson:"nineGridList"` // 9宫格
|
||||
DetailbannerList []proxy.AdvitiseInfo `json:"detailbannerList" bson:"detailbannerList"` // 详情banner
|
||||
LaunchScreenList []proxy.AdvitiseInfo `json:"launchScreenList"` // 启动页广告
|
||||
FloatingList []proxy.AdvitiseInfo `json:"floatingList" bson:"floatingList"` // 悬浮小方块
|
||||
AList []proxy.AdvitiseInfo `json:"AList"` // 固定12广告位
|
||||
BList []proxy.AdvitiseInfo `json:"BList"` // 固定13广告位
|
||||
DialogList []proxy.AdvitiseInfo `json:"dialogList" bson:"dialogList"` // 弹窗广告
|
||||
BottomBanner []proxy.AdvitiseInfo `json:"bottomBanner" bson:"bottomBanner"` // 底部banner
|
||||
|
||||
VideoInfoList []proxy.AdvitiseInfo `json:"videoInfoList" bson:"videoInfoList"` // 视频详情
|
||||
DownList []proxy.AdvitiseInfo `json:"downList" bson:"downList"` // 底部广告
|
||||
FriendList []proxy.AdvitiseInfo `json:"friendList" bson:"friendList"` // 友链
|
||||
TitleList []proxy.AdvitiseInfo `json:"titleList" bson:"titleList"` // 标题广告
|
||||
PlayList []proxy.AdvitiseInfo `json:"playList" bson:"playList"` // 播放强制跳转
|
||||
PauseyList []proxy.AdvitiseInfo `json:"pauseyList" bson:"pauseyList"` // 暂停广告
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/pubdef"
|
||||
|
||||
// -------- 公共站点数据 --------
|
||||
|
||||
// FriendlyLinkItem 友情链接
|
||||
type FriendlyLinkItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
// ContactInfoItem 联系方式
|
||||
type ContactInfoItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Icon string `json:"icon"`
|
||||
Type int `json:"type"` // 1=邮箱 2=URL 3=文字
|
||||
Address string `json:"address"`
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
// SiteCommonData 每个接口都会携带的通用站点信息
|
||||
type SiteCommonData struct {
|
||||
Config ConfigInfo `json:"config"`
|
||||
FriendlyLinks []*FriendlyLinkItem `json:"friendlyLinks"`
|
||||
ContactInfos []*ContactInfoItem `json:"contactInfos"`
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
ToolCount int64 `json:"toolCount"` // 审核通过的工具总数
|
||||
}
|
||||
|
||||
// -------- 分类 --------
|
||||
|
||||
// ToolSubCategoryItem 子分类简要信息
|
||||
type ToolSubCategoryItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Name string `json:"name"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
||||
}
|
||||
|
||||
// ToolCategoryItem 主分类简要信息
|
||||
type ToolCategoryItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Name string `json:"name"`
|
||||
Icon string `json:"icon"`
|
||||
Sort int `json:"sort"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
||||
SubCategories []*ToolSubCategoryItem `json:"subCategories"`
|
||||
}
|
||||
|
||||
// -------- 工具 --------
|
||||
|
||||
// ToolBriefItem 工具简要信息(列表卡片)
|
||||
type ToolBriefItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Logo string `json:"logo"`
|
||||
Snapshot string `json:"snapshot"`
|
||||
Intro string `json:"intro"`
|
||||
OfficialUrl string `json:"officialUrl"`
|
||||
Hot int64 `json:"hot"`
|
||||
}
|
||||
|
||||
// CategorySection 首页分类区块:分类标题 + 子分类列表 + 前10条工具
|
||||
type CategorySection struct {
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
CategorySlug string `json:"categorySlug"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
CategoryIcon string `json:"categoryIcon"`
|
||||
CategorySort int `json:"categorySort"`
|
||||
SubCategories []*ToolSubCategoryItem `json:"subCategories"`
|
||||
Tools []*ToolBriefItem `json:"tools"`
|
||||
}
|
||||
|
||||
// ToolNodeItem 工具节点
|
||||
type ToolNodeItem struct {
|
||||
NodeId int64 `json:"nodeId"`
|
||||
Title string `json:"title"`
|
||||
Type int `json:"type"` // 1=文本 2=条目 3=QA 4=图片
|
||||
Content string `json:"content"` // JSON字符串,格式因类型而异
|
||||
Sort int `json:"sort"`
|
||||
ReviewStatus int `json:"reviewStatus"` // 0=待审核 1=通过 2=下架
|
||||
}
|
||||
|
||||
// ToolRecommendItem 推荐工具简要信息
|
||||
type ToolRecommendItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Intro string `json:"intro"`
|
||||
Logo string `json:"logo"`
|
||||
}
|
||||
|
||||
// ArticleRecommendItem 推荐文章简要信息
|
||||
type ArticleRecommendItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Intro string `json:"intro"`
|
||||
Cover string `json:"cover"`
|
||||
CreatedAt string `json:"createdAt"` // 格式:yyyy/MM/dd
|
||||
}
|
||||
|
||||
// ToolDetailItem 工具详情
|
||||
type ToolDetailItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
SubCateId int64 `json:"subCateId"`
|
||||
SubCateName string `json:"subCateName"`
|
||||
Title string `json:"title"`
|
||||
Logo string `json:"logo"`
|
||||
Snapshot string `json:"snapshot"`
|
||||
Intro string `json:"intro"`
|
||||
Desc string `json:"desc"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
||||
OfficialUrl string `json:"officialUrl"`
|
||||
Hot int64 `json:"hot"`
|
||||
ViewCount int64 `json:"viewCount"`
|
||||
Nodes []*ToolNodeItem `json:"nodes"`
|
||||
RelatedTools []*ToolRecommendItem `json:"relatedTools"` // 相关推荐(优先同子分类,不足补其他分类)
|
||||
RecommendTools []*ToolRecommendItem `json:"recommendTools"` // 工具推荐(随机6个)
|
||||
RecommendArticles []*ArticleRecommendItem `json:"recommendArticles"` // 文章推荐(随机6个)
|
||||
CommentList GetCommentListResp `json:"commentList"` // 评论
|
||||
Categories []*ToolCategoryItem `json:"categories"` // 分类列表
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// -------- 文章 --------
|
||||
|
||||
// ArticleBriefItem 文章简要信息(列表卡片)
|
||||
type ArticleBriefItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Intro string `json:"intro"`
|
||||
Author string `json:"author"`
|
||||
AuthorAvatar string `json:"authorAvatar"`
|
||||
Cover string `json:"cover"`
|
||||
ViewCount int64 `json:"viewCount"`
|
||||
Sort int `json:"sort"`
|
||||
CreatedAt string `json:"createdAt"` // 格式:yyyy/MM/dd
|
||||
}
|
||||
|
||||
// ArticleNodeItem 文章节点
|
||||
type ArticleNodeItem struct {
|
||||
NodeId int64 `json:"nodeId"`
|
||||
Title string `json:"title"`
|
||||
Type int `json:"type"` // 1=文本 2=条目 3=QA 4=图片
|
||||
Content string `json:"content"` // JSON字符串,格式因类型而异
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
// ArticleNavItem 文章导航(上一篇/下一篇)
|
||||
type ArticleNavItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// ArticleDetailItem 文章详情
|
||||
type ArticleDetailItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Intro string `json:"intro"`
|
||||
Author string `json:"author"`
|
||||
AuthorAvatar string `json:"authorAvatar"`
|
||||
Cover string `json:"cover"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
||||
ViewCount int64 `json:"viewCount"`
|
||||
Sort int `json:"sort"`
|
||||
ReviewStatus int `json:"reviewStatus"`
|
||||
CreatedAt string `json:"createdAt"` // 格式:yyyy/MM/dd
|
||||
Nodes []*ArticleNodeItem `json:"nodes"`
|
||||
Prev *ArticleNavItem `json:"prev"` // 上一篇(无则为 null)
|
||||
Next *ArticleNavItem `json:"next"` // 下一篇(无则为 null)
|
||||
RecommendTools []*ToolRecommendItem `json:"recommendTools"` // 工具推荐(随机6个)
|
||||
RecommendArticles []*ArticleRecommendItem `json:"recommendArticles"` // 文章推荐(随机6个)
|
||||
CommentList GetCommentListResp `json:"commentList"` // 评论
|
||||
Categories []*ToolCategoryItem `json:"categories"` // 分类列表
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// -------- 页面级响应 --------
|
||||
|
||||
// AIToolsHomeData 工具首页数据
|
||||
type AIToolsHomeData struct {
|
||||
Categories []*ToolCategoryItem `json:"categories"`
|
||||
HotTools []*ToolBriefItem `json:"hotTools"` // 热门推荐工具(按设置时间倒序)
|
||||
Sections []*CategorySection `json:"sections"`
|
||||
Articles []*ArticleBriefItem `json:"articles"`
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// AIToolsListData 工具列表页数据
|
||||
type AIToolsListData struct {
|
||||
Categories []*ToolCategoryItem `json:"categories"`
|
||||
Total int64 `json:"total"`
|
||||
List []*ToolBriefItem `json:"list"`
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// SearchArticleItem 搜索命中的文章
|
||||
type SearchArticleItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
Intro string `json:"intro"`
|
||||
Author string `json:"author"`
|
||||
AuthorAvatar string `json:"authorAvatar"`
|
||||
Cover string `json:"cover"`
|
||||
CreatedAt string `json:"createdAt"` // 格式:yyyy/MM/dd
|
||||
Score float32 `json:"score"` // 相关度分数
|
||||
}
|
||||
|
||||
// SearchToolItem 搜索命中的工具
|
||||
type SearchToolItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
SubCateId int64 `json:"subCateId"`
|
||||
Title string `json:"title"`
|
||||
Logo string `json:"logo"`
|
||||
Snapshot string `json:"snapshot"`
|
||||
Intro string `json:"intro"`
|
||||
OfficialUrl string `json:"officialUrl"`
|
||||
Hot int64 `json:"hot"`
|
||||
Score float32 `json:"score"` // 相关度分数
|
||||
}
|
||||
|
||||
// AISearchData 搜索结果
|
||||
type AISearchData struct {
|
||||
Keyword string `json:"keyword"`
|
||||
Articles []*SearchArticleItem `json:"articles"`
|
||||
Tools []*SearchToolItem `json:"tools"`
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// AIRecommendData 推荐展示数据
|
||||
type AIRecommendData struct {
|
||||
Articles []*ArticleBriefItem `json:"articles"` // 随机2篇文章
|
||||
Tools []*ToolBriefItem `json:"tools"` // 随机20个工具
|
||||
Site SiteCommonData `json:"site"`
|
||||
}
|
||||
|
||||
// AIArticleListData 文章列表页数据
|
||||
type AIArticleListData struct {
|
||||
Categories []*ToolCategoryItem `json:"categories"`
|
||||
Total int64 `json:"total"`
|
||||
List []*ArticleBriefItem `json:"list"`
|
||||
Site SiteCommonData `json:"site"`
|
||||
RecommendTools []*ToolRecommendItem `json:"recommendTools"` // 工具推荐(随机6个)
|
||||
RecommendArticles []*ArticleRecommendItem `json:"recommendArticles"` // 文章推荐(随机6个)
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package proto
|
||||
|
||||
// AppListResp 应用列表接口响应
|
||||
type AppListResp struct {
|
||||
// 当前路径
|
||||
Path string `json:"path"`
|
||||
// 配置信息
|
||||
Config ConfigInfo `json:"config"`
|
||||
// 广告
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
// 应用分类列表(含各分类下的应用列表)
|
||||
CategoryList []AppCategoryInfo `json:"categoryList"`
|
||||
// 当前分类(含应用列表)
|
||||
Category AppCategoryInfo `json:"category"`
|
||||
}
|
||||
|
||||
// AppCategoryInfo 应用分类信息
|
||||
type AppCategoryInfo struct {
|
||||
// 分类ID
|
||||
Id int64 `json:"id"`
|
||||
// 分类标题
|
||||
Title string `json:"title"`
|
||||
// 分类简介
|
||||
Intro string `json:"intro"`
|
||||
// 排序
|
||||
Sort int64 `json:"sort"`
|
||||
// 分类编码(特殊值:12=广告位A 13=广告位B)
|
||||
Code int64 `json:"code"`
|
||||
// 应用列表
|
||||
AppList []AppInfoData `json:"appList"`
|
||||
}
|
||||
|
||||
// AppInfoData 应用信息
|
||||
type AppInfoData struct {
|
||||
// 应用ID
|
||||
Id int64 `json:"id"`
|
||||
// 所属分类ID
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
// 应用名称
|
||||
Name string `json:"name"`
|
||||
// 简介
|
||||
Intro string `json:"intro"`
|
||||
// 详细描述
|
||||
Description string `json:"description"`
|
||||
// Logo 图片地址
|
||||
Logo string `json:"logo"`
|
||||
// 跳转链接(已含渠道码)
|
||||
Url string `json:"url"`
|
||||
// 排序
|
||||
Sort int64 `json:"sort"`
|
||||
// 广告ID(广告条目时返回)
|
||||
AdvitiseId string `json:"advitiseId"`
|
||||
// 广告位置ID
|
||||
Location int64 `json:"location"`
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/models/cointransmod"
|
||||
|
||||
// CoinTransListItemResp 金币余额明细列表项
|
||||
type CoinTransListItemResp struct {
|
||||
// 流水ID
|
||||
Id int64 `json:"id"`
|
||||
// 标题,优先使用备注,备注为空时使用交易类型名称
|
||||
Title string `json:"title"`
|
||||
// 收支方向:1-收入,-1-支出
|
||||
FlowDir cointransmod.FlowDir `json:"flowDir"`
|
||||
// 收支方向名称:收入/支出
|
||||
FlowDirName string `json:"flowDirName"`
|
||||
// 交易类型 1-金币充值(购买金币)2-购买会员赠送金币 3-历史遗留 4-视频解锁 5-管理员手动调整
|
||||
TranType cointransmod.TranType `json:"tranType"`
|
||||
// 交易类型名称
|
||||
TranTypeName string `json:"tranTypeName"`
|
||||
// 本次交易金币数,始终为正数
|
||||
Amount int64 `json:"amount"`
|
||||
// 带方向的金币变动数,收入为正数,支出为负数
|
||||
ChangeAmount int64 `json:"changeAmount"`
|
||||
// 交易前余额
|
||||
BalanceBefore int64 `json:"balanceBefore"`
|
||||
// 交易后余额
|
||||
BalanceAfter int64 `json:"balanceAfter"`
|
||||
// 关联订单号
|
||||
OrderNo string `json:"orderNo"`
|
||||
// 关联内容ID
|
||||
RelatedId int64 `json:"relatedId"`
|
||||
// 备注
|
||||
Remark string `json:"remark"`
|
||||
// 交易时间,格式:2006-01-02 15:04:05
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/pubdef"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GetCommentListReq 评论列表请求
|
||||
type GetCommentListReq struct {
|
||||
ObjectId int64 `form:"objectId" json:"objectId" binding:"required"` // 对象ID(短剧id 短剧剧集id 视频id)
|
||||
ObjectType int64 `form:"objectType" json:"objectType" binding:"required"` // 对象类型 10-短剧 11-短剧剧集 20-视频
|
||||
SortOrder int64 `form:"sortOrder" json:"sortOrder"` // 排序 1-热门,按点赞数倒序 2-最新,按创建时间倒序
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// GetCommentListResp 评论列表响应
|
||||
type GetCommentListResp struct {
|
||||
ObjectId int64 `json:"objectId"` // 对象ID
|
||||
TotalCount int64 `json:"totalCount"` // 总数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommentInfo `json:"list"` // 数据
|
||||
}
|
||||
|
||||
// CommentSendReq 评论发布请求
|
||||
type CommentSendReq struct {
|
||||
ObjectId int64 `json:"objectId"` // 对象ID,短剧评论传短剧ID,剧集评论传剧集ID,视频评论传视频ID
|
||||
ObjectType int64 `json:"objectType"` // 对象类型 10-短剧 11-短剧剧集 20-视频
|
||||
ParentsId int64 `json:"parentsId"` // 一级评论ID,0-发布一级评论,大于0-发布二级评论
|
||||
ReplyCommentId int64 `json:"replyCommentId"` // 被回复评论ID,0时默认回复parentsId
|
||||
Text string `json:"text"` // 评论内容
|
||||
}
|
||||
|
||||
// CommentLikeSetReq 评论点赞设置请求
|
||||
type CommentLikeSetReq struct {
|
||||
CommentId int64 `json:"commentId" binding:"required"` // 评论ID
|
||||
IsLike *bool `json:"isLike" binding:"required"` // 是否点赞,true-点赞,false-取消点赞
|
||||
}
|
||||
|
||||
// CommentLikeSetResp 评论点赞设置响应
|
||||
type CommentLikeSetResp struct {
|
||||
CommentId int64 `json:"commentId"` // 评论ID
|
||||
IsLike int64 `json:"isLike"` // 点赞状态 1-已点赞 2-未点赞
|
||||
CountLike int64 `json:"countLike"` // 评论点赞数
|
||||
}
|
||||
|
||||
// CommentInfo 评论信息
|
||||
type CommentInfo struct {
|
||||
Id int64 `json:"id"` // 评论ID
|
||||
ObjectId int64 `json:"objectId"` // 对象ID
|
||||
ObjectType int64 `json:"objectType"` // 对象类型 10-短剧 11-短剧剧集 20-视频
|
||||
UserId int64 `json:"userId"` // 评论用户ID
|
||||
UserName string `json:"userName"` // 用户名称
|
||||
UserAvatar string `json:"userAvatar"` // 用户头像,已拼接图片域名
|
||||
Text string `json:"text"` // 评论内容
|
||||
Level int64 `json:"level"` // 评论级别 1-一级评论 2-二级评论
|
||||
ParentsId int64 `json:"parentsId"` // 父评论ID,一级评论为0
|
||||
ReplyCommentId int64 `json:"replyCommentId"` // 被回复评论ID,一级评论为0
|
||||
ReplyUserName string `json:"replyUserName"` // 被回复用户昵称
|
||||
CommentCount int64 `json:"commentCount"` // 二级评论数量
|
||||
CountLike int64 `json:"countLike"` // 评论点赞数
|
||||
IsLike int64 `json:"isLike"` // 当前用户点赞状态 1-已点赞 2-未点赞
|
||||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
||||
Children []CommentInfo `json:"children"` // 二级评论列表
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package proto
|
||||
|
||||
type ConfigInfo struct {
|
||||
PdfAddr string `json:"pdfAddr" bson:"pdfAddr"` // 回家的路PDF
|
||||
NewUrlAddr string `json:"newUrlAddr" bson:"newUrlAddr"` //最新地址
|
||||
NewUrlAddr1 string `json:"newUrlAddr1" bson:"newUrlAddr1"` //最新地址(备用地址1)
|
||||
NewUrlAddr2 string `json:"newUrlAddr2" bson:"newUrlAddr2"` //最新地址(备用地址2)
|
||||
ForeverUrlAddr string `json:"foreverUrlAddr" bson:"foreverUrlAddr"` //永久地址
|
||||
GmailAddr string `json:"gmailAddr" bson:"gmailAddr"` //邮箱地址
|
||||
AppAddr string `json:"appAddr" bson:"appAddr"` //APP下载地址(落地页)
|
||||
OfficialAppAddr string `json:"officialAppAddr" bson:"officialAppAddr"` //官网app地址
|
||||
WeiChart string `json:"weiChart" bson:"weiChart"` //微信群
|
||||
QQ string `json:"qq" bson:"qq"` //qq群
|
||||
TgGroup string `json:"tgGroup" bson:"tgGroup"` //tg群
|
||||
PotaoGroup string `json:"potaoGroup" bson:"potaoGroup"` //土豆群
|
||||
GitAddr string `json:"gitAddr" bson:"gitAddr"` //git地址
|
||||
TwitterAddr string `json:"twitterAddr" bson:"twitterAddr"` //推特地址
|
||||
Telegram string `json:"telegram" bson:"telegram"` //商务tg
|
||||
TelegramAdd string `json:"telegramAdd" bson:"telegramAdd"` //加入我们tg
|
||||
TranslationAddr string `json:"translationAddr" bson:"translationAddr"` //应用导航
|
||||
ImgCdn string `json:"imgCdn" bson:"imgCdn"` // 图片CDN
|
||||
TsCdn string `json:"tsCdn" bson:"tsCdn"` // 视频CDN
|
||||
ImgAppUsCdn string `json:"imgAppUsCdn" bson:"imgAppUsCdn"` // 图片CDN(海外app使用)
|
||||
MediaAppUsCdn string `json:"mediaAppUsCdn" bson:"mediaAppUsCdn"` // 视频CDN(海外app使用)
|
||||
WebTitle string `json:"webTitle" bson:"webTitle"` // 网站SEO标题
|
||||
WebKeyworld []string `json:"webKeyworld" bson:"webKeyworld"` // 网站SEO关键字
|
||||
WebDescription string `json:"webDescription" bson:"webDescription"` // 网站SEO描述
|
||||
WebSiteName string `json:"webSiteName" bson:"webSiteName"` // 网站SEO网站名称
|
||||
WebAddr string `json:"webAddr" bson:"webAddr"` // 网站SEO网站地址
|
||||
DHNewUrlAddr1 string `json:"dhNewUrlAddr1" bson:"dhNewUrlAddr1"` // 导航页-线路1
|
||||
DHNewUrlAddr2 string `json:"dhNewUrlAddr2" bson:"dhNewUrlAddr2"` // 导航页-线路2
|
||||
DHNewUrlAddr3 string `json:"dhNewUrlAddr3" bson:"dhNewUrlAddr3"` // 导航页-线路3
|
||||
FreeVPN string `json:"freeVPN" bson:"freeVPN"` // 免费vpn链接
|
||||
UseIngAddress []string `json:"useIngAddress" bson:"useIngAddress"` // 所有使用中的域名
|
||||
AdvitiesTopicNum int64 `json:"advitiesTopicNum" bson:"advitiesTopicNum"` // 广告间隔
|
||||
DHTitle string `json:"dhTitle" bson:"dhTitle"` // 导航SEO标题
|
||||
DHKeyworld []string `json:"dhKeyworld" bson:"dhKeyworld"` // 导航SEO关键字
|
||||
DHDescription string `json:"dhDescription" bson:"dhDescription"` // 导航SEO描述
|
||||
DHSiteName string `json:"dhSiteName" bson:"dhSiteName"` // 导航SEO网站名称
|
||||
ActressBackGround string `json:"actressBackGround" bson:"actressBackGround"` // 女优通用背景图
|
||||
ReportSDKConfig string `json:"reportSdkConfig"` // 数据上报SDK域名配置
|
||||
WatermarkImage string `json:"watermarkImage"` // 图片水印文件
|
||||
CustomerServiceHost string `json:"customerServiceHost"` // 在线客服
|
||||
ChannelCode string `json:"channelCode"` // 渠道码
|
||||
EnableH265 bool `json:"enableH265"` // 是否允许客户端使用 H265 地址播放
|
||||
}
|
||||
|
||||
type AdvitiseInfo struct {
|
||||
Id int64 `json:"id" bson:"_id"` // 广告id
|
||||
Title string `json:"title" bson:"title"` // 广告标题
|
||||
Images string `json:"images" bson:"images"` // 视频banner
|
||||
Link string `json:"link" bson:"link"` // 链接
|
||||
}
|
||||
|
||||
// ConfigInfoResp APP配置响应
|
||||
type ConfigInfoResp struct {
|
||||
// 最新地址信息
|
||||
NewAddressInfo NewAddressInfo `json:"newAddressInfo"`
|
||||
// 完整系统配置(与首页等接口的 config 一致,含 potaoGroup 等其余字段)
|
||||
Config ConfigInfo `json:"config"`
|
||||
// 广告配置
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
// 全站SEO信息
|
||||
SeoInfo SeoInfo `json:"seoInfo"`
|
||||
// 导航SEO信息
|
||||
SeoNavInfo SeoNavInfo `json:"seoNavInfo"`
|
||||
// 导航页线路集合
|
||||
NavPageList []NavPageItem `json:"navPageList"`
|
||||
// 数据上报SDK域名配置
|
||||
ReportSDKConfig string `json:"reportSdkConfig"`
|
||||
}
|
||||
|
||||
// SeoNavInfo 导航SEO信息
|
||||
type SeoNavInfo struct {
|
||||
DHTitle string `json:"dhTitle"` // 导航标题
|
||||
DHKeyworld []string `json:"dhKeyworld"` // 关键词
|
||||
DHDescription string `json:"dhDescription"` // 导航描述
|
||||
DHSiteName string `json:"dhSiteName"` // 导航名称
|
||||
}
|
||||
|
||||
// NavPageItem 导航页线路
|
||||
type NavPageItem struct {
|
||||
Line int64 `json:"line"` // 线路序号
|
||||
Url string `json:"url"` // 线路地址
|
||||
}
|
||||
|
||||
// FooterInfoResp APP底部信息响应
|
||||
type FooterInfoResp struct {
|
||||
FooterInfo FooterInfo `json:"footerInfo"` // 底部信息
|
||||
}
|
||||
|
||||
// FooterInfo APP底部信息
|
||||
type FooterInfo struct {
|
||||
Brand FooterBrand `json:"brand"` // 品牌信息
|
||||
NavList []TranslationCategory `json:"navList"` // 底部导航
|
||||
ContactList []FooterContact `json:"contactList"` // 联系方式
|
||||
}
|
||||
|
||||
// FooterBrand APP底部品牌信息
|
||||
type FooterBrand struct {
|
||||
Title string `json:"title"` // 品牌标题
|
||||
Content string `json:"content"` // 品牌标语
|
||||
}
|
||||
|
||||
// FooterContact APP底部联系方式
|
||||
type FooterContact struct {
|
||||
Name string `json:"name"` // 联系方式名称
|
||||
Value string `json:"value"` // 联系方式值
|
||||
}
|
||||
|
||||
// NewAddressInfo 最新地址
|
||||
type NewAddressInfo struct {
|
||||
NewUrlAddr string `json:"newUrlAddr"` // 新国内地址
|
||||
NewUrlAddr1 string `json:"newUrlAddr1"` // 备用地址1
|
||||
NewUrlAddr2 string `json:"newUrlAddr2"` // 备用地址1
|
||||
ForeverUrlAddr string `json:"foreverUrlAddr"` // 永久海外地址(翻墙访问 永不迷路)
|
||||
GmailAddr string `json:"gmailAddr"` // 邮箱地址
|
||||
TgGroup string `json:"tgGroup"` // tg群
|
||||
Telegram string `json:"telegram" bson:"telegram"` // 商务tg
|
||||
CustomerServiceHost string `json:"customerServiceHost"` // 在线客服
|
||||
TwitterAddr string `json:"twitterAddr"` // 推特地址
|
||||
PdfAddr string `json:"pdfAddr"` // 回家的路PDF
|
||||
AppAddr string `json:"appAddr"` // APP下载地址(落地页)
|
||||
OfficialAppAddr string `json:"officialAppAddr"` // 官网app地址
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package proto
|
||||
|
||||
// ContactUsAddReq 联系我们请求
|
||||
type ContactUsAddReq struct {
|
||||
// 邮箱
|
||||
Email string `json:"email" binding:"required"`
|
||||
// 问题类型,1-订单问题、2-账号问题、3-功能问题、4-体验问题、5-其他
|
||||
Type int32 `json:"type" binding:"required"`
|
||||
// 标题
|
||||
Title string `json:"title" binding:"required"`
|
||||
// 内容
|
||||
Content string `json:"content" binding:"required"`
|
||||
// 附件地址,可存放多张图片或文件地址
|
||||
Attachments []string `json:"attachments"`
|
||||
}
|
||||
|
||||
// ContactUsAddResp 联系我们响应
|
||||
type ContactUsAddResp struct {
|
||||
// 提示信息
|
||||
Message string `json:"message"`
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package proto
|
||||
|
||||
type ContributeData struct {
|
||||
Path string `json:"path"`
|
||||
RichText []RichTextInfo `json:"richText" form:"richText"` // 富文本内容
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package proto
|
||||
|
||||
// DHHtmlData 导航数据
|
||||
type DHHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
RichTextInfo RichTextInfo `json:"richTextInfo" form:"richTextInfo"` // 富文本
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
}
|
||||
|
||||
// DHConsultingHtmlData 招募
|
||||
type DHConsultingHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
RichTextInfo RichTextInfo `json:"richTextInfo" form:"richTextInfo"` // 富文本
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
}
|
||||
|
||||
// DHConsultingInfoHtmlData 招募
|
||||
type DHConsultingInfoHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
RichTextInfo RichTextInfo `json:"richTextInfo" form:"richTextInfo"` // 富文本
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package proto
|
||||
|
||||
// FeedbackReq 意见反馈请求
|
||||
type FeedbackReq struct {
|
||||
// 问题类型,1-功能建议、2-Bug反馈、3-体验问题、4-账号问题、5-其他
|
||||
Type int32 `json:"type" binding:"required"`
|
||||
// 描述内容,最多500字
|
||||
Content string `json:"content" binding:"required"`
|
||||
// 问题截图,可存放多张图片地址
|
||||
Screenshots []string `json:"screenshots"`
|
||||
// 联系方式,可为空
|
||||
Contact string `json:"contact"`
|
||||
}
|
||||
|
||||
// FeedbackResp 意见反馈响应
|
||||
type FeedbackResp struct {
|
||||
// 提示信息
|
||||
Message string `json:"message"`
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package proto
|
||||
|
||||
type FindVideoData struct {
|
||||
RichText []RichTextInfo `json:"richText" form:"richText"` // 富文本内容
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package proto
|
||||
|
||||
type HealthCheckRequest struct {
|
||||
GroupID string `json:"groupId" binding:"required"`
|
||||
Timestamp int64 `json:"timestamp" binding:"required"`
|
||||
Sign string `json:"sign" binding:"required"`
|
||||
}
|
||||
|
||||
type ComponentStatus struct {
|
||||
Status string `json:"status"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
Master string `json:"master,omitempty"`
|
||||
}
|
||||
|
||||
type HealthCPUMetrics struct {
|
||||
Cores int `json:"cores"`
|
||||
Used float64 `json:"used"`
|
||||
}
|
||||
|
||||
type HealthMemoryMetrics struct {
|
||||
Total int64 `json:"total"`
|
||||
Used int64 `json:"used"`
|
||||
}
|
||||
|
||||
type HealthCheckData struct {
|
||||
ServerName string `json:"serverName,omitempty"`
|
||||
ServerIP string `json:"serverIp,omitempty"`
|
||||
CPU HealthCPUMetrics `json:"cpu"`
|
||||
Memory HealthMemoryMetrics `json:"memory"`
|
||||
Disk HealthMemoryMetrics `json:"disk"`
|
||||
Mysql *ComponentStatus `json:"mysql,omitempty"`
|
||||
Mongodb *ComponentStatus `json:"mongodb,omitempty"`
|
||||
Redis *ComponentStatus `json:"redis,omitempty"`
|
||||
Elasticsearch *ComponentStatus `json:"elasticsearch,omitempty"`
|
||||
Kafka *ComponentStatus `json:"kafka,omitempty"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package proto
|
||||
|
||||
// LawAndTrustHtmlData
|
||||
type LawAndTrustHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
}
|
||||
@@ -0,0 +1,617 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/pubdef"
|
||||
"time"
|
||||
)
|
||||
|
||||
// HomePlayletResponse 首页响应
|
||||
type HomePlayletResponse struct {
|
||||
HomeBannerData []*CommonData `json:"homeBannerData"` // 首页banner短剧信息列表
|
||||
HomeConfigData []*HomeConfigData `json:"homeConfigData"` // 首页配置集合
|
||||
Announcements []*AnnouncementItem `json:"announcements"` // 启用中的公告,来自独立缓存
|
||||
Advitise AdvitiseData `json:"advitise"` // 广告
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息(短剧列表页SEO)
|
||||
}
|
||||
|
||||
// HomeConfigData 首页配置数据
|
||||
type HomeConfigData struct {
|
||||
Id int64 `json:"id"` // ID
|
||||
Name string `json:"name"` // 名称
|
||||
Slug string `json:"slug"` // slug,H5 更多页优先用它
|
||||
Desc string `json:"desc"` // 描述
|
||||
Type int32 `json:"type"` // 类型 1-短剧 2-视频 3-题材
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
SortType int32 `json:"sortType"` // 排序字段 1-推荐 2-热播 3-最近更新 4-新片预告 5-分类
|
||||
Status bool `json:"status"` // 上下架状态 true-上架 false-下架
|
||||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt"` // 修改时间
|
||||
List []*CommonData `json:"list"` // 配置对应短剧集合,type=1时返回
|
||||
VideoList []*VideoItemResp `json:"videoList"` // 视频集合,type=2时返回
|
||||
ThemeList []*HomeConfigThemeData `json:"themeList"` // 题材集合,type=3时返回
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// HomeConfigThemeData 首页配置题材数据
|
||||
type HomeConfigThemeData struct {
|
||||
Id int64 `json:"id"` // 题材ID
|
||||
Name string `json:"name"` // 题材名称
|
||||
Slug string `json:"slug"` // 题材slug
|
||||
Icon string `json:"icon"` // 题材图标,已拼接图片域名
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
PlayletCount int64 `json:"playletCount"` // 绑定短剧数量
|
||||
List []*CommonData `json:"list"` // 题材下短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo"` // 题材对应页面SEO信息
|
||||
}
|
||||
|
||||
// HomeConfigDetailListReq 首页配置详情分页请求
|
||||
type HomeConfigDetailListReq struct {
|
||||
pubdef.Page
|
||||
HomeConfigId int64 `form:"homeConfigId" json:"homeConfigId"` // 首页配置ID;sortType=5(分类)时即分类ID。与 homeConfigSlug 二选一
|
||||
HomeConfigSlug string `form:"homeConfigSlug" json:"homeConfigSlug"` // 首页配置 slug,非空时优先按 slug 查询
|
||||
OperateType int32 `form:"operateType" json:"operateType"` // type=1时生效,运营类型 0-全部 1-短剧 2-漫剧
|
||||
ThemeId int64 `form:"themeId" json:"themeId"` // type=1时生效,题材ID
|
||||
ThemeSlug string `form:"themeSlug" json:"themeSlug"` // type=1时生效,题材slug,非空时优先按slug解析题材ID
|
||||
MediaType int64 `form:"mediaType" json:"mediaType"` // type=2时生效,视频类型 0-全部 1-影集 2-动画
|
||||
TopicId int64 `form:"topicId" json:"topicId"` // type=2时生效,视频题材ID,对应video_topic
|
||||
TimeRange int64 `form:"timeRange" json:"timeRange"` // type=1/type=2时生效,时间范围 0-综合 1-本周 2-本月
|
||||
}
|
||||
|
||||
// HomeConfigDetailListResp 首页配置详情分页响应
|
||||
type HomeConfigDetailListResp struct {
|
||||
HomeConfigId int64 `json:"homeConfigId"` // 首页配置ID
|
||||
HomeConfigSlug string `json:"homeConfigSlug"` // 首页配置 slug
|
||||
Name string `json:"name"` // 名称
|
||||
Desc string `json:"desc"` // 描述
|
||||
Type int32 `json:"type"` // 类型 1-短剧 2-视频 3-题材
|
||||
SortType int32 `json:"sortType"` // 排序字段 1-推荐 2-热播 3-最近更新 4-新片预告 5-分类
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []*CommonData `json:"list"` // 短剧集合,type=1时返回
|
||||
VideoList []*VideoItemResp `json:"videoList"` // 视频集合,type=2时返回
|
||||
ThemeList []*HomeConfigThemeData `json:"themeList"` // 题材集合,type=3时返回
|
||||
Advitise AdvitiseData `json:"advitise"` // 广告
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// AnnouncementItem 首页公告
|
||||
type AnnouncementItem struct {
|
||||
Id int64 `json:"id"` // 公告ID
|
||||
Title string `json:"title"` // 标题
|
||||
Content string `json:"content"` // 内容
|
||||
}
|
||||
|
||||
// PlayletAllListReq 全部短剧分页请求
|
||||
type PlayletAllListReq struct {
|
||||
pubdef.Page
|
||||
ThemeId int64 `form:"themeId" json:"themeId"` // 题材ID
|
||||
ThemeSlug string `form:"themeSlug" json:"themeSlug"` // 题材slug,非空时优先按slug解析题材ID
|
||||
UpdateStatus int `form:"updateStatus" json:"updateStatus"` // 更新状态 0-全部 1-连载中 2-已完结
|
||||
SortType int64 `form:"sortType" json:"sortType"` // 排序 1-最新 2-最热 3-收藏最多
|
||||
}
|
||||
|
||||
// PlayletAllListResp 全部短剧分页响应
|
||||
type PlayletAllListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
Advitise AdvitiseData `json:"advitise"` // 广告
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息
|
||||
}
|
||||
|
||||
// CommonData 首页通用数据
|
||||
type CommonData struct {
|
||||
Id int64 `json:"id"` // 短剧id
|
||||
Status int32 `json:"status"` // 状态: 0下架 1上架
|
||||
IsFeatured bool `json:"isFeatured"` // 是否爆剧(true-是,false-否)
|
||||
IsRecommend bool `json:"isRecommend"` // 是否推荐 true-推荐,false-不推荐
|
||||
IsNew bool `json:"isNew"` // 是否上新,本周内上架为true
|
||||
OperateType int32 `json:"operateType"` // 运营类型 1-短剧 2-漫剧
|
||||
ShowOnBanner bool `json:"showOnBanner"` // 是否显示在首页banner
|
||||
Banner string `json:"banner"` // banner图,已拼接图片域名
|
||||
OnlineAt time.Time `json:"onlineAt"` // 上架时间
|
||||
MediaCreatedAt time.Time `json:"mediaCreatedAt"` // 媒资中心创建时间
|
||||
MediaUpdatedAt time.Time `json:"mediaUpdatedAt"` // 媒资中心更新时间
|
||||
ThemeIds []int64 `json:"themeIds"` // 题材ID集合
|
||||
ThemeNames []string `json:"themeNames"` // 题材名称集合
|
||||
ThemeSlugs []string `json:"themeSlugs"` // 题材slug集合
|
||||
CategoryIds []int64 `json:"categoryIds"` // 分类ID集合
|
||||
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"` // 竖版封面,已拼接图片域名
|
||||
HorizontalCover string `json:"horizontalCover"` // 横版封面,已拼接图片域名
|
||||
Preview string `json:"preview"` // 预告地址,详情接口返回时带播放签名
|
||||
TagIds []int64 `json:"tagIds"` // 标签ID集合
|
||||
TagNames []string `json:"tagNames"` // 标签名称集合
|
||||
TagSlugs []string `json:"tagSlugs"` // 标签slug集合
|
||||
TotalEpisode int64 `json:"totalEpisode"` // 总集数
|
||||
UpdateStatus int `json:"updateStatus"` // 更新状态 1-连载中 2-已完结
|
||||
CountBrowse int64 `json:"countBrowse"` // 观看量
|
||||
HeatValue int64 `json:"heatValue"` // 热度值
|
||||
CountCollect int64 `json:"countCollect"` // 收藏数
|
||||
CountLike int64 `json:"countLike"` // 点赞数,包含真实点赞数和后台虚拟点赞数
|
||||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt"` // 修改时间
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// PlayletRankReq 短剧排行榜请求
|
||||
type PlayletRankReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
SortOrder int64 `form:"sortOrder" json:"sortOrder"` // 排序 1-热播榜,按热度值倒序 2-新剧榜,按上架时间倒序 3-追剧榜,按收藏数倒序
|
||||
}
|
||||
|
||||
// PlayletRankResp 短剧排行榜响应
|
||||
type PlayletRankResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息(短剧列表页SEO)
|
||||
}
|
||||
|
||||
// PlayletHotRankListReq 热榜分页请求
|
||||
type PlayletHotRankListReq struct {
|
||||
pubdef.Page
|
||||
RankType int64 `form:"rankType" json:"rankType"` // 榜单类型 1-热播榜 2-新剧榜 3-追剧榜
|
||||
}
|
||||
|
||||
// PlayletHotRankListResp 热榜分页响应
|
||||
type PlayletHotRankListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
RankType int64 `json:"rankType"` // 榜单类型 1-热播榜 2-新剧榜 3-追剧榜
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息
|
||||
}
|
||||
|
||||
// PlayletOperateListReq 按运营类型分页查询短剧请求
|
||||
type PlayletOperateListReq struct {
|
||||
pubdef.Page
|
||||
OperateType int32 `form:"operateType" json:"operateType"` // 运营类型 1-短剧 2-漫剧
|
||||
FilterType int64 `form:"filterType" json:"filterType"` // 筛选类型 1-最近更新 2-当前热播 3-独家原创
|
||||
}
|
||||
|
||||
// PlayletOperateListResp 按运营类型分页查询短剧响应
|
||||
type PlayletOperateListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
OperateType int32 `json:"operateType"` // 运营类型 1-短剧 2-漫剧
|
||||
FilterType int64 `json:"filterType"` // 筛选类型 1-最近更新 2-当前热播 3-独家原创
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
}
|
||||
|
||||
// PlayletTodayUpdateReq 今日更新短剧请求
|
||||
type PlayletTodayUpdateReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// PlayletTodayUpdateResp 今日更新短剧响应
|
||||
type PlayletTodayUpdateResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息(短剧列表页SEO)
|
||||
}
|
||||
|
||||
// PlayletGuessLikeListReq 猜你喜欢分页请求
|
||||
type PlayletGuessLikeListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认6、最大100
|
||||
pubdef.Page
|
||||
PlayletId int64 `form:"playletId" json:"playletId" binding:"required"` // 当前短剧ID
|
||||
}
|
||||
|
||||
// PlayletGuessLikeListResp 猜你喜欢分页响应
|
||||
type PlayletGuessLikeListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 猜你喜欢短剧集合
|
||||
}
|
||||
|
||||
// PlayletTagVideoReq 根据标签ID分页查询短剧请求
|
||||
type PlayletTagVideoReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
TagId int64 `form:"tagId" json:"tagId"` // 标签ID,tagSlug为空时必传
|
||||
TagSlug string `form:"tagSlug" json:"tagSlug"` // 标签slug,非空时优先按slug解析标签ID
|
||||
SortType int64 `form:"sortType" json:"sortType"` // 排序 1-最新 2-最热 3-收藏最多
|
||||
}
|
||||
|
||||
// PlayletTagVideoResp 根据标签ID分页查询短剧响应
|
||||
type PlayletTagVideoResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息(标签SEO)
|
||||
}
|
||||
|
||||
// PlayletSearchReq 短剧ES分页搜索请求
|
||||
type PlayletSearchReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
Keyword string `form:"keyword" json:"keyword"` // 搜索关键词,支持剧名、题材名、简介和标签名
|
||||
}
|
||||
|
||||
// PlayletSearchResp 短剧ES分页搜索响应
|
||||
type PlayletSearchResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
Keyword string `json:"keyword"` // 搜索词
|
||||
List []CommonData `json:"list"` // 搜索结果
|
||||
EveryoneWatching []*CommonData `json:"everyoneWatching"` // 大家都在看,搜索无结果时返回
|
||||
}
|
||||
|
||||
// PlayletSearchSuggestReq 短剧搜索联想请求
|
||||
type PlayletSearchSuggestReq struct {
|
||||
Keyword string `form:"keyword" json:"keyword" binding:"required"` // 搜索关键词
|
||||
}
|
||||
|
||||
// PlayletSearchSuggestResp 短剧搜索联想响应
|
||||
type PlayletSearchSuggestResp struct {
|
||||
Keyword string `json:"keyword"` // 搜索关键词
|
||||
List []CommonData `json:"list"` // 短剧列表
|
||||
}
|
||||
|
||||
// PlayletHotSearchItem 热搜词
|
||||
type PlayletHotSearchItem struct {
|
||||
Keyword string `json:"keyword"` // 搜索词
|
||||
Count int64 `json:"count"` // 搜索次数
|
||||
}
|
||||
|
||||
// PlayletHotLikeResp 热搜词和猜你喜欢
|
||||
type PlayletHotLikeResp struct {
|
||||
HotSearch []PlayletHotSearchItem `json:"hotSearch"` // 前10个热搜词
|
||||
GuessLike []*CommonData `json:"guessLike"` // 按收藏量最多的15部上架短剧
|
||||
}
|
||||
|
||||
// PlayletLikeSetReq 短剧点赞设置请求
|
||||
type PlayletLikeSetReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 短剧ID
|
||||
IsLike *bool `json:"isLike" binding:"required"` // 是否点赞,true-点赞,false-取消点赞
|
||||
}
|
||||
|
||||
// PlayletLikeSetResp 短剧点赞设置响应
|
||||
type PlayletLikeSetResp struct {
|
||||
Id int64 `json:"id"` // 短剧ID
|
||||
IsLike int64 `json:"isLike"` // 点赞状态 1-已点赞 2-未点赞
|
||||
CountLike int64 `json:"countLike"` // 短剧点赞数
|
||||
}
|
||||
|
||||
// PlayletCollectSetReq 短剧收藏设置请求
|
||||
type PlayletCollectSetReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 短剧ID
|
||||
IsCollect *bool `json:"isCollect" binding:"required"` // 是否收藏,true-收藏,false-取消收藏
|
||||
}
|
||||
|
||||
// PlayletCollectSetResp 短剧收藏设置响应
|
||||
type PlayletCollectSetResp struct {
|
||||
Id int64 `json:"id"` // 短剧ID
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态 1-已收藏 2-未收藏
|
||||
CountCollect int64 `json:"countCollect"` // 短剧收藏数
|
||||
}
|
||||
|
||||
// PlayletForwardHeatReq 短剧转发加热度请求
|
||||
type PlayletForwardHeatReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 短剧ID
|
||||
}
|
||||
|
||||
// PlayletForwardHeatResp 短剧转发加热度响应
|
||||
type PlayletForwardHeatResp struct {
|
||||
Id int64 `json:"id"` // 短剧ID
|
||||
HeatValue int64 `json:"heatValue"` // 加热后的热度值
|
||||
}
|
||||
|
||||
// PlayletCollectListReq 我的收藏列表请求
|
||||
type PlayletCollectListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
WatchStatus int64 `form:"watchStatus" json:"watchStatus"` // 观看状态 0-全部 1-追剧中 2-已看完
|
||||
}
|
||||
|
||||
// PlayletCollectData 我的收藏列表项
|
||||
type PlayletCollectData struct {
|
||||
Id int64 `json:"id"` // 短剧ID
|
||||
Title string `json:"title"` // 标题
|
||||
PlayName string `json:"playName"` // 剧名
|
||||
Slug string `json:"slug"` // slug
|
||||
Cover string `json:"cover"` // 封面,已拼接图片域名
|
||||
ThemeIds []int64 `json:"themeIds"` // 题材ID集合
|
||||
ThemeNames []string `json:"themeNames"` // 题材名称集合
|
||||
ThemeSlugs []string `json:"themeSlugs"` // 题材slug集合
|
||||
TagIds []int64 `json:"tagIds"` // 标签ID集合
|
||||
TagNames []string `json:"tagNames"` // 标签名称集合
|
||||
TagSlugs []string `json:"tagSlugs"` // 标签slug集合
|
||||
TotalEpisode int64 `json:"totalEpisode"` // 总集数
|
||||
UpdateStatus int `json:"updateStatus"` // 更新状态 1-连载中 2-已完结
|
||||
CountBrowse int64 `json:"countBrowse"` // 观看量
|
||||
HeatValue int64 `json:"heatValue"` // 热度值
|
||||
CountCollect int64 `json:"countCollect"` // 收藏数
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态,收藏列表固定返回1-已收藏
|
||||
CollectedAt time.Time `json:"collectedAt"` // 收藏时间
|
||||
WatchedCount int64 `json:"watchedCount"` // 当前用户已看集数
|
||||
UnwatchedCount int64 `json:"unwatchedCount"` // 当前用户未看集数,按totalEpisode-watchedCount计算
|
||||
LastChapterId int64 `json:"lastChapterId"` // 最近观看剧集ID,无观看进度时为0
|
||||
LastEpisode int64 `json:"lastEpisode"` // 最近观看集数,无观看进度时为0
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// PlayletCollectListResp 我的收藏列表响应
|
||||
type PlayletCollectListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总收藏数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []PlayletCollectData `json:"list"` // 收藏短剧集合
|
||||
}
|
||||
|
||||
// PlayletBoughtListReq 我的已购短剧列表请求
|
||||
type PlayletBoughtListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// PlayletBoughtData 我的已购短剧列表项
|
||||
type PlayletBoughtData struct {
|
||||
CommonData
|
||||
BoughtChapterCount int64 `json:"boughtChapterCount"` // 已购剧集数量
|
||||
CostCoins int64 `json:"costCoins"` // 已消耗金币
|
||||
BoughtAt time.Time `json:"boughtAt"` // 最近购买时间
|
||||
LastChapterId int64 `json:"lastChapterId"` // 最近观看剧集ID,无观看进度时为0
|
||||
LastEpisode int64 `json:"lastEpisode"` // 最近观看集数,无观看进度时为0
|
||||
WatchedCount int64 `json:"watchedCount"` // 当前用户已看集数
|
||||
UnwatchedCount int64 `json:"unwatchedCount"` // 当前用户未看集数,按totalEpisode-watchedCount计算
|
||||
IsFinished bool `json:"isFinished"` // 当前用户是否已看完
|
||||
}
|
||||
|
||||
// PlayletBoughtListResp 我的已购短剧列表响应
|
||||
type PlayletBoughtListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总已购短剧数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []PlayletBoughtData `json:"list"` // 已购短剧集合
|
||||
}
|
||||
|
||||
// PlayletHistoryListReq 观看历史列表请求
|
||||
type PlayletHistoryListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认20、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// PlayletHistoryData 观看历史列表项
|
||||
type PlayletHistoryData struct {
|
||||
CommonData
|
||||
LastChapterId int64 `json:"lastChapterId"` // 最近观看剧集ID
|
||||
LastEpisode int64 `json:"lastEpisode"` // 最近观看集数
|
||||
WatchedCount int64 `json:"watchedCount"` // 当前用户已看集数
|
||||
UnwatchedCount int64 `json:"unwatchedCount"` // 当前用户未看集数
|
||||
IsFinished bool `json:"isFinished"` // 是否已看完
|
||||
HistoryAt string `json:"historyAt"` // 最近观看时间
|
||||
}
|
||||
|
||||
// PlayletHistoryListResp 观看历史列表响应
|
||||
type PlayletHistoryListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总历史数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []PlayletHistoryData `json:"list"` // 观看历史集合
|
||||
}
|
||||
|
||||
// PlayletHistoryDeleteReq 删除单条观看历史请求
|
||||
type PlayletHistoryDeleteReq struct {
|
||||
PlayletId int64 `json:"playletId" binding:"required"` // 短剧ID
|
||||
}
|
||||
|
||||
// PlayletHistoryDeleteResp 删除单条观看历史响应
|
||||
type PlayletHistoryDeleteResp struct {
|
||||
DeletedCount int64 `json:"deletedCount"` // 删除记录数量
|
||||
}
|
||||
|
||||
// PlayletHistoryClearResp 清空观看历史响应
|
||||
type PlayletHistoryClearResp struct {
|
||||
DeletedCount int64 `json:"deletedCount"` // 删除记录数量
|
||||
}
|
||||
|
||||
// PlayletChapterLikeSetReq 短剧剧集点赞设置请求
|
||||
type PlayletChapterLikeSetReq struct {
|
||||
ChapterId int64 `json:"chapterId" binding:"required"` // 短剧剧集ID
|
||||
IsLike *bool `json:"isLike" binding:"required"` // 是否点赞,true-点赞,false-取消点赞
|
||||
}
|
||||
|
||||
// PlayletChapterLikeSetResp 短剧剧集点赞设置响应
|
||||
type PlayletChapterLikeSetResp struct {
|
||||
ChapterId int64 `json:"chapterId"` // 短剧剧集ID
|
||||
IsLike int64 `json:"isLike"` // 点赞状态 1-已点赞 2-未点赞
|
||||
CountLike int64 `json:"countLike"` // 短剧剧集点赞数
|
||||
}
|
||||
|
||||
// PlayletChapterCollectSetReq 短剧剧集收藏设置请求
|
||||
type PlayletChapterCollectSetReq struct {
|
||||
ChapterId int64 `json:"chapterId" binding:"required"` // 短剧剧集ID
|
||||
IsCollect *bool `json:"isCollect" binding:"required"` // 是否收藏,true-收藏,false-取消收藏
|
||||
}
|
||||
|
||||
// PlayletChapterCollectSetResp 短剧剧集收藏设置响应
|
||||
type PlayletChapterCollectSetResp struct {
|
||||
ChapterId int64 `json:"chapterId"` // 短剧剧集ID
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态 1-已收藏 2-未收藏
|
||||
CountCollect int64 `json:"countCollect"` // 短剧剧集收藏数
|
||||
}
|
||||
|
||||
// PlayletChapterCollectListReq 我的剧集收藏列表请求
|
||||
type PlayletChapterCollectListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// PlayletChapterCollectData 我的剧集收藏列表项
|
||||
type PlayletChapterCollectData struct {
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
PlayletTitle string `json:"playletTitle"` // 短剧标题
|
||||
PlayletCover string `json:"playletCover"` // 短剧封面,已拼接图片域名
|
||||
TotalEpisode int64 `json:"totalEpisode"` // 短剧总集数
|
||||
UpdateStatus int `json:"updateStatus"` // 更新状态 1-连载中 2-已完结
|
||||
ChapterId int64 `json:"chapterId"` // 短剧剧集ID
|
||||
CurrentEpisode int64 `json:"currentEpisode"` // 第几集
|
||||
ChapterTitle string `json:"chapterTitle"` // 剧集标题
|
||||
VideoUrl string `json:"videoUrl"` // 播放地址
|
||||
MediaTime int64 `json:"mediaTime"` // 影片长度(秒)
|
||||
PayType int32 `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
|
||||
SingleCoins int64 `json:"singleCoins"` // 单集金币
|
||||
CountBrowse int64 `json:"countBrowse"` // 剧集观看数
|
||||
CountCollect int64 `json:"countCollect"` // 剧集收藏数
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态,收藏列表固定返回1-已收藏
|
||||
CollectedAt time.Time `json:"collectedAt"` // 收藏时间
|
||||
}
|
||||
|
||||
// PlayletChapterCollectListResp 我的剧集收藏列表响应
|
||||
type PlayletChapterCollectListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总收藏数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []PlayletChapterCollectData `json:"list"` // 收藏剧集集合
|
||||
}
|
||||
|
||||
// PlayletChapterWatchReportReq 短剧剧集观看上报请求
|
||||
type PlayletChapterWatchReportReq struct {
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID,传入时用于校验剧集归属
|
||||
ChapterId int64 `json:"chapterId" binding:"required"` // 短剧剧集ID
|
||||
}
|
||||
|
||||
// PlayletChapterWatchReportResp 短剧剧集观看上报响应
|
||||
type PlayletChapterWatchReportResp struct {
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
ChapterId int64 `json:"chapterId"` // 短剧剧集ID
|
||||
CurrentEpisode int64 `json:"currentEpisode"` // 当前集数
|
||||
WatchedCount int64 `json:"watchedCount"` // 当前用户已看集数
|
||||
UnwatchedCount int64 `json:"unwatchedCount"` // 当前用户未看集数
|
||||
LastChapterId int64 `json:"lastChapterId"` // 最近观看剧集ID
|
||||
LastEpisode int64 `json:"lastEpisode"` // 最近观看集数
|
||||
}
|
||||
|
||||
// PlayletInfoReq 详情请求
|
||||
type PlayletInfoReq struct {
|
||||
Id int64 `form:"id" json:"id"` // 短剧id
|
||||
Slug string `form:"slug" json:"slug"` // 短剧slug,非空时优先按slug解析短剧ID
|
||||
}
|
||||
|
||||
// PlayletChapterInfoReq 短剧剧集详情请求
|
||||
type PlayletChapterInfoReq struct {
|
||||
PlayletId int64 `form:"playletId" json:"playletId"` // 短剧ID,传入时用于校验剧集归属
|
||||
PlayletSlug string `form:"playletSlug" json:"playletSlug"` // 短剧slug,非空时优先按slug解析短剧ID
|
||||
ChapterId int64 `form:"chapterId" json:"chapterId" binding:"required"` // 短剧剧集ID
|
||||
}
|
||||
|
||||
// PlayletChapterListReq 短剧剧集列表请求
|
||||
type PlayletChapterListReq struct {
|
||||
PlayletId int64 `form:"playletId" json:"playletId"` // 短剧ID
|
||||
PlayletSlug string `form:"playletSlug" json:"playletSlug"` // 短剧slug,非空时优先按slug解析短剧ID
|
||||
}
|
||||
|
||||
// PlayletChapterListResp 短剧剧集列表响应
|
||||
type PlayletChapterListResp struct {
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
List []PlayletChapterData `json:"list"` // 短剧剧集集合
|
||||
}
|
||||
|
||||
// PlayletChapterInfoResp 短剧剧集详情响应
|
||||
type PlayletChapterInfoResp struct {
|
||||
Id int64 `json:"id"` // 短剧剧集ID
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
CurrentEpisode int64 `json:"currentEpisode"` // 第几集
|
||||
Title string `json:"title"` // 章节名
|
||||
Md5 string `json:"md5"` // 媒体md5
|
||||
Hash string `json:"hash"` // 媒体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"` // 影片长度(秒)
|
||||
CountComment int64 `json:"countComment"` // 短剧剧集评论数
|
||||
CountBrowse int64 `json:"countBrowse"` // 短剧剧集观看数
|
||||
CountCollect int64 `json:"countCollect"` // 短剧剧集收藏数
|
||||
CountLike int64 `json:"countLike"` // 短剧剧集点赞数
|
||||
IsLike int64 `json:"isLike"` // 点赞状态 1-已点赞 2-未点赞
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态 1-已收藏 2-未收藏
|
||||
PayType int32 `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
|
||||
SingleCoins int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时候生效)
|
||||
CanWatch bool `json:"canWatch"` // 是否可观看
|
||||
NeedUnlock bool `json:"needUnlock"` // 是否需要金币解锁
|
||||
NeedVip bool `json:"needVip"` // 是否需要开通VIP
|
||||
CostCoins int64 `json:"costCoins"` // 本次解锁消耗金币
|
||||
Balance int64 `json:"balance"` // 当前金币余额
|
||||
VipValid bool `json:"vipValid"` // 当前用户VIP是否有效
|
||||
IsUnlocked bool `json:"isUnlocked"` // 当前用户是否已解锁本集
|
||||
// 页面SEO信息
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"`
|
||||
}
|
||||
|
||||
// PlayletChapterUnlockReq 短剧剧集金币解锁请求
|
||||
type PlayletChapterUnlockReq struct {
|
||||
PlayletId int64 `json:"playletId" binding:"required"` // 短剧ID
|
||||
ChapterId int64 `json:"chapterId" binding:"required"` // 短剧剧集ID
|
||||
}
|
||||
|
||||
// PlayletChapterUnlockResp 短剧剧集金币解锁响应
|
||||
type PlayletChapterUnlockResp struct {
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
ChapterId int64 `json:"chapterId"` // 短剧剧集ID
|
||||
Unlocked bool `json:"unlocked"` // 是否已解锁
|
||||
CanWatch bool `json:"canWatch"` // 是否可观看
|
||||
Balance int64 `json:"balance"` // 当前金币余额
|
||||
CostCoins int64 `json:"costCoins"` // 本次解锁消耗金币
|
||||
ChangeCoin int64 `json:"changeCoin"` // 本次实际扣减金币,幂等命中时为0
|
||||
}
|
||||
|
||||
// PlayletInfoResp 详情响应
|
||||
type PlayletInfoResp struct {
|
||||
CommonData
|
||||
// 是否点赞(1-已点赞,2-未点赞)
|
||||
IsLike int64 `json:"isLike"`
|
||||
// 是否收藏(1-已收藏,2-未收藏)
|
||||
IsCollect int64 `json:"isCollect"`
|
||||
// 短剧章节集合
|
||||
PlayletChapterInfo []PlayletChapterData `json:"playletChapterInfo"`
|
||||
// 页面SEO信息
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"`
|
||||
// 广告
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
}
|
||||
|
||||
// PlayletChapterData 短剧章节信息
|
||||
type PlayletChapterData struct {
|
||||
Id int64 `json:"id"` // 短剧剧集ID
|
||||
PlayletId int64 `json:"playletId"` // 短剧ID
|
||||
CurrentEpisode int64 `json:"currentEpisode"` // 第几集
|
||||
Title string `json:"title"` // 章节名
|
||||
Md5 string `json:"md5"` // 媒体md5
|
||||
Hash string `json:"hash"` // 媒体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 int32 `json:"payType"` // 支付方式 0-免费 1-金币 2-VIP
|
||||
SingleCoins int64 `json:"singleCoins"` // 单集金币(支付方式为1-金币时候生效)
|
||||
CanWatch bool `json:"canWatch"` // 是否可观看
|
||||
NeedUnlock bool `json:"needUnlock"` // 是否需要金币解锁
|
||||
NeedVip bool `json:"needVip"` // 是否需要开通VIP
|
||||
CostCoins int64 `json:"costCoins"` // 本次解锁消耗金币
|
||||
Balance int64 `json:"balance"` // 当前金币余额
|
||||
VipValid bool `json:"vipValid"` // 当前用户VIP是否有效
|
||||
IsUnlocked bool `json:"isUnlocked"` // 当前用户是否已解锁本集
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/pubdef"
|
||||
|
||||
// PlayletTopicPageListReq 专题剧单分页请求
|
||||
type PlayletTopicPageListReq struct {
|
||||
pubdef.Page
|
||||
SortType int64 `form:"sortType" json:"sortType"` // 排序 1-最新 2-最热
|
||||
}
|
||||
|
||||
// PlayletTopicPageListResp 专题剧单分页响应
|
||||
type PlayletTopicPageListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []*PlayletTopicPageItem `json:"list"` // 专题集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息
|
||||
}
|
||||
|
||||
// PlayletTopicPageItem 专题剧单分页项
|
||||
type PlayletTopicPageItem struct {
|
||||
Id int64 `json:"id"` // 专题ID
|
||||
Name string `json:"name"` // 专题名称
|
||||
Slug string `json:"slug"` // slug
|
||||
Desc string `json:"desc"` // 描述
|
||||
Icon string `json:"icon"` // 图标
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
PlayletCount int64 `json:"playletCount"` // 上架短剧数量
|
||||
Covers []string `json:"covers"` // 展示封面集合
|
||||
List []*CommonData `json:"list"` // 专题下短剧集合
|
||||
SeoInfo *SeoInfo `json:"seoInfo"` // 专题SEO
|
||||
}
|
||||
|
||||
// PlayletTopicDetailReq 专题详情请求
|
||||
type PlayletTopicDetailReq struct {
|
||||
pubdef.Page
|
||||
Id int64 `form:"id" json:"id" binding:"required"` // 专题ID
|
||||
SortType int64 `form:"sortType" json:"sortType"` // 排序 1-编辑排序 2-最新 3-最热
|
||||
}
|
||||
|
||||
// PlayletTopicDetailResp 专题详情响应
|
||||
type PlayletTopicDetailResp struct {
|
||||
Id int64 `json:"id"` // 专题ID
|
||||
Name string `json:"name"` // 专题名称
|
||||
Slug string `json:"slug"` // slug
|
||||
Desc string `json:"desc"` // 描述
|
||||
Icon string `json:"icon"` // 图标
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
PlayletCount int64 `json:"playletCount"` // 上架短剧数量
|
||||
Covers []string `json:"covers"` // 顶部封面集合
|
||||
TotalCount int64 `json:"totalCount"` // 短剧总数
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []CommonData `json:"list"` // 专题短剧列表
|
||||
MoreTopics []*PlayletTopicPageItem `json:"moreTopics"` // 更多专题
|
||||
SeoInfo *SeoInfo `json:"seoInfo"` // 专题SEO
|
||||
}
|
||||
|
||||
// PlayletThemeListResponse app端题材列表响应
|
||||
type PlayletThemeListResponse struct {
|
||||
List []*PlayletThemeItem `json:"list"` // 题材列表
|
||||
}
|
||||
|
||||
// PlayletThemeItem app端题材列表项
|
||||
type PlayletThemeItem struct {
|
||||
Id int64 `json:"id"` // 题材ID
|
||||
Name string `json:"name"` // 题材名称
|
||||
Slug string `json:"slug"` // slug
|
||||
Icon string `json:"icon"` // 题材图标,已拼接图片域名
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
Status bool `json:"status"` // 上架状态
|
||||
IsRecommend bool `json:"isRecommend"` // 是否推荐
|
||||
PlayletCount int64 `json:"playletCount"` // 该题材绑定的上架短剧数量
|
||||
SeoInfo *SeoInfo `json:"seoInfo"` // 题材对应页面 SEO 信息
|
||||
}
|
||||
|
||||
// PlayletTagListResponse app端短剧标签列表响应
|
||||
type PlayletTagListResponse struct {
|
||||
List []*PlayletTagItem `json:"list"` // 标签列表
|
||||
}
|
||||
|
||||
// PlayletTagItem app端短剧标签列表项
|
||||
type PlayletTagItem struct {
|
||||
Id int64 `json:"id"` // 标签ID
|
||||
Name string `json:"name"` // 标签名称
|
||||
Slug string `json:"slug"` // slug
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
Status bool `json:"status"` // 上架状态
|
||||
SeoInfo *SeoInfo `json:"seoInfo"` // 标签对应页面 SEO 信息
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/models/rechargepackagemod"
|
||||
|
||||
// PayMethodInfo 单个支付方式
|
||||
type PayMethodInfo struct {
|
||||
Type string `json:"type"` // alipay / wechat / union
|
||||
TypeName string `json:"typeName"` // 支付宝 / 微信 / 银联
|
||||
}
|
||||
|
||||
// RechargePackageItem App购买套餐列表项
|
||||
type RechargePackageItem struct {
|
||||
Id int64 `json:"id"` // 套餐ID
|
||||
PackageType rechargepackagemod.PackageType `json:"packageType"` // 套餐类型:1-会员畅享 2-金币充值
|
||||
Name string `json:"name"` // 展示标题
|
||||
SubTitle string `json:"subTitle"` // 展示副标题
|
||||
Price int64 `json:"price"` // 售价,单位分
|
||||
OriginalPrice int64 `json:"originalPrice"` // 原价,单位分
|
||||
DurationDays int64 `json:"durationDays"` // 会员有效天数
|
||||
DurationHours int64 `json:"durationHours"` // 会员有效小时数,由durationDays计算
|
||||
BaseCoin int64 `json:"baseCoin"` // 基础金币数
|
||||
GiftCoin int64 `json:"giftCoin"` // 赠送金币数
|
||||
TotalCoin int64 `json:"totalCoin"` // 到账总金币数,由baseCoin+giftCoin计算
|
||||
Sort int32 `json:"sort"` // 排序,越小越靠前
|
||||
PayMethods []PayMethodInfo `json:"payMethods"` // 该套餐支持的支付方式
|
||||
}
|
||||
|
||||
// RechargePackageListResp App购买套餐列表响应。
|
||||
type RechargePackageListResp struct {
|
||||
VipList []*RechargePackageItem `json:"vipList"` // 会员畅享列表
|
||||
CoinList []*RechargePackageItem `json:"coinList"` // 金币充值列表
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/pubdef"
|
||||
|
||||
type RichTextInfo struct {
|
||||
Id int64 `json:"id" bson:"_id,omitempty"`
|
||||
Title string `json:"title" bson:"title"` // 标题
|
||||
Content string `json:"content" bson:"content"` // 内容
|
||||
Desc string `json:"desc" bson:"desc"` // 标题(app)
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// AppRichTextItemResp APP富文本内容列表项
|
||||
type AppRichTextItemResp struct {
|
||||
// 富文本ID
|
||||
Id int64 `json:"id"`
|
||||
// 标题
|
||||
Title string `json:"title"`
|
||||
// 内容
|
||||
Content string `json:"content"`
|
||||
// 标题(app)
|
||||
Desc string `json:"desc"`
|
||||
}
|
||||
|
||||
// AppRichTextListResp APP富文本内容列表响应
|
||||
type AppRichTextListResp struct {
|
||||
// 富文本内容列表
|
||||
List []AppRichTextItemResp `json:"list"`
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package proto
|
||||
|
||||
import "time"
|
||||
|
||||
type SearchSortType string
|
||||
|
||||
const (
|
||||
SearchSortTypeDefault SearchSortType = "default" // 默认 相似度
|
||||
SearchSortTypeHot SearchSortType = "hot" // 热度排序
|
||||
SearchSortTypeNew SearchSortType = "new" // 最新排序
|
||||
)
|
||||
|
||||
// RankType 排行榜类型
|
||||
type RankType int64
|
||||
|
||||
const (
|
||||
RankType_Video = 1 // 视频
|
||||
RankType_Actress = 2 // 女优
|
||||
RankType_Filmreview = 3 // 影评
|
||||
)
|
||||
|
||||
// RankPeriod 排行榜周期
|
||||
type RankPeriod int64
|
||||
|
||||
const (
|
||||
RankPeriod_Week RankPeriod = 1
|
||||
RankPeriod_Month RankPeriod = 2
|
||||
RankPeriod_Year RankPeriod = 3
|
||||
)
|
||||
|
||||
type SearchRankHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
VideoWeek SearchRankData `json:"videoWeek"`
|
||||
ActressWeek SearchRankData `json:"actressWeek"`
|
||||
FilmreviewWeek SearchRankData `json:"filmreviewWeek"`
|
||||
VideoMonth SearchRankData `json:"videoMonth"`
|
||||
ActressMonth SearchRankData `json:"actressMonth"`
|
||||
FilmreviewMonth SearchRankData `json:"filmreviewMonth"`
|
||||
VideoYear SearchRankData `json:"videoYear"`
|
||||
ActressYear SearchRankData `json:"actressYear"`
|
||||
FilmreviewYear SearchRankData `json:"filmreviewYear"`
|
||||
}
|
||||
type SearchRankData struct {
|
||||
RankName string `json:"rankName" form:"rankName"` // 排行榜名字
|
||||
RankType RankType `json:"rankType" form:"rankType"` // 排行榜类型 1视频, 2女优 ,3影评
|
||||
RankPeriod RankPeriod `json:"rankPeriod" form:"rankPeriod"` // 排行榜周期 1=周 2=月 3=年
|
||||
List []HotSearchItem `json:"list" form:"list"`
|
||||
}
|
||||
|
||||
type HotSearchItem struct {
|
||||
Id int64 `json:"id" form:"id"` // ID
|
||||
Title string `json:"title" form:"title"` //标题
|
||||
HotValue int64 `json:"hotValue" form:"hotValue"` // 热度值
|
||||
Images string `json:"images" form:"images"` // 封面
|
||||
Works int64 `json:"works" bson:"works,omitempty"` // 作品数量
|
||||
Desc string `json:"desc" bson:"desc"` // 描述
|
||||
AddedTime time.Time `json:"addedTime" bson:"addedTime"` // 上架shi时间
|
||||
}
|
||||
|
||||
type SearchResp struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
InTitle string `json:"inTitle"` //输入标题
|
||||
InType int64 `json:"inType"` // 输入类型 0=视频 1=女优 2=影评 3=帖子
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Sort []SearchSortItem `json:"sorts"` // 排序选项
|
||||
SearchRecommend []string `json:"searchRecommend"` // 搜索推荐
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
}
|
||||
|
||||
type SearchSortItem struct {
|
||||
Key string `json:"key"` // 值
|
||||
Title string `json:"title"` // 标题
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package proto
|
||||
|
||||
// SeoInfo 页面SEO信息,用于前端渲染 title、meta 和 canonical。
|
||||
type SeoInfo struct {
|
||||
// 页面标题
|
||||
Title string `json:"title"`
|
||||
// 页面关键词
|
||||
Keywords []string `json:"keywords"`
|
||||
// 页面描述
|
||||
Description string `json:"description"`
|
||||
// 网站名称
|
||||
WebSiteName string `json:"webSiteName"`
|
||||
// 当前内容的标准URL
|
||||
CanonicalURL string `json:"canonicalUrl"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"time"
|
||||
)
|
||||
|
||||
type URL struct {
|
||||
Loc string `xml:"loc"`
|
||||
LastMod time.Time `xml:"lastmod"`
|
||||
ChangeFreq string `xml:"changefreq"` // always/hourly/daily/weekly/monthly/yearly/never
|
||||
Priority float32 `xml:"priority"` // 0.0 - 1.0
|
||||
}
|
||||
type Sitemap struct {
|
||||
XMLName xml.Name `xml:"urlset"`
|
||||
Xmlns string `xml:"xmlns,attr"`
|
||||
URLs []URL `xml:"url"`
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package proto
|
||||
|
||||
import "hkdj-web-server/pub/pubdef"
|
||||
|
||||
type AppTranslationInfo struct {
|
||||
CategoryList []TranslationCategory `json:"categoryList" form:"categoryList"`
|
||||
}
|
||||
|
||||
type TranslationCategory struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name" bson:"name"` // 名称
|
||||
Icon string `json:"icon" bson:"icon"` // Icon
|
||||
TranslationList []TranslationInfo `json:"translationList" form:"translationList"`
|
||||
UrlValue string `json:"urlValue" bson:"urlValue"` // URl路径
|
||||
CategoryType pubdef.TranslationType `json:"categoryType"` // 导航类型
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
type TranslationInfo struct {
|
||||
ID int64 `json:"id"` // ID
|
||||
Name string `json:"name" bson:"name"` // 名称
|
||||
IsFriendAds bool `json:"isFriendAds"` // 是否是友链广告位
|
||||
UrlValue string `json:"urlValue" bson:"urlValue"` // URl路径
|
||||
TransCategoryId int64 `json:"-"` // 导航分类
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package proto
|
||||
|
||||
// UserCenterDataResp app个人中心数据响应
|
||||
type UserCenterDataResp struct {
|
||||
WatchCount int64 `json:"watchCount"` // 观看数量
|
||||
CollectCount int64 `json:"collectCount"` // 收藏数量
|
||||
ChasingCount int64 `json:"chasingCount"` // 追剧中数量
|
||||
BoughtChapterCount int64 `json:"boughtChapterCount"` // 已购剧集数量
|
||||
}
|
||||
@@ -0,0 +1,428 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/common/netutil"
|
||||
"hkdj-web-server/pub/common/utils"
|
||||
"hkdj-web-server/pub/models/videoinformationmod"
|
||||
"hkdj-web-server/pub/pubdef"
|
||||
"time"
|
||||
)
|
||||
|
||||
type TagsInfoData struct {
|
||||
Id int64 `json:"id" `
|
||||
Name string `json:"name"` // 帖子标题
|
||||
Slug string `json:"slug"` // slug
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
Works int64 `json:"works" bson:"works,omitempty"` // 作品数量
|
||||
Images string `json:"images" bson:"images,omitempty"` // 背景
|
||||
}
|
||||
type CollectionInfoData struct {
|
||||
Id int64 `json:"id" `
|
||||
Name string `json:"name"` // 帖子标题
|
||||
}
|
||||
type VideoType int64
|
||||
|
||||
const (
|
||||
VideoTypeVideo VideoType = 0 // 视频(帖子)
|
||||
VideoTypeCollection VideoType = 1 // 合集
|
||||
VideoTypeAdvitise VideoType = 2 // 广告
|
||||
VideoTypeVideoV2 VideoType = 3 // 视频
|
||||
)
|
||||
|
||||
type VideoInfoData struct {
|
||||
Id int64 `json:"id"`
|
||||
Type VideoType `json:"type"` // 类型
|
||||
Title string `json:"title"` // 帖子标题
|
||||
Slug string `json:"slug"` // slug
|
||||
Keyworld []string `json:"keyworld"` // 关键字
|
||||
AddedTime time.Time `json:"addedTime"` // 帖子上架时间
|
||||
CreatorId int64 `json:"creatorId"` // 作者Id
|
||||
CreatorName string `json:"creatorName"` // 作者名称
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
Nodes []videoinformationmod.Node `json:"nodes"` // 节点
|
||||
Video videoinformationmod.VideoInfo `json:"video"` // 视频
|
||||
Tags []TagsInfoData `json:"tags"` // 标签
|
||||
IsHot bool `json:"isHot"` // 是否热门
|
||||
AdvitiseId string `json:"advitiseId"` // 广告Id
|
||||
Link string `json:"link"` // 跳转链接
|
||||
Location int64 `json:"location" bson:"location"` // 位置id
|
||||
CategoryIds []int64 `json:"categoryIds"` // 分类信息
|
||||
Categorys []VideoCategoryInfo `json:"categorys"` // 分类信息
|
||||
TopicIds []int64 `json:"topicIds"` // 专题信息
|
||||
Topics []VideoTopicInfo `json:"topics"` // 专题信息
|
||||
WatchTimes int64 `json:"watchTimes" bson:"watchTimes"` // 观看次数
|
||||
ShowTimes int64 `json:"showTimes" bson:"showTimes"` // 展示次数
|
||||
UpdatedAt time.Time `json:"updatedAt"` //更新时间
|
||||
Desc string `bson:"desc,omitempty" json:"desc"` // 详细描述
|
||||
Content string `json:"content"` // 富文本
|
||||
ImgCdn string `json:"imgCdn" bson:"imgCdn"` // 图片CDN
|
||||
PreviewVtt string `json:"previewVtt,omitempty"` // 雪碧图 vtt
|
||||
}
|
||||
|
||||
type VideoHistoryInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
Title string `json:"title"` // 帖子标题
|
||||
AddedTime time.Time `json:"addedTime"` // 上架时间
|
||||
}
|
||||
|
||||
type VideoCategoryInfo struct {
|
||||
Id int64 `json:"id" `
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"` // slug
|
||||
ContentType int64 `json:"contentType" bson:"contentType"` // 内容:0: 默认 1:首页 2:今日
|
||||
SortType int64 `json:"sortType" bson:"sortType"` // 排序方式 0:上线时间 1:观看次数 2排序
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
Title string `json:"title" bson:"title"` // APP显示
|
||||
Desc string `json:"desc" bson:"desc"` // 描述
|
||||
}
|
||||
|
||||
// 面包屑
|
||||
type BreadcrumbItem struct {
|
||||
Name string `json:"name"` // 名称
|
||||
Url string `json:"url"` // 跳转链接
|
||||
}
|
||||
|
||||
// 详情页导航
|
||||
type DetailNavItem struct {
|
||||
Name string `json:"name"` // 导航名称
|
||||
Url string `json:"url"` // 导航链接
|
||||
}
|
||||
|
||||
type VideoPlayReq struct {
|
||||
VideoId int64 `json:"videoId" form:"videoId"` // 视频ID
|
||||
}
|
||||
|
||||
type VideoPlayResp struct {
|
||||
AuthKey string `json:"authKey"`
|
||||
}
|
||||
|
||||
type VideoCreaterInfo struct {
|
||||
Id int64 `json:"id" `
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"` // slug
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
func VideoInfoToData(videoInfo *videoinformationmod.VideoInformation, imgCdn string) VideoInfoData {
|
||||
t := VideoTypeVideo
|
||||
switch videoInfo.MediaType {
|
||||
case videoinformationmod.MediaType_Video:
|
||||
t = VideoTypeVideo
|
||||
case videoinformationmod.MediaType_Collection:
|
||||
t = VideoTypeCollection
|
||||
case videoinformationmod.MediaType_Advitise:
|
||||
t = VideoTypeAdvitise
|
||||
case videoinformationmod.MediaType_VideoV2:
|
||||
t = VideoTypeVideoV2
|
||||
}
|
||||
videotemp := VideoInfoData{
|
||||
Id: videoInfo.Id,
|
||||
Type: t,
|
||||
Title: videoInfo.Title,
|
||||
Slug: videoInfo.Slug,
|
||||
Keyworld: videoInfo.Keyworld,
|
||||
AddedTime: videoInfo.AddedTime,
|
||||
Desc: videoInfo.Desc,
|
||||
UpdatedAt: videoInfo.PageUpdatedAt,
|
||||
CreatorId: videoInfo.CreatorId,
|
||||
TopicIds: videoInfo.TopicIds,
|
||||
Topics: make([]VideoTopicInfo, 0),
|
||||
CreatorName: videoInfo.CreatorName,
|
||||
CoverImg: netutil.MergeURL(imgCdn, videoInfo.CoverImg),
|
||||
Nodes: make([]videoinformationmod.Node, 0),
|
||||
Video: videoInfo.Video,
|
||||
IsHot: videoInfo.IsHot,
|
||||
CategoryIds: videoInfo.CategoryIds,
|
||||
Categorys: make([]VideoCategoryInfo, 0),
|
||||
Tags: make([]TagsInfoData, 0),
|
||||
ShowTimes: videoInfo.Real.ShowTimes,
|
||||
WatchTimes: videoInfo.Real.WatchTimes,
|
||||
Content: videoInfo.Content,
|
||||
ImgCdn: imgCdn,
|
||||
PreviewVtt: videoInfo.PreviewVtt,
|
||||
}
|
||||
ti := time.Date(2020, 1, 1, 0, 0, 0, 0, utils.LocBJ)
|
||||
if videotemp.UpdatedAt.Before(ti) {
|
||||
videotemp.UpdatedAt = videoInfo.UpdatedAt
|
||||
}
|
||||
for _, nodeInfo := range videoInfo.Nodes {
|
||||
nodeTmp := videoinformationmod.Node{
|
||||
Images: make([]string, 0),
|
||||
Url: nodeInfo.Url,
|
||||
Text: nodeInfo.Text,
|
||||
Videos: nodeInfo.Videos,
|
||||
Title: nodeInfo.Title,
|
||||
}
|
||||
for _, image := range nodeInfo.Images {
|
||||
nodeTmp.Images = append(nodeTmp.Images, netutil.MergeURL(imgCdn, image))
|
||||
}
|
||||
videotemp.Nodes = append(videotemp.Nodes, nodeTmp)
|
||||
}
|
||||
return videotemp
|
||||
}
|
||||
|
||||
// StripH265Url 清空主视频与 nodes 内视频的 H265 地址。
|
||||
func StripH265Url(data *VideoInfoData) {
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
data.Video.H265Url = ""
|
||||
for i := range data.Nodes {
|
||||
for j := range data.Nodes[i].Videos {
|
||||
data.Nodes[i].Videos[j].H265Url = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// VideoReq 普通分页查询视频请求
|
||||
type VideoReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// VideoAllListReq 视频分页列表请求
|
||||
type VideoAllListReq struct {
|
||||
pubdef.Page
|
||||
MediaType int64 `form:"mediaType" json:"mediaType"` // 类型 0-全部 1-影集 2-动画
|
||||
TopicId int64 `form:"topicId" json:"topicId"` // 题材ID,对应video_topic
|
||||
TopicSlug string `form:"topicSlug" json:"topicSlug"` // 题材slug,非空时优先按slug解析题材ID
|
||||
SortType int64 `form:"sortType" json:"sortType"` // 排序 1-最新 2-最热 3-收藏最多
|
||||
}
|
||||
|
||||
// VideoItemResp 查询视频列表项
|
||||
type VideoItemResp struct {
|
||||
// id
|
||||
Id int64 `json:"id"`
|
||||
// slug
|
||||
Slug string `json:"slug"`
|
||||
// 标题
|
||||
Title string `json:"title"`
|
||||
// 上架时间
|
||||
AddedTime time.Time `json:"addedTime"`
|
||||
// 作者Id
|
||||
CreatorId int64 `json:"creatorId"`
|
||||
// 作者名称
|
||||
CreatorName string `json:"creatorName"`
|
||||
// 封面
|
||||
CoverImg string `json:"coverImg"`
|
||||
// 关键字
|
||||
Keyworld []string `json:"keyworld"`
|
||||
// 标签
|
||||
Tags []int64 `json:"tags"`
|
||||
// 观看数(真假之和)
|
||||
WatchTimes int64 `json:"watchTimes"`
|
||||
// 影片长度
|
||||
VideoTime int32 `json:"videoTime"`
|
||||
}
|
||||
|
||||
// VideoLikeSetReq 视频点赞设置请求
|
||||
type VideoLikeSetReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 视频ID
|
||||
IsLike *bool `json:"isLike" binding:"required"` // 是否点赞,true-点赞,false-取消点赞
|
||||
}
|
||||
|
||||
// VideoLikeSetResp 视频点赞设置响应
|
||||
type VideoLikeSetResp struct {
|
||||
Id int64 `json:"id"` // 视频ID
|
||||
IsLike int64 `json:"isLike"` // 点赞状态 1-已点赞 2-未点赞
|
||||
CountLike int64 `json:"countLike"` // 视频点赞数
|
||||
}
|
||||
|
||||
// VideoCollectSetReq 视频收藏设置请求
|
||||
type VideoCollectSetReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 视频ID
|
||||
IsCollect *bool `json:"isCollect" binding:"required"` // 是否收藏,true-收藏,false-取消收藏
|
||||
}
|
||||
|
||||
// VideoCollectSetResp 视频收藏设置响应
|
||||
type VideoCollectSetResp struct {
|
||||
Id int64 `json:"id"` // 视频ID
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态 1-已收藏 2-未收藏
|
||||
CountCollect int64 `json:"countCollect"` // 视频收藏数
|
||||
}
|
||||
|
||||
// VideoHistoryListReq 视频观看历史列表请求
|
||||
type VideoHistoryListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// VideoHistoryData 视频观看历史列表项
|
||||
type VideoHistoryData struct {
|
||||
Id int64 `json:"id"` // 视频ID
|
||||
Slug string `json:"slug"` // slug
|
||||
Title string `json:"title"` // 标题
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
Keyworld []string `json:"keyworld"` // 关键字
|
||||
Tags []int64 `json:"tags"` // 标签
|
||||
WatchTimes int64 `json:"watchTimes"` // 观看数
|
||||
VideoTime int32 `json:"videoTime"` // 影片长度
|
||||
CountLike int64 `json:"countLike"` // 点赞数
|
||||
CountCollect int64 `json:"countCollect"` // 收藏数
|
||||
CountComment int64 `json:"countComment"` // 评论数
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态 1-已收藏 2-未收藏
|
||||
HistoryAt time.Time `json:"historyAt"` // 最近观看时间
|
||||
}
|
||||
|
||||
// VideoHistoryListResp 视频观看历史列表响应
|
||||
type VideoHistoryListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总历史数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []VideoHistoryData `json:"list"` // 观看历史集合
|
||||
}
|
||||
|
||||
// VideoHistoryDeleteReq 删除单条视频观看历史请求
|
||||
type VideoHistoryDeleteReq struct {
|
||||
VideoId int64 `json:"videoId" binding:"required"` // 视频ID
|
||||
}
|
||||
|
||||
// VideoHistoryDeleteResp 删除单条视频观看历史响应
|
||||
type VideoHistoryDeleteResp struct {
|
||||
DeletedCount int64 `json:"deletedCount"` // 删除记录数量
|
||||
}
|
||||
|
||||
// VideoHistoryClearResp 清空视频观看历史响应
|
||||
type VideoHistoryClearResp struct {
|
||||
DeletedCount int64 `json:"deletedCount"` // 删除记录数量
|
||||
}
|
||||
|
||||
// VideoCollectListReq 视频收藏列表请求
|
||||
type VideoCollectListReq struct {
|
||||
// 普通分页参数,pageNum默认1,pageSize默认10、最大100
|
||||
pubdef.Page
|
||||
}
|
||||
|
||||
// VideoCollectData 视频收藏列表项
|
||||
type VideoCollectData struct {
|
||||
Id int64 `json:"id"` // 视频ID
|
||||
Slug string `json:"slug"` // slug
|
||||
Title string `json:"title"` // 标题
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
Keyworld []string `json:"keyworld"` // 关键字
|
||||
Tags []int64 `json:"tags"` // 标签
|
||||
WatchTimes int64 `json:"watchTimes"` // 观看数
|
||||
VideoTime int32 `json:"videoTime"` // 影片长度
|
||||
CountLike int64 `json:"countLike"` // 点赞数
|
||||
CountCollect int64 `json:"countCollect"` // 收藏数
|
||||
CountComment int64 `json:"countComment"` // 评论数
|
||||
IsCollect int64 `json:"isCollect"` // 收藏状态,收藏列表固定返回1-已收藏
|
||||
CollectedAt time.Time `json:"collectedAt"` // 收藏时间
|
||||
}
|
||||
|
||||
// VideoCollectListResp 视频收藏列表响应
|
||||
type VideoCollectListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总收藏数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []VideoCollectData `json:"list"` // 收藏视频集合
|
||||
}
|
||||
|
||||
// VideoAllListItemResp 视频分页列表项
|
||||
type VideoAllListItemResp struct {
|
||||
Id int64 `json:"id"` // id
|
||||
Slug string `json:"slug"` // slug
|
||||
Title string `json:"title"` // 标题
|
||||
MediaType int64 `json:"mediaType"` // 类型 1-影集 2-动画
|
||||
AddedTime time.Time `json:"addedTime"` // 上架时间
|
||||
CreatorId int64 `json:"creatorId"` // 作者Id
|
||||
CreatorName string `json:"creatorName"` // 作者名称
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
Keyworld []string `json:"keyworld"` // 关键字
|
||||
Tags []int64 `json:"tags"` // 标签
|
||||
TopicIds []int64 `json:"topicIds"` // 题材ID集合
|
||||
TopicNames []string `json:"topicNames"` // 题材名称集合
|
||||
Topics []VideoTopicInfo `json:"topics"` // 题材集合
|
||||
WatchTimes int64 `json:"watchTimes"` // 观看数
|
||||
VideoTime int32 `json:"videoTime"` // 影片长度
|
||||
VideoCount int64 `json:"videoCount"` // 视频数量
|
||||
}
|
||||
|
||||
// VideoResp 普通分页查询视频响应
|
||||
type VideoResp struct {
|
||||
// 总共数量
|
||||
TotalCount int64 `json:"totalCount"`
|
||||
// 每页数
|
||||
PageSize int `json:"pageSize"`
|
||||
// 页数
|
||||
PageNum int `json:"pageNum"`
|
||||
// 视频列表
|
||||
List []*VideoItemResp `json:"list"`
|
||||
}
|
||||
|
||||
// VideoAllListResp 视频分页列表响应
|
||||
type VideoAllListResp struct {
|
||||
TotalCount int64 `json:"totalCount"` // 总共数量
|
||||
PageSize int `json:"pageSize"` // 每页数
|
||||
PageNum int `json:"pageNum"` // 页数
|
||||
List []*VideoAllListItemResp `json:"list"` // 视频集合
|
||||
Advitise AdvitiseData `json:"advitise"` // 广告
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"` // 页面SEO信息
|
||||
}
|
||||
|
||||
// VideoInfoReq 查询视频详情请求
|
||||
type VideoInfoReq struct {
|
||||
Id int64 `json:"id" form:"id"` // 视频id
|
||||
Slug string `json:"slug" form:"slug"` // 视频slug,非空时优先按slug解析视频ID
|
||||
}
|
||||
|
||||
// VideoInfoResp 查询视频详情响应
|
||||
type VideoInfoResp struct {
|
||||
// id
|
||||
Id int64 `json:"id"`
|
||||
// slug
|
||||
Slug string `json:"slug"`
|
||||
// 标题
|
||||
Title string `json:"title"`
|
||||
// 封面
|
||||
CoverImg string `json:"coverImg"`
|
||||
// 关键字
|
||||
Keyworld []string `json:"keyworld"`
|
||||
// 标签
|
||||
Tags []int64 `json:"tags"`
|
||||
// 标签名称
|
||||
TagsName []string `json:"tagsName"`
|
||||
// 题材ID集合
|
||||
TopicIds []int64 `json:"topicIds"`
|
||||
// 题材集合
|
||||
Topics []VideoTopicInfo `json:"topics"`
|
||||
// 观看数(真假之和)
|
||||
WatchTimes int64 `json:"watchTimes"`
|
||||
// 点赞数
|
||||
CountLike int64 `json:"countLike"`
|
||||
// 收藏数
|
||||
CountCollect int64 `json:"countCollect"`
|
||||
// 评论数
|
||||
CountComment int64 `json:"countComment"`
|
||||
// 当前用户点赞状态 1-已点赞 2-未点赞
|
||||
IsLike int64 `json:"isLike"`
|
||||
// 当前用户收藏状态 1-已收藏 2-未收藏
|
||||
IsCollect int64 `json:"isCollect"`
|
||||
// 视频
|
||||
Video VideoData `json:"video"`
|
||||
// 广告
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
// 页面SEO信息
|
||||
SeoInfo *SeoInfo `json:"seoInfo,omitempty"`
|
||||
}
|
||||
|
||||
type VideoData struct {
|
||||
// 视频ID(视频才会存在)
|
||||
TaskId string `json:"taskId"`
|
||||
// 媒资库ID
|
||||
FileId string `json:"fileId"`
|
||||
// 视频URl
|
||||
Url string `json:"url"`
|
||||
// 视频封面
|
||||
Cover string `json:"cover"`
|
||||
// 分辨率高(视频才会存在)
|
||||
Height int64 `json:"height"`
|
||||
// 分辨率宽(视频才会存在)
|
||||
Width int64 `json:"width"`
|
||||
// 影片长度
|
||||
VideoTime int32 `json:"videoTime"`
|
||||
// 预览MP4文件
|
||||
PreMp4FileNameFs string `json:"preMp4FileNameFs"`
|
||||
// 不加密的预览MP4
|
||||
UnencryptedPreMp4 string `json:"unencryptedPreMp4"`
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/pubdef"
|
||||
)
|
||||
|
||||
// VideoTopicListReq 视频题材列表请求
|
||||
type VideoTopicListReq struct {
|
||||
MediaType int64 `form:"mediaType" json:"mediaType"` // 类型 0-全部 1-影集 2-动画
|
||||
}
|
||||
|
||||
// VideoTopicListResp 视频题材列表响应
|
||||
type VideoTopicListResp struct {
|
||||
List []VideoTopicInfo `json:"list"` // 题材集合
|
||||
}
|
||||
|
||||
type VideoTopicInfo struct {
|
||||
Id int64 `json:"id" bson:"_id,omitempty"` // Id
|
||||
Name string `json:"name" bson:"name"` // 专题名称
|
||||
Slug string `json:"slug" bson:"slug"` // slug
|
||||
Title string `json:"title" bson:"title"` // APP显示
|
||||
Desc string `json:"desc" bson:"desc"` // 描述
|
||||
Image string `json:"image" bson:"image"` // 背景
|
||||
VideoCategoryId int64 `json:"videoCategoryId" bson:"videoCategoryId"` // 视频分类id
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
Works int64 `json:"works" bson:"works"` // 作品数
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/pubdef"
|
||||
)
|
||||
|
||||
// HomeHtmlData 首页
|
||||
type HomeHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"` // 请求路径
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
}
|
||||
|
||||
type VideoCategoryData struct {
|
||||
Id int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"`
|
||||
TopicList []VideoTopicData `json:"topicList" form:"topicList"` // 专题列表
|
||||
}
|
||||
|
||||
type VideoTopicData struct {
|
||||
Id int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Image string `json:"image" form:"image"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
Words int64 `json:"words" form:"words"`
|
||||
ShowType int64 `json:"showType" bson:"showType"` // 展示类型 0=默认 1=横版左右滑动 2=竖版左右滑动
|
||||
TopicType int64 `json:"topicType" bson:"topicType"` // 专题类型 0视频专题 1绑定专题 2绑定标签 3=绑定女优 4=随便看
|
||||
LinkUrl string `json:"linkUrl" bson:"linkUrl"` // 跳转URL
|
||||
}
|
||||
|
||||
type VideoCategoryHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
VideoCategory VideoCategoryData `json:"videoCategory" form:"videoCategory"` // 当前分类数据
|
||||
}
|
||||
|
||||
type VideoTopicHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
VideoInfos []VideoInfoData `json:"videoInfos" form:"videoInfos"` // 视频列表
|
||||
}
|
||||
|
||||
type CategoryVideoListHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Translation TranslationInfo `json:"translation" form:"translation"` // 当前导航数据
|
||||
CategoryList []VideoCategoryData `json:"categoryList" form:"categoryList"`
|
||||
}
|
||||
|
||||
type VideoCategoryListHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Translation TranslationInfo `json:"translation" form:"translation"` // 当前导航数据
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
}
|
||||
|
||||
type VideoDetailsHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
Video VideoInfoData `json:"video" form:"video"` // 视频详情
|
||||
Breadcrumbs []BreadcrumbItem `json:"breadcrumbs" form:"breadcrumbs"` // 面包屑
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
CommentList GetCommentListResp `json:"commentList" form:"commentList"` // 评论
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜标签
|
||||
}
|
||||
|
||||
type PostDetailsHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
CommentList GetCommentListResp `json:"commentList" form:"commentList"` // 评论
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜标签
|
||||
CreateInfo PostCreateInfo `json:"createInfo" form:"createInfo"` // 作者信息
|
||||
}
|
||||
|
||||
type PostCreateInfo struct {
|
||||
Id int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Image string `json:"image" form:"image"` //头像
|
||||
Works int64 `json:"works" form:"works"`
|
||||
CreateType int64 `json:"createType"` // 创作者类型 0=普通 1=官方
|
||||
Desc string `json:"desc" form:"desc"` // 作者描述
|
||||
Background string `json:"background"` // 背景
|
||||
}
|
||||
|
||||
// TagHtmlData 首页
|
||||
type TagHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
}
|
||||
type VideoTagHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
}
|
||||
type VideoTagCategoryHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
AllCategory []VideoTagCategoryData `json:"allCategory" form:"allCategory"` //所有分类
|
||||
|
||||
}
|
||||
type VideoTagCategoryData struct {
|
||||
Id int64 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" form:"seoInfo"`
|
||||
Image string `json:"image" form:"image"`
|
||||
TotalTags int64 `json:"totalTags" form:"totalTags"` // 总标签数量
|
||||
}
|
||||
type VideoTagCategoryInfoData struct {
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
}
|
||||
type VideoHistoryHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
PageNum int64 `json:"pageNum" form:"pageNum"`
|
||||
PageSize int64 `json:"pageSize" form:"pageSize"`
|
||||
TotalSize int64 `json:"totalSize" form:"totalSize"`
|
||||
}
|
||||
|
||||
type RichTextHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
RichTextInfo RichTextInfo `json:"richTextInfo" form:"richTextInfo"` // 富文本
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
}
|
||||
type NotFoundHtmlData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
RichTextInfo RichTextInfo `json:"richTextInfo" form:"richTextInfo"` // 富文本
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
}
|
||||
|
||||
type UrlRedirectData struct {
|
||||
Path string `json:"path"`
|
||||
CompletePath string `json:"completePath" form:"completePath"`
|
||||
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
||||
Config ConfigInfo `json:"config" form:"config"` // 配置文件
|
||||
Advitise AdvitiseData `json:"advitise" form:"advitise"` // 广告
|
||||
HotSearch []*HotSearchItem `json:"hotSearch" form:"hotSearch"` // 热搜
|
||||
UrlRedirect string `json:"urlRedirect" form:"urlRedirect"`
|
||||
}
|
||||
|
||||
type ContactUsReq struct {
|
||||
Name string `json:"name" form:"name"` // 姓名
|
||||
Email string `json:"email" form:"email"` // 邮件
|
||||
Content string `json:"content" form:"content"` // 内容
|
||||
CategoryName string `json:"categoryName" form:"categoryName"` // 主旨分类
|
||||
}
|
||||
Reference in New Issue
Block a user