init: web_hgdjc_server
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/pub/common/response"
|
||||
"videoweb/pub/pubdef"
|
||||
)
|
||||
|
||||
// HomeConfigListReq web端首页配置分页列表请求
|
||||
type HomeConfigListReq struct {
|
||||
PageNum int64 `form:"pageNum" json:"pageNum"` // 页码,默认1
|
||||
PageSize int64 `form:"pageSize" json:"pageSize"` // 每页数量,默认10,最大100
|
||||
Id *int64 `form:"id" json:"id"` // 首页配置ID
|
||||
Name string `form:"name" json:"name"` // 名称,支持模糊查询
|
||||
Slug string `form:"slug" json:"slug"` // slug,精确匹配
|
||||
Type *int32 `form:"type" json:"type"` // 类型 1-短剧 3-题材
|
||||
SortType *int32 `form:"sortType" json:"sortType"` // 短剧模块排序 1-推荐 2-热播 3-最近更新 4-上架时间 5-分类,题材模块预览按专题详情默认排序
|
||||
Status *bool `form:"status" json:"status"` // 上下架状态 true-上架 false-下架
|
||||
}
|
||||
|
||||
// HomeConfigListResp web端首页配置列表项
|
||||
type HomeConfigListResp struct {
|
||||
Id int64 `json:"id"` // ID
|
||||
Name string `json:"name"` // 名称
|
||||
Slug string `json:"slug"` // slug
|
||||
Desc string `json:"desc"` // 描述
|
||||
Keyword []string `json:"keyword"` // 页面关键字
|
||||
Label string `json:"label"`
|
||||
Style string `json:"style"`
|
||||
CardBackgroundImage string `json:"cardBackgroundImage"`
|
||||
TopicIds []int64 `json:"topicIds"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
RecommendType int64 `json:"recommendType"`
|
||||
Type int32 `json:"type"` // 类型 1-短剧 3-题材
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
Limit int64 `json:"limit"` // 首页展示数量,0 时短剧默认12条、题材默认8个
|
||||
SortType int32 `json:"sortType"` // 短剧模块排序 1-推荐 2-热播 3-最近更新 4-上架时间 5-分类,题材模块预览按专题详情默认排序
|
||||
Status bool `json:"status"` // 上下架状态 true-上架 false-下架
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt"` // 修改时间
|
||||
}
|
||||
|
||||
// HomeConfigListPageResp web端首页配置分页列表响应
|
||||
type HomeConfigListPageResp struct {
|
||||
response.BasePageResp
|
||||
}
|
||||
|
||||
// HomeConfigAddReq web端新增首页配置请求
|
||||
type HomeConfigAddReq struct {
|
||||
Name string `json:"name" binding:"required"` // 名称
|
||||
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或名称自动生成
|
||||
Desc string `json:"desc"` // 描述
|
||||
Keyword []string `json:"keyword"` // 页面关键字,可不传
|
||||
Label string `json:"label"`
|
||||
Style string `json:"style"`
|
||||
CardBackgroundImage string `json:"cardBackgroundImage"`
|
||||
TopicIds []int64 `json:"topicIds"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
RecommendType int64 `json:"recommendType"`
|
||||
Type int32 `json:"type" binding:"required"` // 类型 1-短剧 3-题材
|
||||
Rank int64 `json:"rank"` // 排序,越大越靠前
|
||||
Limit int64 `json:"limit"` // 首页展示数量,0 时短剧默认12条、题材默认8个
|
||||
SortType int32 `json:"sortType" binding:"required"` // 短剧模块排序 1-推荐 2-热播 3-最近更新 4-上架时间 5-分类,题材模块预览按专题详情默认排序
|
||||
Status *bool `json:"status" binding:"required"` // 上下架状态 true-上架 false-下架
|
||||
SeoInfo pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// HomeConfigAddResp web端新增首页配置响应
|
||||
type HomeConfigAddResp struct {
|
||||
Id int64 `json:"id"` // ID
|
||||
}
|
||||
|
||||
// HomeConfigUpdateReq web端更新首页配置请求
|
||||
type HomeConfigUpdateReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // ID
|
||||
Name *string `json:"name"` // 名称
|
||||
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
|
||||
Desc *string `json:"desc"` // 描述
|
||||
Keyword *[]string `json:"keyword"` // 不传保持原值,传空数组清空
|
||||
Label *string `json:"label"`
|
||||
Style *string `json:"style"`
|
||||
CardBackgroundImage *string `json:"cardBackgroundImage"`
|
||||
TopicIds *[]int64 `json:"topicIds"`
|
||||
CategoryId *int64 `json:"categoryId"`
|
||||
RecommendType *int64 `json:"recommendType"`
|
||||
Type *int32 `json:"type"` // 类型 1-短剧 3-题材
|
||||
Rank *int64 `json:"rank"` // 排序,越大越靠前
|
||||
Limit *int64 `json:"limit"` // 首页展示数量,0 时短剧默认12条、题材默认8个
|
||||
SortType *int32 `json:"sortType"` // 短剧模块排序 1-推荐 2-热播 3-最近更新 4-上架时间 5-分类,题材模块预览按专题详情默认排序
|
||||
Status *bool `json:"status"` // 上下架状态 true-上架 false-下架
|
||||
SeoInfo *pubdef.SeoValue `json:"seoInfo"` // Seo相关信息
|
||||
}
|
||||
|
||||
// HomeConfigDelReq web端删除首页配置请求
|
||||
type HomeConfigDelReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // ID
|
||||
}
|
||||
|
||||
// HomeTopicOptionsReq 首页短剧题材选项分页请求
|
||||
type HomeTopicOptionsReq struct {
|
||||
PageNum int64 `form:"pageNum"` // 页码,默认 1
|
||||
PageSize int64 `form:"pageSize"` // 每页数量,默认 10,最大 100
|
||||
ConfigId int64 `form:"configId"` // 编辑时传当前首页配置 ID;不传则只查询可选题材
|
||||
}
|
||||
|
||||
// HomeTopicOption 首页短剧题材选项
|
||||
type HomeTopicOption struct {
|
||||
Id int64 `json:"id"` // 题材 ID
|
||||
Name string `json:"name"` // 题材名称
|
||||
Status bool `json:"status"` // 是否上架;已选题材下架后仍可回显
|
||||
}
|
||||
|
||||
// HomeTopicOptionsResp 首页短剧题材选项分页响应
|
||||
type HomeTopicOptionsResp struct {
|
||||
List []*HomeTopicOption `json:"list"` // 当前页可选题材,排除其他启用模块占用的题材
|
||||
SelectedList []*HomeTopicOption `json:"selectedList"` // 当前配置已选题材,不受分页限制
|
||||
TotalCount int64 `json:"totalCount"` // 可选题材总数
|
||||
PageNum int64 `json:"pageNum"` // 当前页码
|
||||
PageSize int64 `json:"pageSize"` // 每页数量
|
||||
}
|
||||
Reference in New Issue
Block a user