feat: add VoteRequest with its validation types
This commit is contained in:
@@ -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