mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00

- Only Simulator model is used - The postgres Array type is provided by lib/pq - The default empty string is fixed
19 lines
521 B
Go
19 lines
521 B
Go
package simulator
|
|
|
|
import (
|
|
"github.com/jinzhu/gorm"
|
|
"github.com/lib/pq"
|
|
"time"
|
|
)
|
|
|
|
type Simulator struct {
|
|
gorm.Model
|
|
UUID string `gorm:"unique;not null"`
|
|
Host string `gorm:"default:''"`
|
|
Modeltype string `gorm:"default:''"`
|
|
Uptime int `gorm:"default:0"`
|
|
State string `gorm:"default:''"`
|
|
StateUpdateAt time.Time
|
|
Properties pq.StringArray `gorm:"type:varchar(128)[]"` // TODO: mixed type
|
|
RawProperties pq.StringArray `gorm:"type:varchar(128)[]"` // TODO: mixed type
|
|
}
|