书籍列表接口新增参数
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/chapter" tags:"Backend/Author" method:"get" summary:"获取章节列表"`
|
||||
g.Meta `path:"/chapter" tags:"Backend/Chapter" method:"get" summary:"获取章节列表"`
|
||||
Page int `json:"page" dc:"页码"`
|
||||
Size int `json:"size" dc:"每页数量"`
|
||||
BookId int64 `json:"bookId" dc:"小说ID"`
|
||||
@ -20,7 +20,7 @@ type ListRes struct {
|
||||
}
|
||||
|
||||
type AddReq struct {
|
||||
g.Meta `path:"/chapter" tags:"Backend/Author" method:"post" summary:"新增章节"`
|
||||
g.Meta `path:"/chapter" tags:"Backend/Chapter" method:"post" summary:"新增章节"`
|
||||
BookId int64 `json:"bookId" dc:"小说ID" v:"required"`
|
||||
Title string `json:"title" dc:"章节标题" v:"required"`
|
||||
Content string `json:"content" dc:"章节内容" v:"required"`
|
||||
@ -34,7 +34,7 @@ type AddRes struct {
|
||||
}
|
||||
|
||||
type EditReq struct {
|
||||
g.Meta `path:"/chapter" tags:"Backend/Author" method:"put" summary:"编辑章节"`
|
||||
g.Meta `path:"/chapter" tags:"Backend/Chapter" method:"put" summary:"编辑章节"`
|
||||
Id int64 `json:"id" dc:"章节ID" v:"required"`
|
||||
BookId int64 `json:"bookId" dc:"小说ID" v:"required"`
|
||||
Title string `json:"title" dc:"章节标题" v:"required"`
|
||||
@ -49,7 +49,7 @@ type EditRes struct {
|
||||
}
|
||||
|
||||
type DelReq struct {
|
||||
g.Meta `path:"/chapter" tags:"Backend/Author" method:"delete" summary:"删除章节"`
|
||||
g.Meta `path:"/chapter" tags:"Backend/Chapter" method:"delete" summary:"删除章节"`
|
||||
Id int64 `json:"id" dc:"章节ID" v:"required"`
|
||||
}
|
||||
type DelRes struct {
|
||||
@ -57,7 +57,7 @@ type DelRes struct {
|
||||
}
|
||||
|
||||
type AppListReq struct {
|
||||
g.Meta `path:"/chapter/app/list" tags:"APP" method:"get" summary:"App获取章节列表"`
|
||||
g.Meta `path:"/chapter/app/list" tags:"APP/Chapter" method:"get" summary:"App获取章节列表"`
|
||||
BookId int64 `json:"bookId" dc:"书籍ID" v:"required"`
|
||||
IsDesc bool `json:"isDesc" dc:"是否逆序排列"`
|
||||
Page int `json:"page" dc:"页码"`
|
||||
@ -69,7 +69,7 @@ type AppListRes struct {
|
||||
}
|
||||
|
||||
type AppDetailReq struct {
|
||||
g.Meta `path:"/chapter/app/detail" tags:"APP" method:"get" summary:"App获取章节详情"`
|
||||
g.Meta `path:"/chapter/app/detail" tags:"APP/Chapter" method:"get" summary:"App获取章节详情"`
|
||||
Id int64 `json:"id" dc:"章节ID" v:"required"`
|
||||
}
|
||||
type AppDetailRes struct {
|
||||
@ -85,7 +85,7 @@ type AppDetailRes struct {
|
||||
}
|
||||
|
||||
type AppPurchaseReq struct {
|
||||
g.Meta `path:"/chapter/app/purchase" tags:"APP" method:"post" summary:"App购买章节"`
|
||||
g.Meta `path:"/chapter/app/purchase" tags:"APP/Chapter" method:"post" summary:"App购买章节"`
|
||||
Id int64 `json:"id" dc:"章节ID" v:"required"`
|
||||
}
|
||||
type AppPurchaseRes struct {
|
||||
@ -93,11 +93,11 @@ type AppPurchaseRes struct {
|
||||
}
|
||||
|
||||
type AppProgressReq struct {
|
||||
g.Meta `path:"/chapter/app/progress" tags:"APP" method:"post" summary:"App上传阅读进度"`
|
||||
BookId int64 `json:"bookId" dc:"书籍ID" v:"required"`
|
||||
ChapterId int64 `json:"chapterId" dc:"章节ID" v:"required"`
|
||||
Progress int `json:"progress" dc:"阅读进度百分比(0-100)"`
|
||||
g.Meta `path:"/chapter/app/progress" tags:"APP/Chapter" method:"post" summary:"App上传阅读进度"`
|
||||
BookId int64 `json:"bookId" dc:"书籍ID" v:"required"`
|
||||
Chapters []model.ChapterProgressItem `json:"chapters" dc:"章节进度列表" v:"required"`
|
||||
}
|
||||
|
||||
type AppProgressRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user