59 lines
2.0 KiB
Go
59 lines
2.0 KiB
Go
package dto
|
|
|
|
type AppInfo struct {
|
|
RegistrationDisabled bool `json:"registrationDisabled"`
|
|
DemoMode bool `json:"demoMode"`
|
|
DemoUsername string `json:"demoUsername"`
|
|
}
|
|
|
|
type BookGet struct {
|
|
Title string `json:"title" binding:"required,max=300"`
|
|
Author string `json:"author" binding:"max=100"`
|
|
AuthorID uint `json:"authorId"`
|
|
ISBN string `json:"isbn"`
|
|
InventaireId string `json:"inventaireid"`
|
|
OpenLibraryId string `json:"openlibraryid"`
|
|
Summary string `json:"summary"`
|
|
Review string `json:"review"`
|
|
Rating int `json:"rating"`
|
|
Read bool `json:"read"`
|
|
WantRead bool `json:"wantread"`
|
|
StartReadDate string `json:"startReadDate"`
|
|
EndReadDate string `json:"endReadDate"`
|
|
CoverPath string `json:"coverPath"`
|
|
}
|
|
|
|
type BookUserGet struct {
|
|
Count int64 `json:"count"`
|
|
Books []BookUserGetBook `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 {
|
|
ID uint `json:"id"`
|
|
Title string `json:"title" binding:"required,max=300"`
|
|
Author string `json:"author" binding:"max=100"`
|
|
Description string `json:"description"`
|
|
InventaireID string `json:"inventaireid"`
|
|
IsInventaireEdition bool `json:"isinventaireedition"`
|
|
Rating int `json:"rating"`
|
|
Read bool `json:"read"`
|
|
WantRead bool `json:"wantread"`
|
|
CoverPath string `json:"coverPath"`
|
|
}
|