// Package orm define database data struct package orm import ( "time" ) // Station structure define abstracted info set of electrical Station type Station struct { ID int64 `gorm:"column:ID;primaryKey"` ZoneID int64 `gorm:"column:ZONE_ID"` TAGNAME string `gorm:"column:TAGNAME"` Name string `gorm:"column:NAME"` Description string `gorm:"column:DESCRIPTION"` IsLocal bool `gorm:"column:IS_LOCAL"` Op int `gorm:"column:OP"` Ts time.Time `gorm:"column:TS"` } // TableName func respresent return table name of Station func (s *Station) TableName() string { return "STATION" }