Files
syncrow-app/lib/features/devices/model/device_control_model.dart
2024-03-14 00:38:00 +03:00

28 lines
514 B
Dart

class DeviceControlModel {
String? deviceId;
String? code;
bool? value;
DeviceControlModel({
required this.deviceId,
required this.code,
required this.value,
});
factory DeviceControlModel.fromJson(Map<String, dynamic> json) {
return DeviceControlModel(
deviceId: json['deviceId'],
code: json['code'],
value: json['value'],
);
}
Map<String, dynamic> toJson() {
return {
'deviceId': deviceId,
'code': code,
'value': value,
};
}
}