class GetEnergyConsumptionPerDeviceParam {
  const GetEnergyConsumptionPerDeviceParam({
    this.monthDate,
    this.spaceId,
  });

  final DateTime? monthDate;
  final String? spaceId;

  Map<String, dynamic> toJson() => {
        'monthDate':
            '${monthDate?.year}-${monthDate?.month.toString().padLeft(2, '0')}',
        if (spaceId != null) 'spaceUuid': spaceId,
        'groupByDevice': true,
      };
}
