mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
remove not null tag from scenario users field and add semicolons
This commit is contained in:
parent
36dfda1ac0
commit
0e96f643e5
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ type User struct {
|
||||||
// Role of user
|
// Role of user
|
||||||
Role string `json:"role" gorm:"default:'user'"`
|
Role string `json:"role" gorm:"default:'user'"`
|
||||||
// Scenarios to which user has access
|
// Scenarios to which user has access
|
||||||
Scenarios []*Scenario `json:"-" gorm:"many2many:user_scenarios"`
|
Scenarios []*Scenario `json:"-" gorm:"many2many:user_scenarios;"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scenario data model
|
// Scenario data model
|
||||||
|
@ -40,7 +40,7 @@ type Scenario struct {
|
||||||
// Start parameters of scenario as JSON
|
// Start parameters of scenario as JSON
|
||||||
StartParameters postgres.Jsonb `json:"startParameters"`
|
StartParameters postgres.Jsonb `json:"startParameters"`
|
||||||
// Users that have access to the scenario
|
// Users that have access to the scenario
|
||||||
Users []*User `json:"-" gorm:"not null;many2many:user_scenarios"`
|
Users []*User `json:"-" gorm:"many2many:user_scenarios;"`
|
||||||
// SimulationModels that belong to the scenario
|
// SimulationModels that belong to the scenario
|
||||||
SimulationModels []SimulationModel `json:"-" gorm:"foreignkey:ScenarioID" `
|
SimulationModels []SimulationModel `json:"-" gorm:"foreignkey:ScenarioID" `
|
||||||
// Dashboards that belong to the Scenario
|
// Dashboards that belong to the Scenario
|
||||||
|
|
Loading…
Add table
Reference in a new issue