fully implement acl backend and interface
This commit is contained in:
7
internal/user/errors.go
Normal file
7
internal/user/errors.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package user
|
||||
|
||||
import "fmt"
|
||||
|
||||
var (
|
||||
ErrUserNotFound = fmt.Errorf("user not found")
|
||||
)
|
||||
@@ -5,10 +5,9 @@ import (
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
Password string `gorm:"not null"`
|
||||
//Roles []acl.Role `gorm:"many2many:user_roles"`
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
Password string `gorm:"not null"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user