Refactor: merge dto, mapper and routes
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
package dto
|
||||
|
||||
type BookPostCreate struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package dto
|
||||
|
||||
type BookSearchGet struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
ID uint `json:"id"`
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package dto
|
||||
|
||||
type BookUserGet struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
Rating int `json:"rating" binding:"min=0,max=10"`
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package dto
|
||||
|
||||
type UserBookPostCreate struct {
|
||||
BookID uint `json:"bookId" binding:"required"`
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package dto
|
||||
|
||||
type UserLogin struct {
|
||||
Username string `json:"username" binding:"required,min=2,max=20"`
|
||||
Password string `json:"password" binding:"required,min=6,max=100"`
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package dto
|
||||
|
||||
type UserSignup struct {
|
||||
Username string `json:"username" binding:"required,min=2,max=20"`
|
||||
Password string `json:"password" binding:"required,min=6,max=100"`
|
||||
}
|
||||
Reference in New Issue
Block a user