[新增]区段、Link、运营方向/位置之间互相转换的函数

This commit is contained in:
thesai 2024-05-16 21:19:52 +08:00
parent 90003ec942
commit a613ac109b

View File

@ -1,6 +1,7 @@
package repository
import (
"fmt"
"joylink.club/rtsssimulation/repository/model/proto"
)
@ -145,6 +146,10 @@ func (l *LinkPosition) Offset() int64 {
return l.offset
}
func (l *LinkPosition) String() string {
return fmt.Sprintf("[LinkPosition:{%s-%d]", l.link.Id(), l.offset)
}
// link端口
type LinkPort struct {
link *Link