Initial commit: web_hghl_server
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/pub/common/response"
|
||||
"videoweb/pub/pubdef"
|
||||
)
|
||||
|
||||
// PlayletHomeConfigListReq web端首页配置分页列表请求
|
||||
type PlayletHomeConfigListReq struct {
|
||||
pubdef.Page
|
||||
Id *int64 `form:"id" json:"id"`
|
||||
Slug string `form:"slug" json:"slug"` // 页面路径标识
|
||||
Title string `form:"title" json:"title"`
|
||||
Desc string `form:"desc" json:"desc"`
|
||||
Label string `form:"label" json:"label"`
|
||||
Style string `form:"style" json:"style"`
|
||||
ModuleType *int64 `form:"moduleType" json:"moduleType"`
|
||||
DataType *int64 `form:"dataType" json:"dataType"` // 1全部上架短剧 2全部上架视频
|
||||
RecommendType *int64 `form:"recommendType" json:"recommendType"`
|
||||
CategoryId *int64 `form:"categoryId" json:"categoryId"`
|
||||
Enabled *bool `form:"enabled" json:"enabled"`
|
||||
}
|
||||
|
||||
// PlayletHomeConfigListResp web端首页配置列表项
|
||||
type PlayletHomeConfigListResp struct {
|
||||
Id int64 `json:"id"`
|
||||
Slug string `json:"slug"` // 页面路径标识
|
||||
Title string `json:"title"`
|
||||
Desc string `json:"desc"`
|
||||
Label string `json:"label"`
|
||||
Style string `json:"style"`
|
||||
CardBackgroundImage string `json:"cardBackgroundImage"`
|
||||
ModuleType int64 `json:"moduleType"`
|
||||
DataType int64 `json:"dataType"` // 1全部上架短剧 2全部上架视频
|
||||
RecommendType int64 `json:"recommendType"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
TopicIds []int64 `json:"topicIds"` // 专题ID集合 短剧为题材ID 视频为分类ID
|
||||
Rank int64 `json:"rank"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Limit int64 `json:"limit"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type PlayletHomeConfigListPageResp struct {
|
||||
response.BasePageResp
|
||||
}
|
||||
|
||||
// PlayletHomeTopicOptionsReq 首页专题下拉选项分页请求
|
||||
type PlayletHomeTopicOptionsReq struct {
|
||||
pubdef.Page
|
||||
DataType int64 `form:"dataType" json:"dataType" binding:"required"` // 1短剧题材 2视频分类
|
||||
ConfigId int64 `form:"configId" json:"configId"` // 编辑时传当前首页配置ID,用于回显已选项
|
||||
}
|
||||
|
||||
// PlayletHomeTopicOption 首页专题下拉选项
|
||||
type PlayletHomeTopicOption struct {
|
||||
Id int64 `json:"id"` // 题材或视频分类ID
|
||||
Name string `json:"name"` // 题材或视频分类名称
|
||||
Status bool `json:"status"` // 上架状态,已选项下架时仍可回显
|
||||
}
|
||||
|
||||
// PlayletHomeTopicOptionsResp 首页专题下拉选项分页响应
|
||||
type PlayletHomeTopicOptionsResp struct {
|
||||
List []*PlayletHomeTopicOption `json:"list"` // 当前页可选项
|
||||
SelectedList []*PlayletHomeTopicOption `json:"selectedList"` // 当前配置已选项,独立于分页
|
||||
TotalCount int64 `json:"totalCount"` // 可选项总数
|
||||
PageNum int64 `json:"pageNum"` // 当前页码
|
||||
PageSize int64 `json:"pageSize"` // 每页数量
|
||||
}
|
||||
|
||||
type PlayletHomeConfigAddReq struct {
|
||||
Title string `json:"title" binding:"required"`
|
||||
Slug string `json:"slug"` // 页面路径标识 不传则按标题自动生成
|
||||
Desc string `json:"desc"`
|
||||
Label string `json:"label"`
|
||||
Style string `json:"style" binding:"required"`
|
||||
CardBackgroundImage string `json:"cardBackgroundImage"`
|
||||
ModuleType int64 `json:"moduleType"`
|
||||
DataType int64 `json:"dataType"` // 1全部上架短剧 2全部上架视频
|
||||
RecommendType int64 `json:"recommendType" binding:"required"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
TopicIds []int64 `json:"topicIds"` // 专题ID集合 短剧为题材ID 视频为分类ID
|
||||
Rank int64 `json:"rank"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Limit int64 `json:"limit"`
|
||||
}
|
||||
|
||||
type PlayletHomeConfigAddResp struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
type PlayletHomeConfigUpdateReq struct {
|
||||
Id int64 `json:"id" binding:"required"`
|
||||
Slug *string `json:"slug"` // 不传保持原值 历史空值自动生成
|
||||
Title *string `json:"title"`
|
||||
Desc *string `json:"desc"`
|
||||
Label *string `json:"label"`
|
||||
Style *string `json:"style"`
|
||||
CardBackgroundImage *string `json:"cardBackgroundImage"`
|
||||
ModuleType *int64 `json:"moduleType"`
|
||||
DataType *int64 `json:"dataType"` // 1全部上架短剧 2全部上架视频
|
||||
RecommendType *int64 `json:"recommendType"`
|
||||
CategoryId *int64 `json:"categoryId"`
|
||||
TopicIds *[]int64 `json:"topicIds"` // 不传保持原值 传空数组清空专题
|
||||
Rank *int64 `json:"rank"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Limit *int64 `json:"limit"`
|
||||
}
|
||||
|
||||
type PlayletHomeConfigDelReq struct {
|
||||
Ids []int64 `json:"ids" binding:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user