Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Role ¶
type Role struct { gorm.Model Name string `gorm:"unique;not null"` Permissions []Permission `gorm:"many2many:role_permissions;constraint:OnDelete:CASCADE"` }
type User ¶
type User struct { gorm.Model RoleID uint `gorm:"not null"` NationalID string `gorm:"unique;not null"` Email string `gorm:"unique;not null"` PasswordHash string `gorm:"not null"` FirstName string LastName string DateOfBirth time.Time City string WalletBalance float64 `gorm:"default:0"` GlobalRole Role `gorm:"foreignKey:RoleID;references:ID;constraint:OnDelete:CASCADE;"` }
type UserSurveyRole ¶
type VoteVisibility ¶
type VoteVisibility struct { ID uint SurveyID uint `gorm:"not null"` ViewerID uint `gorm:"not null"` // User allowed to view votes RespondentID uint `gorm:"not null"` // User whose votes can be viewed Viewer User `gorm:"foreignKey:ViewerID;constraint:OnDelete:CASCADE;"` Respondent User `gorm:"foreignKey:RespondentID;constraint:OnDelete:CASCADE;"` }
Click to show internal directories.
Click to hide internal directories.