package v1 import ( "server/internal/model" "github.com/gogf/gf/v2/frame/g" ) type ChapterListReq struct { g.Meta `path:"/chapter" tags:"Chapter" method:"get" summary:"获取章节列表"` Page int `json:"page" dc:"页码"` Size int `json:"size" dc:"每页数量"` BookId int64 `json:"bookId" dc:"小说ID"` Title string `json:"title" dc:"章节标题(模糊搜索)"` IsLocked int `json:"isLocked" dc:"是否锁定:0免费,1需积分解锁"` } type ChapterListRes struct { Total int `json:"total" dc:"总数"` List []model.Chapter `json:"list" dc:"章节列表"` } type ChapterAddReq struct { g.Meta `path:"/chapter" tags:"Chapter" method:"post" summary:"新增章节"` BookId int64 `json:"bookId" dc:"小说ID"` Title string `json:"title" dc:"章节标题"` Content string `json:"content" dc:"章节内容"` WordCount int `json:"wordCount" dc:"章节字数"` Sort int `json:"sort" dc:"排序序号"` IsLocked int `json:"isLocked" dc:"是否锁定:0免费,1需积分解锁"` RequiredScore int `json:"requiredScore" dc:"解锁所需积分"` } type ChapterAddRes struct { Success bool `json:"success" dc:"是否成功"` } type ChapterEditReq struct { g.Meta `path:"/chapter" tags:"Chapter" method:"put" summary:"编辑章节"` Id int64 `json:"id" dc:"章节ID"` BookId int64 `json:"bookId" dc:"小说ID"` Title string `json:"title" dc:"章节标题"` Content string `json:"content" dc:"章节内容"` WordCount int `json:"wordCount" dc:"章节字数"` Sort int `json:"sort" dc:"排序序号"` IsLocked int `json:"isLocked" dc:"是否锁定:0免费,1需积分解锁"` RequiredScore int `json:"requiredScore" dc:"解锁所需积分"` } type ChapterEditRes struct { Success bool `json:"success" dc:"是否成功"` } type ChapterDelReq struct { g.Meta `path:"/chapter" tags:"Chapter" method:"delete" summary:"删除章节"` Id int64 `json:"id" dc:"章节ID"` } type ChapterDelRes struct { Success bool `json:"success" dc:"是否成功"` }