Files
novel_server/internal/model/book.go

65 lines
1.4 KiB
Go

package model
import "github.com/gogf/gf/v2/frame/g"
type Book struct {
g.Meta `orm:"table:books"`
Id int64 `json:"id"`
AuthorId int64 `json:"authorId"`
CategoryId int64 `json:"categoryId"`
Title string `json:"title"`
CoverUrl string `json:"coverUrl"`
Description string `json:"description"`
Status int `json:"status"`
WordsCount int `json:"wordsCount"`
ChaptersCount int `json:"chaptersCount"`
LatestChapterId int64 `json:"latestChapterId"`
Rating float64 `json:"rating"`
ReadCount int64 `json:"readCount"`
Tags string `json:"tags"`
IsRecommended int `json:"isRecommended"`
}
type BookListIn struct {
Page int
Size int
Title string
CategoryId int64
AuthorId int64
Status int
IsRecommended int
}
type BookListOut struct {
Total int
List []Book
}
type BookAddIn struct {
AuthorId int64
CategoryId int64
Title string
CoverUrl string
Description string
Status int
Tags string
IsRecommended int
}
type BookEditIn struct {
Id int64
AuthorId int64
CategoryId int64
Title string
CoverUrl string
Description string
Status int
Tags string
IsRecommended int
}
type BookDelIn struct {
Id int64
}
type BookCRUDOut struct {
Success bool
}