mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
19 lines
417 B
Dart
19 lines
417 B
Dart
class GetTotalEnergyConsumptionParam {
|
|
final DateTime? monthDate;
|
|
final String? spaceId;
|
|
|
|
const GetTotalEnergyConsumptionParam({
|
|
this.monthDate,
|
|
this.spaceId,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'monthDate':
|
|
'${monthDate?.year}-${monthDate?.month.toString().padLeft(2, '0')}',
|
|
if (spaceId != null) 'spaceUuid': spaceId,
|
|
'groupByDevice': false,
|
|
};
|
|
}
|
|
}
|