class OrderSummary {
  int? code;
  OrderSummaryDetails? details;
  String? message;
  bool? status;

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

  OrderSummary.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    details =
    json['details'] != null ? new OrderSummaryDetails.fromJson(json['details']) : null;
    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!.toJson();
    }
    data['message'] = this.message;
    data['status'] = this.status;
    return data;
  }
}

class OrderSummaryDetails {
  int? total;
  int? created;
  int? pending;
  int? accepted;
  int? picked;
  int? delivered;
  int? cancelled;

  OrderSummaryDetails(
      {this.total,
        this.created,
        this.pending,
        this.accepted,
        this.picked,
        this.delivered,
        this.cancelled});

  OrderSummaryDetails.fromJson(Map<String, dynamic> json) {
    total = json['total'];
    created = json['created'];
    pending = json['pending'];
    accepted = json['accepted'];
    picked = json['picked'];
    delivered = json['delivered'];
    cancelled = json['cancelled'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total'] = this.total;
    data['created'] = this.created;
    data['pending'] = this.pending;
    data['accepted'] = this.accepted;
    data['picked'] = this.picked;
    data['delivered'] = this.delivered;
    data['cancelled'] = this.cancelled;
    return data;
  }
}
