rts-sim-module/repository/platform.go
2024-06-26 17:27:47 +08:00

38 lines
715 B
Go

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Platform struct {
Identity
code string
station *Station
section *PhysicalSection
componentGroups []*ElectronicComponentGroup
}
func NewPlatform(id string, code string) *Platform {
return &Platform{
Identity: identity{
id: id,
deviceType: proto.DeviceType_DeviceType_Platform,
},
code: code,
}
}
func (p *Platform) Code() string {
return p.code
}
func (p *Platform) Station() *Station {
return p.station
}
func (p *Platform) Section() *PhysicalSection {
return p.section
}
func (p *Platform) ComponentGroups() []*ElectronicComponentGroup {
return p.componentGroups
}