Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { models.Model Username string `gorm:"column:username;not null;unique_index:username" json:"username" form:"username"` Firstname string `gorm:"column:firstname;not null;" json:"firstname" form:"firstname"` Lastname string `gorm:"column:lastname;not null;" json:"lastname" form:"lastname"` Hash string `gorm:"column:hash;not null;" json:"hash"` Role UserRole `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
func (*User) BeforeCreate ¶
func (*User) BeforeUpdate ¶
type UserRole ¶
type UserRole struct { models.Model UserID uint64 `gorm:"column:user_id;unique_index:user_role;not null;" json:"user_id"` RoleName string `gorm:"column:role_name;not null;" json:"role_name"` }
func (*UserRole) BeforeCreate ¶
func (*UserRole) BeforeUpdate ¶
Click to show internal directories.
Click to hide internal directories.