class DisplayModel {
  late List<BelumDilayani> belumDilayani;
  late List<SedangDilayani> sedangDilayani;

  DisplayModel({
    required this.belumDilayani, 
    required this.sedangDilayani
  });

  DisplayModel.fromJson(Map<String, dynamic> json) {
    if (json['belumDilayani'] != null) {
      belumDilayani =  [];
      json['belumDilayani'].forEach((v) {
        belumDilayani.add(BelumDilayani.fromJson(v));
      });
    }
    if (json['sedangDilayani'] != null) {
      sedangDilayani = [];
      json['sedangDilayani'].forEach((v) {
        sedangDilayani.add(SedangDilayani.fromJson(v));
      });
    }
  }

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

class BelumDilayani {
  late String queueID;
  late String statusID;
  late String queueNumber;
  late String serviceDoctorName;
  late String antrianSelanjutnya;
  late String orderStatus;

  BelumDilayani(
      {
        required this.queueID,
        required this.statusID,
        required this.queueNumber,
        required this.serviceDoctorName,
        required this.antrianSelanjutnya,
        required this.orderStatus
      });

  BelumDilayani.fromJson(Map<String, dynamic> json) {
    queueID = json['queueID'];
    statusID = json['statusID'];
    queueNumber = json['queueNumber'];
    serviceDoctorName = json['serviceDoctorName'];
    antrianSelanjutnya = json['antrian_selanjutnya'];
    orderStatus = json['order_status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['queueID'] = this.queueID;
    data['statusID'] = this.statusID;
    data['queueNumber'] = this.queueNumber;
    data['serviceDoctorName'] = this.serviceDoctorName;
    data['antrian_selanjutnya'] = this.antrianSelanjutnya;
    data['order_status'] = this.orderStatus;
    return data;
  }
}

class SedangDilayani {
  late String queueID;
  late String queueNumber;
  late String serviceDoctorName;
  late String antrianSelanjutnya;
  late String orderStatus;

  SedangDilayani(
      {
        required this.queueID,
        required this.queueNumber,
        required this.serviceDoctorName,
        required this.antrianSelanjutnya,
        required this.orderStatus
      });

  SedangDilayani.fromJson(Map<String, dynamic> json) {
    queueID = json['queueID'];
    queueNumber = json['queueNumber'];
    serviceDoctorName = json['serviceDoctorName'];
    antrianSelanjutnya = json['antrian_selanjutnya'];
    orderStatus = json['order_status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['queueID'] = this.queueID;
    data['queueNumber'] = this.queueNumber;
    data['serviceDoctorName'] = this.serviceDoctorName;
    data['antrian_selanjutnya'] = this.antrianSelanjutnya;
    data['order_status'] = this.orderStatus;
    return data;
  }
}