fix removing workspace from users

This commit is contained in:
Adrian Zürcher
2026-02-17 17:47:36 +01:00
parent 9dc6c217fa
commit 6e3df3ffa0
2 changed files with 20 additions and 10 deletions

View File

@@ -3,9 +3,9 @@ package models
import "github.com/google/uuid"
type Workspace struct {
Id uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"column:name" json:"name"`
Description string `gorm:"type:json" json:"description"`
Uuid uuid.UUID `gorm:"type:text" json:"uuid"`
Users []*User `gorm:"many2many:users_workspaces;" `
Id uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"column:name" json:"name"`
Description string `gorm:"type:json" json:"description"`
Uuid *uuid.UUID `gorm:"type:text" json:"uuid,omitempty"`
Users []*User `gorm:"many2many:users_workspaces;" `
}