modelRT/orm/circuit_diagram_zone.go

23 lines
596 B
Go
Raw Normal View History

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 {
2025-11-19 17:44:08 +08:00
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"`
2025-07-31 16:52:21 +08:00
}
// TableName func respresent return table name of Zone
func (z *Zone) TableName() string {
2025-11-19 17:44:08 +08:00
return "zone"
2025-07-31 16:52:21 +08:00
}