modelRT/orm/circuit_diagram_component.go

30 lines
1004 B
Go
Raw Normal View History

// Package orm define database data struct
package orm
import (
"github.com/gofrs/uuid"
)
// Component structure define abstracted info set of electrical component
type Component struct {
ID int64 `gorm:"column:id"`
GlobalUUID uuid.UUID `gorm:"column:global_uuid"`
GridID int64 `gorm:"column:grid"`
ZoneID int64 `gorm:"column:zone"`
StationID int64 `gorm:"column:station"`
ComponentType int `gorm:"column:type"`
State int `gorm:"column:state"`
ConnectedBus int `gorm:"column:connected_bus"`
Name string `gorm:"column:name"`
VisibleID string `gorm:"column:visible_id"`
Description string `gorm:"column:description"`
Context string `gorm:"column:context"`
Comment string `gorm:"column:comment"`
InService bool `gorm:"column:in_service"`
}
// TableName func respresent return table name of Component
func (c *Component) TableName() string {
return "Component"
}