Files
syncrow-app/lib/features/devices/model/device_control_model.dart
2024-05-20 02:40:50 +03:00

28 lines
523 B
Dart

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