mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
35 lines
742 B
Dart
35 lines
742 B
Dart
import 'dart:convert';
|
|
|
|
class ScenesModel {
|
|
final String id;
|
|
final String name;
|
|
final String status;
|
|
final String type;
|
|
|
|
ScenesModel({
|
|
required this.id,
|
|
required this.name,
|
|
required this.status,
|
|
required this.type,
|
|
});
|
|
|
|
factory ScenesModel.fromRawJson(String str) =>
|
|
ScenesModel.fromJson(json.decode(str));
|
|
|
|
String toRawJson() => json.encode(toJson());
|
|
|
|
factory ScenesModel.fromJson(Map<String, dynamic> json) => ScenesModel(
|
|
id: json["id"],
|
|
name: json["name"] ?? '',
|
|
status: json["status"] ?? '',
|
|
type: json["type"] ?? '',
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"name": name,
|
|
"status": status,
|
|
"type": type,
|
|
};
|
|
}
|