Initial structure for the votes

This commit is contained in:
2025-10-31 12:52:38 -04:00
parent a52e73a295
commit 47310997ec
5 changed files with 147 additions and 0 deletions

6
server/models/members.go Normal file
View File

@@ -0,0 +1,6 @@
package models
type Members struct {
Name string `json:"name"`
Email string `json:"email"`
}

11
server/models/poll.go Normal file
View File

@@ -0,0 +1,11 @@
package models
type Poll struct {
ID int `json:"id"`
Question string `json:"Question"`
Options []string `json:"options"`
TotalVotes int `json:"total_votes"`
WhoVoted []string `json:"who_voted"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}

7
server/models/vote.go Normal file
View File

@@ -0,0 +1,7 @@
package models
type Vote struct {
PollID int `json:"poll_id"`
OptionIndex int `json:"option_index"`
IsMember bool `json:"is_member"`
}