modelRT/orm/circuit_diagram_grid.go

32 lines
808 B
Go
Raw Permalink Normal View History

2025-07-31 16:52:21 +08:00
// Package orm define database data struct
package orm
import (
"time"
)
// Grid structure define abstracted info set of electrical grid
type Grid struct {
2025-11-19 17:44:08 +08:00
ID int64 `gorm:"column:id;primaryKey"`
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"`
2025-07-31 16:52:21 +08:00
}
// TableName func respresent return table name of Grid
func (g *Grid) TableName() string {
2025-11-19 17:44:08 +08:00
return "grid"
2025-07-31 16:52:21 +08:00
}
2025-12-10 16:12:13 +08:00
// GetTagName define func to inplement CircuitDiagramNodeInterface interface
func (g Grid) GetTagName() string {
return g.TAGNAME
}
// GetNSPath define func to inplement CircuitDiagramNodeInterface interface
func (g Grid) GetNSPath() string {
return ""
}