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

class Npk2GraphicResponse {
  DataNpk2? data;
  int? statusCode;
  String? message;

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

  Npk2GraphicResponse.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? DataNpk2.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 DataNpk2 {
  List<Npk>? npk2;

  DataNpk2({this.npk2});

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

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