mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
39 lines
948 B
Dart
39 lines
948 B
Dart
import 'dart:convert';
|
|
|
|
class AutomationStatusUpdate {
|
|
final String spaceUuid;
|
|
final bool isEnable;
|
|
|
|
AutomationStatusUpdate({
|
|
required this.spaceUuid,
|
|
required this.isEnable,
|
|
});
|
|
|
|
factory AutomationStatusUpdate.fromRawJson(String str) =>
|
|
AutomationStatusUpdate.fromJson(json.decode(str));
|
|
|
|
String toRawJson() => json.encode(toJson());
|
|
|
|
factory AutomationStatusUpdate.fromJson(Map<String, dynamic> json) =>
|
|
AutomationStatusUpdate(
|
|
spaceUuid: json["spaceUuid"],
|
|
isEnable: json["isEnable"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"spaceUuid": spaceUuid,
|
|
"isEnable": isEnable,
|
|
};
|
|
|
|
factory AutomationStatusUpdate.fromMap(Map<String, dynamic> map) =>
|
|
AutomationStatusUpdate(
|
|
spaceUuid: map["spaceUuid"],
|
|
isEnable: map["isEnable"],
|
|
);
|
|
|
|
Map<String, dynamic> toMap() => {
|
|
"spaceUuid": spaceUuid,
|
|
"isEnable": isEnable,
|
|
};
|
|
}
|