rts-sim-module/repository/button.go

21 lines
420 B
Go
Raw Normal View History

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Button struct {
Identity
buttonType proto.Button_ButtonType
}
func NewButton(id string, buttonType proto.Button_ButtonType) *Button {
return &Button{
Identity: identity{id, proto.DeviceType_DeviceType_Button},
buttonType: buttonType,
}
}
2023-10-12 13:47:57 +08:00
func (btn *Button) GetBtnType() proto.Button_ButtonType {
return btn.buttonType
}