Files
bibliomane/internal/dto/out.go

75 lines
2.4 KiB
Go

package dto
type AppInfo struct {
RegistrationDisabled bool `json:"registrationDisabled"`
DemoMode bool `json:"demoMode"`
DemoUsername string `json:"demoUsername"`
}
type FullBookGet 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"`
ShortDescription string `json:"shortdescription"`
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 BookItemsGet struct {
Count int64 `json:"count"`
Inventaire bool `json:"inventaire"`
Books []BookItemGet `json:"books"`
}
type BookItemGet 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"`
StartReadDate string `json:"startreaddate"`
WantRead bool `json:"wantread"`
CoverPath string `json:"coverPath"`
}
type CollectionGet struct {
Name string `json:"name"`
Count int64 `json:"count"`
Items []CollectionItemGet `json:"items"`
}
type CollectionItemGet struct {
ID uint `json:"id"`
Position uint `json:"position"`
Book BookItemGet `json:"book"`
}
type CollectionItemsGet struct {
Count int64 `json:"count"`
Collections []CollectionListItemGet `json:"collections"`
}
type CollectionListItemGet struct {
ID uint `json:"id"`
Name string `json:"name"`
Books []CollectionListBookItemGet `json:"books"`
}
type CollectionListBookItemGet struct {
ID uint `json:"id"`
Title string `json:"title"`
CoverPath string `json:"coverPath"`
}