Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrations ¶
func AutoMigrations(db *Database)
AutoMigrations func automate database schema migrations
Types ¶
type Sensor ¶
type Sensor struct { gorm.Model // ID uint32 `gorm:"primary_key;auto_increment" json:"id"` Name string `gorm:"type:varchar(20);unique_index" json:"name"` Type string `gorm:"type:varchar(40);not null;unique_index" json:"type"` }
Sensor struct
func (*Sensor) UpdateSensor ¶
UpdateSensor update sensor name
Click to show internal directories.
Click to hide internal directories.