2023-12-27 09:15:26 +08:00
|
|
|
package impl
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/rtsssimulation/repo/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 {
|
2023-12-27 15:51:28 +08:00
|
|
|
return model.ModelType_Section
|
2023-12-27 09:15:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *PhysicalSection) Code() string {
|
|
|
|
return s.code
|
|
|
|
}
|