mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
dev day #69
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user