34 lines
629 B
Go
34 lines
629 B
Go
|
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 {
|
||
|
return model.MT_Section
|
||
|
}
|
||
|
|
||
|
func (s *PhysicalSection) Code() string {
|
||
|
return s.code
|
||
|
}
|