mirror of
https://github.com/chenasraf/pantry-flutter.git
synced 2026-05-17 17:28:03 +00:00
30 lines
711 B
Dart
30 lines
711 B
Dart
class House {
|
|
final int id;
|
|
final String name;
|
|
final String? description;
|
|
final String ownerUid;
|
|
final String role;
|
|
final int createdAt;
|
|
final int updatedAt;
|
|
|
|
const House({
|
|
required this.id,
|
|
required this.name,
|
|
this.description,
|
|
required this.ownerUid,
|
|
required this.role,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
|
|
factory House.fromJson(Map<String, dynamic> json) => House(
|
|
id: json['id'] as int,
|
|
name: json['name'] as String,
|
|
description: json['description'] as String?,
|
|
ownerUid: json['ownerUid'] as String,
|
|
role: json['role'] as String,
|
|
createdAt: json['createdAt'] as int,
|
|
updatedAt: json['updatedAt'] as int,
|
|
);
|
|
}
|