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.

16 lines
432 B

1 month ago
package model
1 month ago
import (
"gofaster/internal/shared/model"
)
1 month ago
type User struct {
1 month ago
model.BaseModel
1 month ago
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"`
}