import 'package:agrilink_vocpro/data/model/latest_data_response.dart';

class DhtGraphicResponse {
  DataDht? data;
  int? statusCode;
  String? message;

  DhtGraphicResponse({this.data, this.statusCode, this.message});

  DhtGraphicResponse.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? DataDht.fromJson(json['data']) : null;
    statusCode = json['statusCode'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['statusCode'] = statusCode;
    data['message'] = message;
    return data;
  }
}

class DataDht {
  List<Dht>? dht;

  DataDht({this.dht});

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

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