initial setup
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package db
|
||||
|
||||
type UserStatus uint8
|
||||
|
||||
const (
|
||||
UserStatusPending UserStatus = iota
|
||||
UserStatusActive
|
||||
UserStatusSuspended
|
||||
UserStatusInactive
|
||||
)
|
||||
|
||||
type User struct {
|
||||
Base
|
||||
|
||||
Name string
|
||||
Email string
|
||||
PasswordHash string
|
||||
Roles []Role `gorm:"many2many:user_roles"`
|
||||
}
|
||||
|
||||
type Role struct {
|
||||
Base
|
||||
|
||||
Name string
|
||||
Domain string
|
||||
Description string
|
||||
}
|
||||
Reference in New Issue
Block a user