rts-sim-module/repository/button.go
2023-10-12 13:47:57 +08:00

21 lines
420 B
Go

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,
}
}
func (btn *Button) GetBtnType() proto.Button_ButtonType {
return btn.buttonType
}