modelRT/orm/circuit_diagram_component.go

30 lines
898 B
Go

// Package orm define database data struct
package orm
import (
"time"
"github.com/gofrs/uuid"
)
// Component structure define abstracted info set of electrical component
type Component struct {
ID int64 `gorm:"column:id;primaryKey"`
GlobalUUID uuid.UUID `gorm:"column:global_uuid"`
Tag string `gorm:"column:tag"`
GridID string `gorm:"column:grid"`
ZoneID string `gorm:"column:zone"`
StationID string `gorm:"column:station"`
PageID int64 `gorm:"column:page_id"`
ComponentType int `gorm:"column:type"`
Name string `gorm:"column:name"`
Context string `gorm:"column:context"`
Op int `gorm:"column:op"`
Ts time.Time `gorm:"column:ts"`
}
// TableName func respresent return table name of Component
func (c *Component) TableName() string {
return "component"
}