rts-sim-module/repository/model.go

24 lines
369 B
Go
Raw Normal View History

package repository
2023-08-29 14:59:31 +08:00
import "joylink.club/rtsssimulation/repository/model/proto"
2023-08-29 18:01:32 +08:00
// 身份信息
type Identity interface {
2023-08-29 14:59:31 +08:00
Id() string
Type() proto.DeviceType
2023-08-29 14:59:31 +08:00
}
2023-08-29 18:01:32 +08:00
// 身份信息
type identity struct {
id string
deviceType proto.DeviceType
2023-08-29 14:59:31 +08:00
}
2023-08-29 18:01:32 +08:00
func (m identity) Id() string {
2023-08-29 14:59:31 +08:00
return m.id
}
func (m identity) Type() proto.DeviceType {
return m.deviceType
2023-08-29 14:59:31 +08:00
}