34 lines
643 B
Go
34 lines
643 B
Go
package modelimpl
|
|
|
|
import (
|
|
"joylink.club/rtsssimulation/cgrepo/model"
|
|
)
|
|
|
|
type PhysicalSection struct {
|
|
uid string
|
|
code string
|
|
|
|
apSection model.Model // A端关联区段/道岔
|
|
bpSection model.Model // B端关联区段/道岔
|
|
linkRanges []*LinkRange // 所属link范围(道岔物理区段为多个)
|
|
}
|
|
|
|
func NewPhysicalSection(uid string, code string) *PhysicalSection {
|
|
return &PhysicalSection{
|
|
uid: uid,
|
|
code: code,
|
|
}
|
|
}
|
|
|
|
func (s *PhysicalSection) Uid() string {
|
|
return s.uid
|
|
}
|
|
|
|
func (s *PhysicalSection) Type() model.ModelType {
|
|
return model.ModelType_Section
|
|
}
|
|
|
|
func (s *PhysicalSection) Code() string {
|
|
return s.code
|
|
}
|