2025-07-31 16:52:21 +08:00
|
|
|
// 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"`
|
2025-08-26 17:09:49 +08:00
|
|
|
TAGNAME string `gorm:"column:TAGNAME"`
|
2025-07-31 16:52:21 +08:00
|
|
|
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"
|
|
|
|
|
}
|