2023-11-01 16:52:03 +08:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import "joylink.club/rtsssimulation/repository/model/proto"
|
|
|
|
|
|
|
|
type Platform struct {
|
|
|
|
Identity
|
2024-06-26 17:27:47 +08:00
|
|
|
code string
|
|
|
|
station *Station
|
|
|
|
section *PhysicalSection
|
|
|
|
componentGroups []*ElectronicComponentGroup
|
2023-11-01 16:52:03 +08:00
|
|
|
}
|
|
|
|
|
2023-11-07 14:30:07 +08:00
|
|
|
func NewPlatform(id string, code string) *Platform {
|
|
|
|
return &Platform{
|
|
|
|
Identity: identity{
|
|
|
|
id: id,
|
|
|
|
deviceType: proto.DeviceType_DeviceType_Platform,
|
|
|
|
},
|
|
|
|
code: code,
|
|
|
|
}
|
2023-11-01 16:52:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Platform) Code() string {
|
|
|
|
return p.code
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Platform) Station() *Station {
|
|
|
|
return p.station
|
|
|
|
}
|
2023-12-29 17:58:39 +08:00
|
|
|
|
|
|
|
func (p *Platform) Section() *PhysicalSection {
|
|
|
|
return p.section
|
|
|
|
}
|
2024-06-26 17:27:47 +08:00
|
|
|
|
|
|
|
func (p *Platform) ComponentGroups() []*ElectronicComponentGroup {
|
|
|
|
return p.componentGroups
|
|
|
|
}
|