mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
Formating using Gofmt with local tab=4*stops
This commit is contained in:
parent
608e772c9b
commit
ae0f729a55
2 changed files with 79 additions and 79 deletions
|
@ -26,10 +26,10 @@ func StartDB() {
|
|||
db.AutoMigrate(&Simulator{})
|
||||
db.AutoMigrate(&Signal{})
|
||||
db.AutoMigrate(&SimulationModel{})
|
||||
//db.AutoMigrate(&File{})
|
||||
db.AutoMigrate(&File{})
|
||||
db.AutoMigrate(&Project{})
|
||||
db.AutoMigrate(&Simulation{})
|
||||
//db.AutoMigrate(&User{})
|
||||
db.AutoMigrate(&User{})
|
||||
db.AutoMigrate(&Visualization{})
|
||||
db.AutoMigrate(&Signal{})
|
||||
db.AutoMigrate(&Widget{})
|
||||
|
|
|
@ -36,20 +36,20 @@ type Project struct {
|
|||
Name string `gorm:"not null"`
|
||||
User User `gorm:"not null"`
|
||||
UserID uint `gorm:"not null"`
|
||||
Visualizations []Visualization
|
||||
Simulation Simulation `gorm:"not null"`
|
||||
SimulationID uint `gorm:"not null"`
|
||||
Visualizations []Visualization
|
||||
}
|
||||
|
||||
type Simulation struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"not null"`
|
||||
Running bool `gorm:"default:false"`
|
||||
Models []SimulationModel `gorm:"foreignkey:BelongsToSimulationID"`
|
||||
Projects []Project
|
||||
User User `gorm:"not null"`
|
||||
UserID uint `gorm:"not null"`
|
||||
StartParameters postgres.Jsonb // TODO default value
|
||||
Models []SimulationModel `gorm:"foreignkey:BelongsToSimulationID"`
|
||||
Projects []Project
|
||||
}
|
||||
|
||||
type SimulationModel struct {
|
||||
|
@ -70,7 +70,7 @@ type User struct {
|
|||
gorm.Model
|
||||
Username string `gorm:"unique;not null"`
|
||||
Password string `gorm:"not null"`
|
||||
Mail string `gorm:"default:"`
|
||||
Mail string `gorm:"default:''"`
|
||||
Role string `gorm:"default:'user'"`
|
||||
Projects []Project
|
||||
Simulations []Simulation
|
||||
|
@ -82,10 +82,10 @@ type Visualization struct {
|
|||
Name string `gorm:"not null"`
|
||||
Project Project `gorm:"not null"`
|
||||
ProjectID uint `gorm:"not null"`
|
||||
Widgets []Widget
|
||||
Grid int `gorm:"default:15"`
|
||||
VisualizationUser User `gorm:"not null"`
|
||||
VisualizationUserID uint `gorm:"not null"`
|
||||
Widgets []Widget
|
||||
}
|
||||
|
||||
type Signal struct {
|
||||
|
|
Loading…
Add table
Reference in a new issue