You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
380 B
12 lines
380 B
1 month ago
|
package model
|
||
|
|
||
|
type User struct {
|
||
|
BaseModel
|
||
|
Username string `gorm:"uniqueIndex;size:50" json:"username"`
|
||
|
Password string `gorm:"size:100" json:"-"`
|
||
|
Email string `gorm:"size:100" json:"email"`
|
||
|
Phone string `gorm:"size:20" json:"phone"`
|
||
|
Status int `gorm:"default:1" json:"status"` // 1-正常 2-禁用
|
||
|
Roles []Role `gorm:"many2many:user_roles;" json:"roles"`
|
||
|
}
|