change user db structure for workspaces

This commit is contained in:
Adrian Zürcher
2026-02-20 18:31:26 +01:00
parent 5b1488e347
commit f4b00ba297
4 changed files with 22 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ type User struct {
Expiration string `gorm:"column:expiration" json:"expiration,omitempty"`
Settings Settings `gorm:"type:json" json:"settings"`
Workspaces []*Workspace `gorm:"many2many:users_workspaces;" json:"workspaces"`
WorkspaceID *uint `gorm:"column:workspaceId" json:"workspaceId,omitempty"`
}
func (u *User) IsValid() bool {