feat: add VoteRequest with its validation types
This commit is contained in:
1 parent
0e71b28615
commit
8b5cc8e939
1 file changed
+4
@@ -6,6 +6,10 @@ import (
|
|||||||
"goyco/internal/database"
|
"goyco/internal/database"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type VoteRequest struct {
|
||||||
|
Type string `json:"type" validate:"required,oneof=up down none"`
|
||||||
|
}
|
||||||
|
|
||||||
type VoteDTO struct {
|
type VoteDTO struct {
|
||||||
ID uint `json:"id"`
|
ID uint `json:"id"`
|
||||||
UserID *uint `json:"user_id,omitempty"`
|
UserID *uint `json:"user_id,omitempty"`
|
||||||
|
|||||||
Reference in new issue
Block a user