From 8b5cc8e939bffcde70240f21d000dce441a0d500 Mon Sep 17 00:00:00 2001 From: Kharec Date: Sun, 23 Nov 2025 13:46:51 +0100 Subject: [PATCH] feat: add VoteRequest with its validation types --- internal/dto/vote.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/dto/vote.go b/internal/dto/vote.go index 7cc2e26..838b694 100644 --- a/internal/dto/vote.go +++ b/internal/dto/vote.go @@ -6,6 +6,10 @@ import ( "goyco/internal/database" ) +type VoteRequest struct { + Type string `json:"type" validate:"required,oneof=up down none"` +} + type VoteDTO struct { ID uint `json:"id"` UserID *uint `json:"user_id,omitempty"`