初始化项目框架,完成部分接口开发
This commit is contained in:
54
internal/model/chapter.go
Normal file
54
internal/model/chapter.go
Normal file
@ -0,0 +1,54 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type Chapter struct {
|
||||
g.Meta `orm:"table:chapters"`
|
||||
Id int64 `json:"id"`
|
||||
BookId int64 `json:"bookId"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
WordCount int `json:"wordCount"`
|
||||
Sort int `json:"sort"`
|
||||
IsLocked int `json:"isLocked"`
|
||||
RequiredScore int `json:"requiredScore"`
|
||||
}
|
||||
|
||||
type ChapterListIn struct {
|
||||
Page int
|
||||
Size int
|
||||
BookId int64
|
||||
Title string
|
||||
IsLocked int
|
||||
}
|
||||
type ChapterListOut struct {
|
||||
Total int
|
||||
List []Chapter
|
||||
}
|
||||
|
||||
type ChapterAddIn struct {
|
||||
BookId int64
|
||||
Title string
|
||||
Content string
|
||||
WordCount int
|
||||
Sort int
|
||||
IsLocked int
|
||||
RequiredScore int
|
||||
}
|
||||
type ChapterEditIn struct {
|
||||
Id int64
|
||||
BookId int64
|
||||
Title string
|
||||
Content string
|
||||
WordCount int
|
||||
Sort int
|
||||
IsLocked int
|
||||
RequiredScore int
|
||||
}
|
||||
type ChapterDelIn struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type ChapterCRUDOut struct {
|
||||
Success bool
|
||||
}
|
||||
Reference in New Issue
Block a user