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