25 lines
454 B
Go
25 lines
454 B
Go
package model
|
|
|
|
import (
|
|
"joylink.club/rtsssimulation/components/cstate"
|
|
"joylink.club/rtsssimulation/umi"
|
|
)
|
|
|
|
// 设备模型基础信息
|
|
type DeviceModel struct {
|
|
// 设备id
|
|
Id string
|
|
// 设备类型
|
|
Type cstate.DeviceType
|
|
}
|
|
|
|
func (me *DeviceModel) GetId() string {
|
|
return me.Id
|
|
}
|
|
func (me *DeviceModel) IsSame(other umi.IDeviceModel) bool {
|
|
return me.Id == other.GetId()
|
|
}
|
|
func (me *DeviceModel) GetType() cstate.DeviceType {
|
|
return me.Type
|
|
}
|