Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUserRole = []UserRole{
{ID: 1, Code: 1, Name: "管理者", Permission: "{}"},
{ID: 2, Code: 999, Name: "一般使用者", Permission: "{}"},
}
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
gorm.Model
Account string
Password string
Name string
Email string
UserRoleID uint `gorm:"index:users_user_roles_id_idx"`
UserRole UserRole `gorm:"constraint:OnUpdate:SET NULL,OnDelete:SET NULL;"`
}
func (*User) GetResponse ¶
func (u *User) GetResponse() response.UserResponseListItem
Click to show internal directories.
Click to hide internal directories.