import 'data.dart';

class StatisticData {
  final int id;
  final String label;
  final String title;
  final Data data;

  StatisticData({
    required this.id,
    required this.label,
    required this.title,
    required this.data,
  });

  factory StatisticData.fromJson(Map<String, dynamic> json) => StatisticData(
        id: json['id'],
        label: json['label'],
        title: json['title'],
        data: Data.fromJson(json['data']),
      );

  Map<String, dynamic> toJson() => {
        'id': id,
        'label': label,
        'title': title,
        'data': data.toJson(),
      };
}
