150 lines
4.6 KiB
Go
150 lines
4.6 KiB
Go
package cmtmod
|
|
|
|
type ComicsTitlePullReq struct {
|
|
PageNum int64 `form:"pageNum" json:"pageNum"`
|
|
PageSize int64 `form:"pageSize" json:"pageSize"`
|
|
TagId string `form:"tagId" json:"tagId"`
|
|
}
|
|
|
|
type ComicsTitlePullResp struct {
|
|
List []ComicsTitleInfo `json:"list"`
|
|
}
|
|
|
|
type ComicsTitleInfo struct {
|
|
Id string `json:"id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
type ComicsTitlePushReq struct {
|
|
TagId string `json:"tagId"`
|
|
List []ComicsTitlePushInfo `json:"list"`
|
|
}
|
|
|
|
type ComicsTitlePushInfo struct {
|
|
Id string `json:"id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
type ComicsTitlePushRes struct{}
|
|
|
|
type PullReq struct {
|
|
AppId string `form:"appId" json:"appId" binding:"required"` //应用标识,与平台配置一致
|
|
Sign string `form:"sign" json:"sign" binding:"required"` //签名
|
|
Limit int `form:"limit" json:"limit" binding:"omitempty"` //单次拉取数量,默认 20,最大 100
|
|
Status string `form:"status" json:"status" binding:"omitempty"` //评论状态,固定传 "pending"
|
|
}
|
|
|
|
type PullResp struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data []PullComment `json:"data"`
|
|
}
|
|
|
|
type PullComment struct {
|
|
Id string `json:"id"` //评论唯一 ID
|
|
UserId string `json:"user_id"` //发布者用户 ID
|
|
Nickname string `json:"nickname"` //发布者昵称
|
|
Content string `json:"content"` //评论正文
|
|
CreatedAt string `json:"created_at"` //发布时间,ISO 8601 格式
|
|
Ip string `json:"ip"` //发布者 IP
|
|
Context Context `json:"context"` //评论正文
|
|
}
|
|
|
|
type Context struct {
|
|
ContentType int `json:"content_type"` //帖子类型 1=帖子 2=视频 3=漫画
|
|
ContentId string `json:"content_id"` //所属内容业务 ID
|
|
ContentTitle string `json:"content_title"` //所属内容标题
|
|
}
|
|
|
|
type ApproveReq struct {
|
|
Reviews []Review `json:"reviews"`
|
|
}
|
|
|
|
type AppIdJson struct {
|
|
AppId string `form:"appId" json:"appId"`
|
|
}
|
|
|
|
type Review struct {
|
|
CommentId string `form:"comment_id" json:"comment_id" binding:"omitempty"` //评论 ID,与拉取接口返回的 id 一致
|
|
Action string `form:"action" json:"action" binding:"omitempty" ` //审核动作:approve 通过,reject 拒绝
|
|
Category string `form:"category" json:"category" binding:"omitempty"` //拒绝原因简述
|
|
Reason string `form:"reason" json:"reason" binding:"omitempty"` //违规类别:abuse/politics/ad/spam/competitor/foreign/link/complaint/minor
|
|
}
|
|
|
|
type RepliesReq struct {
|
|
Replies []ReplyReq `json:"replies"`
|
|
}
|
|
|
|
type ReplyReq struct {
|
|
CommentId string `form:"comment_id" json:"comment_id" binding:"omitempty"` //被回复评论的id
|
|
Content string `form:"content" json:"content" binding:"omitempty"` // 被回复评论的内容
|
|
}
|
|
|
|
type ReplyResp struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
type SignBody struct {
|
|
AppID string `json:"appId" binding:"required"`
|
|
Sign string `json:"sign" binding:"required"`
|
|
}
|
|
|
|
type VideoCommentSubmitReq struct {
|
|
AppID string `json:"appId" binding:"required"`
|
|
Sign string `json:"sign" binding:"required"`
|
|
Videos []VideoCommentItem `json:"videos" binding:"required"`
|
|
}
|
|
|
|
type VideoCommentItem struct {
|
|
VideoID string `json:"videoId" binding:"required"`
|
|
Title string `json:"title" binding:"required"`
|
|
Tags []string `json:"tags,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Subtitle string `json:"subtitle,omitempty"`
|
|
CommentCount int `json:"commentCount" binding:"required"`
|
|
}
|
|
|
|
type VideoCommentSubmitResp struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data VideoCommentSubmitRespData `json:"data"`
|
|
}
|
|
|
|
type VideoCommentSubmitRespData struct {
|
|
Results []VideoCommentSubmitResult `json:"results"`
|
|
}
|
|
|
|
type VideoCommentSubmitResult struct {
|
|
ID string `json:"id"`
|
|
VideoID string `json:"videoId"`
|
|
}
|
|
|
|
type VideoCommentResultReq struct {
|
|
AppID string `json:"appId" binding:"required"`
|
|
Sign string `json:"sign" binding:"required"`
|
|
IDs []string `json:"ids" binding:"required"`
|
|
}
|
|
|
|
type VideoCommentResultResp struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data VideoCommentResultRespData `json:"data"`
|
|
}
|
|
|
|
type VideoCommentResultRespData struct {
|
|
Results []VideoCommentResultItem `json:"results"`
|
|
}
|
|
|
|
type VideoCommentResultItem struct {
|
|
ID string `json:"id"`
|
|
VideoID string `json:"videoId"`
|
|
Comments []GeneratedVideoComment `json:"comments"`
|
|
ErrorMsg string `json:"errorMsg,omitempty"`
|
|
}
|
|
|
|
type GeneratedVideoComment struct {
|
|
Type string `json:"type"`
|
|
Text string `json:"text"`
|
|
}
|