Update UI result
This commit is contained in:
@@ -24,17 +24,17 @@ type UpdateVoteEventRequest struct {
|
||||
}
|
||||
|
||||
type VoteEventResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
StartDate time.Time `json:"start_date"`
|
||||
EndDate time.Time `json:"end_date"`
|
||||
IsActive bool `json:"is_active"`
|
||||
ResultsOpen bool `json:"results_open"`
|
||||
IsVotingOpen bool `json:"is_voting_open"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Candidates []CandidateResponse `json:"candidates,omitempty"`
|
||||
ID uuid.UUID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
StartDate time.Time `json:"start_date"`
|
||||
EndDate time.Time `json:"end_date"`
|
||||
IsActive bool `json:"is_active"`
|
||||
ResultsOpen bool `json:"results_open"`
|
||||
IsVotingOpen bool `json:"is_voting_open"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Candidates []CandidateResponse `json:"candidates,omitempty"`
|
||||
}
|
||||
|
||||
type ListVoteEventsRequest struct {
|
||||
@@ -90,7 +90,29 @@ type CandidateWithVotesResponse struct {
|
||||
}
|
||||
|
||||
type CheckVoteStatusResponse struct {
|
||||
HasVoted bool `json:"has_voted"`
|
||||
HasVoted bool `json:"has_voted"`
|
||||
VotedAt *time.Time `json:"voted_at,omitempty"`
|
||||
CandidateID *uuid.UUID `json:"candidate_id,omitempty"`
|
||||
}
|
||||
}
|
||||
|
||||
type VoteEventDetailsResponse struct {
|
||||
VoteEvent VoteEventResponse `json:"vote_event"`
|
||||
TotalParticipants int64 `json:"total_participants"`
|
||||
TotalVoted int64 `json:"total_voted"`
|
||||
TotalNotVoted int64 `json:"total_not_voted"`
|
||||
}
|
||||
|
||||
type UserVoteInfo struct {
|
||||
UserID uuid.UUID `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
FullName string `json:"full_name"`
|
||||
VotedAt time.Time `json:"voted_at"`
|
||||
CandidateID uuid.UUID `json:"candidate_id"`
|
||||
CandidateName string `json:"candidate_name"`
|
||||
}
|
||||
|
||||
type UserBasicInfo struct {
|
||||
UserID uuid.UUID `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
FullName string `json:"full_name"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user