Use the same widget for books everywhere
This commit is contained in:
@@ -6,7 +6,7 @@ type AppInfo struct {
|
||||
DemoUsername string `json:"demoUsername"`
|
||||
}
|
||||
|
||||
type BookGet struct {
|
||||
type FullBookGet struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
AuthorID uint `json:"authorId"`
|
||||
@@ -23,28 +23,13 @@ type BookGet struct {
|
||||
CoverPath string `json:"coverPath"`
|
||||
}
|
||||
|
||||
type BookUserGet struct {
|
||||
Count int64 `json:"count"`
|
||||
Books []BookUserGetBook `json:"books"`
|
||||
type BookItemsGet struct {
|
||||
Count int64 `json:"count"`
|
||||
Inventaire bool `json:"inventaire"`
|
||||
Books []BookItemGet `json:"books"`
|
||||
}
|
||||
|
||||
type BookUserGetBook struct {
|
||||
ID uint `json:"id"`
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
Rating int `json:"rating" binding:"min=0,max=10"`
|
||||
Read bool `json:"read" binding:"boolean"`
|
||||
WantRead bool `json:"wantread" binding:"boolean"`
|
||||
CoverPath string `json:"coverPath"`
|
||||
}
|
||||
|
||||
type BookSearchGet struct {
|
||||
Count int64 `json:"count"`
|
||||
Inventaire bool `json:"inventaire"`
|
||||
Books []BookSearchGetBook `json:"books"`
|
||||
}
|
||||
|
||||
type BookSearchGetBook struct {
|
||||
type BookItemGet struct {
|
||||
ID uint `json:"id"`
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
|
||||
Reference in New Issue
Block a user