mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
30 lines
771 B
Dart
30 lines
771 B
Dart
import 'package:equatable/equatable.dart';
|
|
|
|
class OccupancyHeatMapModel extends Equatable {
|
|
final String uuid;
|
|
|
|
final DateTime eventDate;
|
|
|
|
final int countTotalPresenceDetected;
|
|
|
|
const OccupancyHeatMapModel({
|
|
required this.uuid,
|
|
required this.eventDate,
|
|
required this.countTotalPresenceDetected,
|
|
});
|
|
|
|
factory OccupancyHeatMapModel.fromJson(Map<String, dynamic> json) {
|
|
return OccupancyHeatMapModel(
|
|
uuid: json['uuid'] as String? ?? '',
|
|
eventDate: DateTime.parse(
|
|
json['event_date'] as String? ?? '${DateTime.now()}',
|
|
),
|
|
countTotalPresenceDetected:
|
|
json['count_total_presence_detected'] as int? ?? 0,
|
|
);
|
|
}
|
|
|
|
@override
|
|
List<Object?> get props => [uuid, eventDate, countTotalPresenceDetected];
|
|
}
|