172 lines
4.9 KiB
Go
172 lines
4.9 KiB
Go
package proto
|
|
|
|
import (
|
|
"time"
|
|
"videoweb/pub/pubdef"
|
|
)
|
|
|
|
// DataResp 首页数据响应
|
|
type DataResp struct {
|
|
// 当前路径
|
|
Path string `json:"path"`
|
|
// 配置信息
|
|
Config ConfigInfo `json:"config"`
|
|
// 广告
|
|
Advitise AdvitiseData `json:"advitise"`
|
|
// 公告
|
|
Announcement AnnouncementInfo `json:"announcement"`
|
|
// 首页banner信息列表
|
|
HomeBannerList []HomeBannerInfo `json:"homeBannerList"`
|
|
// 首页短剧数据
|
|
PlayletData HomePlayletDataResp `json:"playletData"`
|
|
// 首页视频数据
|
|
VideoData HomeVideoDataResp `json:"videoData"`
|
|
// 女优信息
|
|
ActressInfoList []ActressInfo `json:"actressInfoList"`
|
|
}
|
|
|
|
// HomeBannerInfo 首页banner信息
|
|
type HomeBannerInfo struct {
|
|
Id int64 `json:"id"` // ID
|
|
Name string `json:"name"` // 名称
|
|
Image string `json:"image"` // 图片,已拼接图片域名
|
|
VerticalImage string `json:"verticalImage"` // 竖版图片,已拼接图片域名
|
|
Url string `json:"url"` // URL
|
|
Rank int64 `json:"rank"` // 排序
|
|
Status bool `json:"status"` // 状态 true-启用 false-停用
|
|
}
|
|
|
|
// HomePlayletDataResp 首页短剧数据响应
|
|
type HomePlayletDataResp struct {
|
|
RecommendList []PlayletData `json:"recommendList"` // 推荐短剧列表
|
|
NewestList []PlayletData `json:"newestList"` // 最新短剧列表
|
|
HotList []PlayletData `json:"hotList"` // 最热短剧列表
|
|
}
|
|
|
|
// HomeVideoDataResp 首页视频数据响应
|
|
type HomeVideoDataResp struct {
|
|
RecommendList []VideoInfo `json:"recommendList"` // 推荐视频列表
|
|
NewestList []VideoInfo `json:"newestList"` // 最新视频列表
|
|
HotList []VideoInfo `json:"hotList"` // 最热视频列表
|
|
}
|
|
|
|
// HomeBaseResp 首页公共数据响应
|
|
type HomeBaseResp struct {
|
|
// 导航
|
|
Translations AppTranslationInfo `json:"translations"`
|
|
// 配置信息
|
|
Config ConfigInfo `json:"config"`
|
|
// 底部翻译
|
|
BottonTranslations AppTranslationInfo `json:"bottonTranslations"`
|
|
// 广告
|
|
Advitise AdvitiseData `json:"advitise"`
|
|
// 公告
|
|
Announcement AnnouncementInfo `json:"announcement"`
|
|
}
|
|
|
|
// HomeTagsResp 首页标签数据响应
|
|
type HomeTagsResp struct {
|
|
HomeBaseResp
|
|
// 视频标签
|
|
VideoTagsList []TagsInfoData `json:"videoTagsList"`
|
|
// 短剧标签
|
|
PlayletTagsList []TagsInfoData `json:"playletTagsList"`
|
|
}
|
|
|
|
// VideoCategoryDataInfo 视频分类数据
|
|
type VideoCategoryDataInfo struct {
|
|
CommonData
|
|
// Seo相关信息
|
|
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
|
// 描述
|
|
Desc string `json:"desc"`
|
|
// 分类关联的视频标签
|
|
Tags []int64 `json:"tags"`
|
|
// 视频信息集合
|
|
VideoInfoList []VideoInfo `json:"videoInfoList"`
|
|
}
|
|
|
|
// CommonData 分类通用数据
|
|
type CommonData struct {
|
|
// Id
|
|
Id int64 `json:"id"`
|
|
// 分类名称
|
|
Name string `json:"name"`
|
|
// slug
|
|
Slug string `json:"slug"`
|
|
// APP显示
|
|
Title string `json:"title"`
|
|
// 显示位置 0=仅TAB 1=仅首页 2=两者都显示
|
|
DisplayPosition pubdef.CategoryDisplayPosition `json:"displayPosition"`
|
|
// 排序方式 0:上线时间降序 1:观看次数降序 2:点赞(收藏)次数降序 3:上线时间升序 4:观看次数升序 5:点赞(收藏)次数升序
|
|
SortType pubdef.CategorySortType `json:"sortType"`
|
|
// 展示方式
|
|
DisplayMode pubdef.DisplayMode `json:"displayMode"`
|
|
// URL地址
|
|
UrlValue string `json:"urlValue"`
|
|
}
|
|
|
|
// VideoInfo 视频信息
|
|
type VideoInfo struct {
|
|
ContentData
|
|
}
|
|
|
|
// ContentData 内容数据信息
|
|
type ContentData struct {
|
|
// id
|
|
Id int64 `json:"id"`
|
|
// 标题
|
|
Title string `json:"title"`
|
|
// slug
|
|
Slug string `json:"slug"`
|
|
// 上架时间
|
|
AddedTime time.Time `json:"addedTime"`
|
|
// 封面
|
|
CoverImg string `json:"coverImg"`
|
|
// 标签id
|
|
Tags []int64 `json:"tags"`
|
|
// 标签名称
|
|
TagsName []string `json:"tagsName"`
|
|
// 标签slug 与tagsName顺序一致
|
|
TagSlugs []string `json:"tagSlugs"`
|
|
// 观看展示数
|
|
WatchNum int64 `json:"watchNum"`
|
|
// 点赞展示数
|
|
LikeNum int64 `json:"likeNum"`
|
|
// 收藏展示数
|
|
CountCollect int64 `json:"countCollect,omitempty"`
|
|
// Seo相关信息
|
|
SeoInfo pubdef.SeoValue `json:"seoInfo"`
|
|
}
|
|
|
|
// RankResp 排行榜通用响应
|
|
type RankResp struct {
|
|
Translations AppTranslationInfo `json:"translations" form:"translations"` // 导航
|
|
BottonTranslations AppTranslationInfo `json:"bottonTranslations" form:"bottonTranslations"` // 底部导航
|
|
RankData HomeRankData `json:"rankData"`
|
|
}
|
|
|
|
// HomeRankData 首页排行榜数据(总榜/周榜/月榜/年榜)
|
|
type HomeRankData struct {
|
|
Total []ContentData `json:"total"` // 总榜
|
|
Week []ContentData `json:"week"` // 周榜
|
|
Month []ContentData `json:"month"` // 月榜
|
|
Year []ContentData `json:"year"` // 年榜
|
|
}
|
|
|
|
// ActressInfo 女优信息
|
|
type ActressInfo struct {
|
|
// Id
|
|
Id int64 `json:"id"`
|
|
// 别名
|
|
Alias string `json:"alias"`
|
|
// slug
|
|
Slug string `json:"slug"`
|
|
// 头像
|
|
Avatar string `json:"avatar"`
|
|
// 作品数
|
|
Works int64 `json:"works"`
|
|
// 热度值
|
|
HotValue int64 `json:"hotValue"`
|
|
}
|