Refactor: merge dto, mapper and routes

This commit is contained in:
2025-10-20 18:06:42 +02:00
parent e5347e3583
commit c4ca073b4a
17 changed files with 87 additions and 134 deletions

View File

@@ -1,6 +0,0 @@
package dto
type BookPostCreate struct {
Title string `json:"title" binding:"required,max=300"`
Author string `json:"author" binding:"max=100"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}

View File

@@ -1,5 +0,0 @@
package dto
type UserBookPostCreate struct {
BookID uint `json:"bookId" binding:"required"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}