mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-19 04:39:29 +00:00
feat: add user groups
This commit is contained in:
@@ -15,6 +15,7 @@ type User struct {
|
||||
LastName string
|
||||
IsAdmin bool
|
||||
|
||||
UserGroups []UserGroup `gorm:"many2many:user_groups_users;"`
|
||||
Credentials []WebauthnCredential
|
||||
}
|
||||
|
||||
|
||||
8
backend/internal/model/user_group.go
Normal file
8
backend/internal/model/user_group.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package model
|
||||
|
||||
type UserGroup struct {
|
||||
Base
|
||||
FriendlyName string
|
||||
Name string `gorm:"unique"`
|
||||
Users []User `gorm:"many2many:user_groups_users;"`
|
||||
}
|
||||
Reference in New Issue
Block a user