46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
package dto
|
|
|
|
type AuthorGet struct {
|
|
Name string `json:"name" binding:"required,max=100"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
type BookSearchGetParam struct {
|
|
Lang string `form:"lang" binding:"max=5"`
|
|
Inventaire bool `form:"inventaire"`
|
|
}
|
|
|
|
type BookPostCreate struct {
|
|
Title string `json:"title" binding:"required,max=300"`
|
|
Author string `json:"author" binding:"max=100"`
|
|
CoverID uint `json:"coverId"`
|
|
}
|
|
|
|
type BookPostImport struct {
|
|
InventaireID string `json:"inventaireid" binding:"required,max=50"`
|
|
Lang string `json:"lang" binding:"required,max=5"`
|
|
}
|
|
|
|
type UserBookPutUpdate struct {
|
|
Read *bool `json:"read"`
|
|
EndDate *string `json:"endDate"`
|
|
WantRead *bool `json:"wantread"`
|
|
Rating *int `json:"rating"`
|
|
StartDate *string `json:"startDate"`
|
|
}
|
|
|
|
type FileInfoPost struct {
|
|
FileID uint `json:"fileId"`
|
|
FilePath string `json:"filepath"`
|
|
}
|
|
|
|
type UserLogin struct {
|
|
Username string `json:"username" binding:"required,min=2,max=20"`
|
|
Password string `json:"password" binding:"required,min=6,max=100"`
|
|
}
|
|
|
|
type UserSignup struct {
|
|
Username string `json:"username" binding:"required,min=2,max=20"`
|
|
Password string `json:"password" binding:"required,min=6,max=100"`
|
|
}
|