Browse Source

Fix references

master
parent
commit
d34833d192
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 2
      server/models/role.go
  2. 4
      server/models/user.go

2
server/models/role.go

@ -5,5 +5,5 @@ import "gorm.io/gorm"
type Role struct {
gorm.Model
Name string
Users []User
Users []*User `gorm:"many2many:user_roles;"`
}

4
server/models/user.go

@ -7,6 +7,6 @@ type User struct {
UUID string
Email string
Password string
Roles []Role
Sessions []Session
Roles []*Role `gorm:"many2many:user_roles;"`
Sessions []*Session
}
Loading…
Cancel
Save