// To parse this JSON data, do
//
//     final orderResponse = orderResponseFromJson(jsonString);

import 'dart:convert';

OrderResponse orderResponseFromJson(String str) => OrderResponse.fromJson(json.decode(str));

String orderResponseToJson(OrderResponse data) => json.encode(data.toJson());

class OrderResponse {
  OrderResponse({
    this.id,
    this.name,
    this.listOrder,
  });

  int? id;
  String? name;
  List<ListOrder>? listOrder;

  factory OrderResponse.fromJson(Map<String, dynamic> json) => OrderResponse(
    id: json["id"],
    name: json["name"],
    listOrder: List<ListOrder>.from(json["listOrder"].map((x) => ListOrder.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "id": id,
    "name": name,
    "listOrder": List<dynamic>.from(listOrder!.map((x) => x.toJson())),
  };
}

class ListOrder {
  ListOrder({
    this.id,
    this.thumb,
    this.title,
    this.shop,
    this.payment,
    this.note,
    this.quantity,
    this.price,
    this.product,
    this.text_total,
    this.total,
    this.time,
    this.text,
  });

  int? id;
  String? thumb;
  String? title;
  String? shop;
  String? payment;
  String? note;
  String? quantity;
  String? price;
  String? product;
  String? text_total;
  String? total;
  String? time;
  String? text;

  factory ListOrder.fromJson(Map<String, dynamic> json) => ListOrder(
    id: json["id"],
    thumb: json["thumb"],
    title: json["title"],
    shop: json["shop"],
    payment: json["payment"],
    note: json["note"],
    quantity: json["quantity"],
    price: json["price"],
    product: json["product"],
    text_total: json["text_total"],
    total: json["total"],
    time: json["time"],
    text: json["text"],
  );

  Map<String, dynamic> toJson() => {
    "id": id,
    "thumb": thumb,
    "title": title,
    "shop": shop,
    "payment": payment,
    "note": note,
    "quantity": quantity,
    "price": price,
    "product": product,
    "text_total": text_total,
    "total": total,
    "time": time,
    "text": text,
  };
}
