mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
28 lines
538 B
Dart
28 lines
538 B
Dart
class Community {
|
|
final String uuid;
|
|
final String name;
|
|
final String description;
|
|
|
|
Community({
|
|
required this.uuid,
|
|
required this.name,
|
|
this.description = '',
|
|
});
|
|
|
|
factory Community.fromJson(Map<String, dynamic> json) {
|
|
return Community(
|
|
uuid: json['uuid'] ?? '',
|
|
name: json['name'] ?? 'Unnamed Community',
|
|
description: json['description'] ?? '',
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'uuid': uuid,
|
|
'name': name,
|
|
'description': description,
|
|
};
|
|
}
|
|
}
|