2025-07-31 16:52:21 +08:00
|
|
|
// 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"`
|
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"`
|
|
|
|
|
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"
|
|
|
|
|
}
|