2023-09-06 16:20:36 +08:00
|
|
|
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
|
2023-09-06 16:20:36 +08:00
|
|
|
Type() proto.DeviceType
|
2023-08-29 14:59:31 +08:00
|
|
|
}
|
|
|
|
|
2023-08-29 18:01:32 +08:00
|
|
|
// 身份信息
|
|
|
|
type identity struct {
|
2023-09-06 16:20:36 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2023-09-06 16:20:36 +08:00
|
|
|
func (m identity) Type() proto.DeviceType {
|
|
|
|
return m.deviceType
|
2023-08-29 14:59:31 +08:00
|
|
|
}
|