package param_v1_0

import "gd_management_gateway/params/param_base"

// 上传帖子
type NewTopicBody struct {
	Title   string `json:"title" description:"标题" required:"true" in:"body"`
	Content string `json:"content" description:"内容" required:"true" in:"body"`
}

type NewTopicReq struct {
	param_base.BasicParam
	Body NewTopicBody `json:"body" description:"body信息" required:"true" in:"body"`
}

type NewTopicData struct {
	Tid int64 `json:"vid" description:"帖子id"`
}

type NewTopicResp struct {
	param_base.SimpleResp
	Data NewTopicData `json:"data" description:"返回的数据"`
}

// 删除短视频
type DeleteTopicReq struct {
	param_base.BasicParam
	Tid int64 `json:"tid" description:"tid" required:"true" in:"path"`
}

type DeleteTopicResp struct {
	param_base.SimpleResp
	Data param_base.EmptyData `json:"data" description:"返回的数据"`
}

// 获取Topic详情
type GetTopicInfoReq struct {
	param_base.BasicParam
	Tid int64 `json:"tid" description:"帖子id" required:"true" in:"path"`
}

type GetTopicInfoData struct {
	Tid     int64  `json:"vid" description:"帖子id"`
	Uid     uint64 `json:"uid" description:"用户的id"`
	Title   string `json:"title" description:"标题"`
	Content string `json:"content" description:"内容"`
}

type GetTopicInfoResp struct {
	param_base.SimpleResp
	Data GetTopicInfoData `json:"data" description:"返回的数据"`
}

// 更新帖子
type UpdateTopicBody struct {
	Title   string `json:"title" description:"标题" required:"true" in:"body"`
	Content string `json:"content" description:"内容" required:"true" in:"body"`
}

type UpdateTopicReq struct {
	param_base.BasicParam
	Tid  int64           `json:"tid" description:"帖子id" required:"true" in:"path"`
	Body UpdateTopicBody `json:"body" description:"body信息" required:"true" in:"body"`
}

type UpdateTopicResp struct {
	param_base.SimpleResp
	Data param_base.EmptyData `json:"data" description:"返回的数据"`
}

// 拉取topic列表
type GetTopicListReq struct {
	param_base.BasicParam
	Slide  uint32 `json:"slide" description:"滑动方向 1:向上滑动 2:向下滑动" default:"2" in:"query"`
	Top    string `json:"top" description:"页首参数, 向下滑动时使用,格式:base,extra,num" default:"" in:"query"`
	Bottom string `json:"bottom" description:"页尾参数, 向上滑动时使用,格式:base,extra,num" default:"" in:"query"`
}

type TopicMiniInfo struct {
	Tid     int64  `json:"vid" description:"帖子id"`
	Uid     uint64 `json:"uid" description:"用户的id"`
	Title   string `json:"title" description:"标题"`
	Content string `json:"content" description:"内容"`
}

type GetTopicListData struct {
	Slide   uint32          `json:"slide" description:"滑动方向 1:向上滑动 2:向下滑动"`
	Top     string          `json:"top" description:"页首参数, 向下滑动时使用,格式:base,extra,num"`
	Bottom  string          `json:"bottom" description:"页尾参数, 向上滑动时使用,格式:base,extra,num"`
	HasMore bool            `json:"has_more" description:"是否还有更多数据"`
	List    []TopicMiniInfo `json:"list" description:"单页帖子数组"`
}

type GetTopicListResp struct {
	param_base.SimpleResp
	Data GetTopicListData `json:"data" description:"返回的数据"`
}
