class GetOrders {
  int? code;
  List<OrderDetails>? details;
  String? message;
  bool? status;

  GetOrders({this.code, this.details, this.message, this.status});

  GetOrders.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    if (json['details'] != null) {
      details = <OrderDetails>[];
      json['details'].forEach((v) {
        details!.add(new OrderDetails.fromJson(v));
      });
    }
    message = json['message'];
    status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    if (this.details != null) {
      data['details'] = this.details!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    data['status'] = this.status;
    return data;
  }
}

class OrderDetails {
  int? orderheaderid;
  int? applocationid;
  int? tenantid;
  int? partnerid;
  int? locationid;
  int? categoryid;
  int? subcategoryid;
  int? moduleid;
  int? configid;
  String? orderid;
  String? orderdate;
  String? deliverydate;
  String? orderstatus;
  int? itemcount;
  String? ordernotes;
  String? kms;
  String? actualkms;
  String? pending;
  String? processing;
  String? ready;
  String? cancelled;
  String? completed;
  String? assigned;
  String? accepted;
  String? picked;
  String? canceltime;
  String? delivered;
  String? assigntime;
  String? starttime;
  String? arrivaltime;
  String? pickuptime;
  String? deliverytime;
  int? deliverycharge;
  int? deliveryamt;
  int? customerid;
  String? pickupcustomer;
  String? pickupcontactno;
  int? pickuplocationid;
  String? pickupaddress;
  String? pickupsuburb;
  String? pickupcity;
  String? pickuplat;
  String? pickuplong;
  int? deliveryid;
  String? deliverycustomer;
  String? deliverycontactno;
  int? deliverylocationid;
  String? deliveryaddress;
  String? deliverysuburb;
  String? deliverylat;
  String? deliverylong;
  int? paymenttype;
  String? tenantname;
  String? tenanttoken;
  String? tenantsuburb;
  String? tenantcity;
  String? tenantcontactno;
  String? tenantpostcode;
  String? locationname;
  String? locationsuburb;
  String? locationcity;
  String? locationcontactno;
  String? rider;
  String? ridercontactno;
  int? smsdelivery;
  String? customertoken;
  String? ridertoken;

  OrderDetails(
      {this.orderheaderid,
        this.applocationid,
        this.tenantid,
        this.partnerid,
        this.locationid,
        this.categoryid,
        this.subcategoryid,
        this.moduleid,
        this.configid,
        this.orderid,
        this.orderdate,
        this.deliverydate,
        this.orderstatus,
        this.itemcount,
        this.ordernotes,
        this.kms,
        this.actualkms,
        this.pending,
        this.processing,
        this.ready,
        this.cancelled,
        this.completed,
        this.assigned,
        this.accepted,
        this.picked,
        this.canceltime,
        this.assigntime,
        this.starttime,
        this.arrivaltime,
        this.pickuptime,
        this.deliverytime,
        this.delivered,
        this.deliverycharge,
        this.deliveryamt,
        this.customerid,
        this.pickupcustomer,
        this.pickupcontactno,
        this.pickuplocationid,
        this.pickupaddress,
        this.pickupsuburb,
        this.pickupcity,
        this.pickuplat,
        this.pickuplong,
        this.deliveryid,
        this.deliverycustomer,
        this.deliverycontactno,
        this.deliverylocationid,
        this.deliveryaddress,
        this.deliverysuburb,
        this.deliverylat,
        this.deliverylong,
        this.paymenttype,
        this.tenantname,
        this.tenanttoken,
        this.tenantsuburb,
        this.tenantcity,
        this.tenantcontactno,
        this.tenantpostcode,
        this.locationname,
        this.locationsuburb,
        this.locationcity,
        this.locationcontactno,
        this.rider,
        this.smsdelivery,
        this.ridercontactno,
        this.customertoken,
        this.ridertoken

      });

  OrderDetails.fromJson(Map<String, dynamic> json) {
    orderheaderid = json['orderheaderid'];
    applocationid = json['applocationid'];
    tenantid = json['tenantid'];
    partnerid = json['partnerid'];
    locationid = json['locationid'];
    categoryid = json['categoryid'];
    subcategoryid = json['subcategoryid'];
    moduleid = json['moduleid'];
    configid = json['configid'];
    orderid = json['orderid'];
    orderdate = json['orderdate'];
    deliverydate = json['deliverydate'];
    orderstatus = json['orderstatus'];
    itemcount = json['itemcount'];
    ordernotes = json['ordernotes'];
    kms = json['kms'];
    actualkms = json['actualkms'];
    pending = json['Pending'];
    processing = json['processing'];
    ready = json['ready'];
    cancelled = json['cancelled'];
    completed = json['completed'];
    assigned = json['assigned'];
    accepted = json['accepted'];
    picked = json['picked'];
    assigntime = json['assigntime'];
    starttime = json['starttime'];
    arrivaltime = json['arrivaltime'];
    pickuptime = json['pickuptime'];
    deliverytime = json['deliverytime'];
    canceltime = json['canceltime'];
    delivered = json['delivered'];
    deliverycharge = json['deliverycharge'];
    deliveryamt = json['deliveryamt'];
    customerid = json['customerid'];
    pickupcustomer = json['pickupcustomer'];
    pickupcontactno = json['pickupcontactno'];
    pickuplocationid = json['pickuplocationid'];
    pickupaddress = json['pickupaddress'];
    pickupsuburb = json['pickupsuburb'];
    pickupcity = json['pickupcity'];
    pickuplat = json['pickuplat'];
    pickuplong = json['pickuplong'];
    deliveryid = json['deliveryid'];
    deliverycustomer = json['deliverycustomer'];
    deliverycontactno = json['deliverycontactno'];
    deliverylocationid = json['deliverylocationid'];
    deliveryaddress = json['deliveryaddress'];
    deliverysuburb = json['deliverysuburb'];
    deliverylat = json['deliverylat'];
    deliverylong = json['deliverylong'];
    paymenttype = json['paymenttype'];
    tenantname = json['tenantname'];
    tenanttoken = json['tenanttoken'];
    tenantsuburb = json['tenantsuburb'];
    tenantcity = json['tenantcity'];
    tenantcontactno = json['tenantcontactno'];
    tenantpostcode = json['tenantpostcode'];
    locationname = json['locationname'];
    locationsuburb = json['locationsuburb'];
    locationcity = json['locationcity'];
    locationcontactno = json['locationcontactno'];
    rider = json['rider'];
    smsdelivery = json['smsdelivery'];
    ridercontactno = json['ridercontactno'];
    customertoken = json['customertoken'];
    ridertoken = json['ridertoken'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['orderheaderid'] = this.orderheaderid;
    data['applocationid'] = this.applocationid;
    data['tenantid'] = this.tenantid;
    data['partnerid'] = this.partnerid;
    data['locationid'] = this.locationid;
    data['categoryid'] = this.categoryid;
    data['subcategoryid'] = this.subcategoryid;
    data['moduleid'] = this.moduleid;
    data['configid'] = this.configid;
    data['orderid'] = this.orderid;
    data['orderdate'] = this.orderdate;
    data['deliverydate'] = this.deliverydate;
    data['orderstatus'] = this.orderstatus;
    data['itemcount'] = this.itemcount;
    data['ordernotes'] = this.ordernotes;
    data['kms'] = this.kms;
    data['actualkms'] = this.actualkms;
    data['Pending'] = this.pending;
    data['processing'] = this.processing;
    data['ready'] = this.ready;
    data['cancelled'] = this.cancelled;
    data['completed'] = this.completed;
    data['assigned'] = this.assigned;
    data['accepted'] = this.accepted;
    data['picked'] = this.picked;
    data['delivered'] = this.delivered;
    data['assigntime'] = this.assigntime;
    data['starttime'] = this.starttime;
    data['arrivaltime'] = this.arrivaltime;
    data['pickuptime'] = this.pickuptime;
    data['deliverytime'] = this.deliverytime;
    data['canceltime'] = this.canceltime;
    data['delivered'] = this.delivered;
    data['deliverycharge'] = this.deliverycharge;
    data['deliveryamt'] = this.deliveryamt;
    data['customerid'] = this.customerid;
    data['pickupcustomer'] = this.pickupcustomer;
    data['pickupcontactno'] = this.pickupcontactno;
    data['pickuplocationid'] = this.pickuplocationid;
    data['pickupaddress'] = this.pickupaddress;
    data['pickupsuburb'] = this.pickupsuburb;
    data['pickupcity'] = this.pickupcity;
    data['pickuplat'] = this.pickuplat;
    data['pickuplong'] = this.pickuplong;
    data['deliveryid'] = this.deliveryid;
    data['deliverycustomer'] = this.deliverycustomer;
    data['deliverycontactno'] = this.deliverycontactno;
    data['deliverylocationid'] = this.deliverylocationid;
    data['deliveryaddress'] = this.deliveryaddress;
    data['deliverysuburb'] = this.deliverysuburb;
    data['deliverylat'] = this.deliverylat;
    data['deliverylong'] = this.deliverylong;
    data['paymenttype'] = this.paymenttype;
    data['tenantname'] = this.tenantname;
    data['tenanttoken'] = this.tenanttoken;
    data['tenantsuburb'] = this.tenantsuburb;
    data['tenantcity'] = this.tenantcity;
    data['tenantcontactno'] = this.tenantcontactno;
    data['tenantpostcode'] = this.tenantpostcode;
    data['locationname'] = this.locationname;
    data['locationsuburb'] = this.locationsuburb;
    data['locationcity'] = this.locationcity;
    data['locationcontactno'] = this.locationcontactno;
    data['rider'] = this.rider;
    data['smsdelivery'] = this.smsdelivery;
    data['ridercontactno'] = this.ridercontactno;
    data['customertoken'] = this.customertoken;
    data['ridertoken'] = this.ridertoken;
    return data;
  }
}


