// Package orm define database data struct package orm import ( "time" ) // Zone structure define abstracted info set of electrical zone type Zone struct { ID int64 `gorm:"column:id;primaryKey"` GridID int64 `gorm:"column:grid_id"` TAGNAME string `gorm:"column:tagname"` Name string `gorm:"column:name"` Description string `gorm:"column:description"` Op int `gorm:"column:op"` Ts time.Time `gorm:"column:ts"` } // TableName func respresent return table name of Zone func (z *Zone) TableName() string { return "zone" }