Documentation
¶
Overview ¶
Package user defines the database entities for usersb
Index ¶
Constants ¶
View Source
const ( // User can just use images and change their own image User UserRole = "user" // Moderator can change or upload system images Moderator = "moderator" // Admin can do anything on the system Admin = "admin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserModel ¶
type UserModel struct { // Name is a human-readable identifier for a user (or entity) of the system Username string `gorm:"unique;not null;primaryKey"` Name string `gorm:"not null"` Email string `gorm:"unique;not null"` Role UserRole `gorm:"not null;"` Images []images2.ImageModel `json:"-" gorm:"foreignKey:Username;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Setups []images2.ImageSetup `json:"-" gorm:"foreignKey:Username;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` }
UserModel (noun) one who uses, not necessarily a single person nolint: golint
Click to show internal directories.
Click to hide internal directories.