add user role
This commit is contained in:
@@ -42,6 +42,7 @@ func (p *Permissions) Scan(value interface{}) error {
|
||||
type User struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
|
||||
Name string `gorm:"not null;size:255" json:"name" validate:"required,min=1,max=255"`
|
||||
Username string `gorm:"not null;size:255" json:"username" validate:"required,min=1,max=255"`
|
||||
Email string `gorm:"uniqueIndex;not null;size:255" json:"email" validate:"required,email"`
|
||||
PasswordHash string `gorm:"not null;size:255" json:"-"`
|
||||
IsActive bool `gorm:"default:true" json:"is_active"`
|
||||
|
||||
Reference in New Issue
Block a user