class StatisticRecord {
  final String name;
  final String urlTemplate;
  final double start;
  final double delay;
  final int count;
  final String method;
  final String? body;

  StatisticRecord({required this.name, required this.urlTemplate, required this.start, required this.delay, required this.count, required this.method, this.body});

  factory StatisticRecord.fromJson(dynamic data) {
    return StatisticRecord(
        name: data['name'],
        urlTemplate: data['url_template'],
        start: data['start'] == null ? 0.0 : data['start'].toDouble(),
        delay: data['delay'] == null ? 0.0 : data['delay'].toDouble(),
        count: data['count'],
        method: data['method'],
        body: data['body'],
    );
  }
}