Initial commit: web_hghl_server
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/pub/common/netutil"
|
||||
"videoweb/pub/common/response"
|
||||
"videoweb/pub/models/actress"
|
||||
"videoweb/pub/pubdef"
|
||||
)
|
||||
|
||||
// QueryActressWorkListReq 指定女优作品列表请求
|
||||
type QueryActressWorkListReq struct {
|
||||
pubdef.Page
|
||||
// 女优ID
|
||||
Id int64 `json:"id" form:"id"`
|
||||
// 女优slug,非空时优先按slug解析女优ID
|
||||
Slug string `json:"slug" form:"slug"`
|
||||
// 上架时间升序/降序(1-升序 2降序)
|
||||
AddedTimeSort int64 `json:"addedTimeSort" form:"addedTimeSort"`
|
||||
// 按观看量升序/降序(1-升序 2降序)
|
||||
WatchTimesSort int64 `json:"watchTimesSort" form:"watchTimesSort"`
|
||||
// 按收藏(点赞)量升序/降序(1-升序 2降序)
|
||||
LikesSort int64 `json:"likesSort" form:"likesSort"`
|
||||
}
|
||||
|
||||
// QueryActressWorkListResp 指定女优详情和作品混排列表响应
|
||||
type QueryActressWorkListResp struct {
|
||||
// 分页信息;List 类型为 []*QueryVideoListItem,包含视频项(type=0)和广告项(type=2)
|
||||
response.BasePageResp
|
||||
// 导航
|
||||
Translations AppTranslationInfo `json:"translations"`
|
||||
// 底部翻译
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations"`
|
||||
// 女优信息
|
||||
ActressInfo ActressInfoData `json:"actressInfo"`
|
||||
}
|
||||
|
||||
// QueryActressListResp 女优榜单列表响应
|
||||
type QueryActressListResp struct {
|
||||
// 当前路径
|
||||
Path string `json:"path"`
|
||||
// 导航
|
||||
Translations AppTranslationInfo `json:"translations"`
|
||||
// 底部导航
|
||||
BottonTranslations AppTranslationInfo `json:"bottonTranslations"`
|
||||
// 广告
|
||||
Advitise AdvitiseData `json:"advitise"`
|
||||
// 女优列表
|
||||
ActressInfoList []ActressInfoData `json:"actressInfoList"`
|
||||
}
|
||||
|
||||
type ActressInfoData struct {
|
||||
Id int64 `json:"id" bson:"_id"` // Id
|
||||
Alias string `bson:"alias" json:"alias"` // 别名
|
||||
Slug string `json:"slug"` // slug
|
||||
Avatar string `bson:"avatar" json:"avatar"` // 头像
|
||||
Cover string `bson:"cover" json:"cover"` // 封面大图
|
||||
Desc string `bson:"desc" json:"desc"` // 详细描述
|
||||
Meas actress.Meas `bson:"meas" json:"meas"` // 三围
|
||||
MeasValue string `bson:"measValue" json:"measValue"` // 三围值
|
||||
Office string `json:"office" bson:"office"` // 事务所
|
||||
DebutDate time.Time `bson:"debutDate" json:"debutDate" ` // 出道日期
|
||||
BornDate time.Time `bson:"bornDate" json:"bornDate"` // 出生日期
|
||||
Region string `json:"region" bson:"region"` // 地区/国家
|
||||
Score string `json:"score" bson:"score"` // 评分
|
||||
Works int64 `json:"works" bson:"works"` // 作品数
|
||||
HotValue int64 `json:"hotValue" bson:"hotValue"` // 热度值
|
||||
WatchTimes int64 `json:"watchTimes" bson:"watchTimes"` // 观看次数
|
||||
ShowTimes int64 `json:"showTimes" bson:"showTimes"` // 展示次数
|
||||
Comments int64 `json:"comments" bson:"comments"` // 评论条数
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo" bson:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
func ActressInfoToData(actress2 actress.Actress, imageCdn string) ActressInfoData {
|
||||
return ActressInfoData{
|
||||
Id: actress2.Id,
|
||||
Alias: actress2.Alias,
|
||||
Slug: actress2.Slug,
|
||||
Avatar: netutil.MergeURL(imageCdn, actress2.Avatar),
|
||||
Cover: netutil.MergeURL(imageCdn, actress2.Cover),
|
||||
Desc: actress2.Desc,
|
||||
Meas: actress2.Meas,
|
||||
Office: actress2.Office,
|
||||
DebutDate: actress2.DebutDate,
|
||||
BornDate: actress2.BornDate,
|
||||
Region: actress2.Region,
|
||||
Score: actress2.Score,
|
||||
MeasValue: actress2.Meas.Measurements(),
|
||||
Works: actress2.Works,
|
||||
HotValue: actress2.HotValue,
|
||||
WatchTimes: actress2.Real.WatchTimes*100 + 2273,
|
||||
ShowTimes: actress2.Real.WatchTimes*100 + 3273,
|
||||
Comments: actress2.Real.Comments,
|
||||
SeoInfo: actress2.SeoInfo,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user