class ReportModel {
  List<Report>? report;

  ReportModel({this.report});

  ReportModel.fromJson(Map<String, dynamic> json) {
    if (json['report'] != null) {
      report = <Report>[];
      json['report'].forEach((v) {
        report!.add(Report.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (report != null) {
      data['report'] = report!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Report {
  String? date;
  int? messagesCount;
  int? coinUsage;

  Report({this.date, this.messagesCount, this.coinUsage});

  Report.fromJson(Map<String, dynamic> json) {
    date = json['date'] ?? json['hour'] ?? json['bot_name'];
    messagesCount = json['messages_count'];
    coinUsage = json['coin_usage'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['date'] = date;
    data['messages_count'] = messagesCount;
    data['coin_usage'] = coinUsage;
    return data;
  }
}
