Files
web_hgcg_server/web/api/proto/home_config.go
T
2026-10-27 16:44:55 +08:00

78 lines
4.3 KiB
Go

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
MoreCategoryId int64 `json:"moreCategoryId"` // “更多”跳转导航分类ID
Name string `json:"name"` // 名称
Slug string `json:"slug"` // slug
Desc string `json:"desc"` // 描述
Type int32 `json:"type"` // 类型 1-短剧 3-题材
Rank int64 `json:"rank"` // 排序,越大越靠前
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"` // 名称
MoreCategoryId int64 `json:"moreCategoryId"` // “更多”跳转导航分类ID,0表示不展示
Slug string `json:"slug"` // slug,不传则按 SEO 关键词或名称自动生成
Desc string `json:"desc"` // 描述
Type int32 `json:"type" binding:"required"` // 类型 1-短剧 3-题材
Rank int64 `json:"rank"` // 排序,越大越靠前
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
MoreCategoryId *int64 `json:"moreCategoryId"` // “更多”跳转导航分类ID,0表示清除
Name *string `json:"name"` // 名称
Slug *string `json:"slug"` // slug,历史数据为空时更新会自动生成
Desc *string `json:"desc"` // 描述
Type *int32 `json:"type"` // 类型 1-短剧 3-题材
Rank *int64 `json:"rank"` // 排序,越大越靠前
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
}