This commit is contained in:
Tomas Dvorak
2025-10-23 22:26:50 +02:00
parent 63700eedb2
commit 70ea0c3c91
75 changed files with 3337 additions and 1160 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ type User struct {
Password string `gorm:"not null" json:"-"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Role string `gorm:"default:editor" json:"role"` // admin, editor
Role string `gorm:"default:fan" json:"role"` // admin, editor, fan
IsActive bool `gorm:"default:true"`
LastLogin *time.Time `json:"last_login,omitempty"`
}
+2
View File
@@ -66,6 +66,8 @@ type PollVote struct {
IPHash string `gorm:"size:64;index" json:"ip_hash"` // Hashed IP for duplicate prevention
UserAgent string `gorm:"size:500" json:"user_agent"`
SessionToken string `gorm:"size:100;index" json:"session_token"` // For guest vote tracking
VoterName string `gorm:"size:150" json:"voter_name"`
VoterEmail string `gorm:"size:200" json:"voter_email"`
CreatedAt time.Time `json:"created_at"`
}