toMap method
Implementation
Map<String, dynamic> toMap() => {
"createdAt": createdAt,
"updatedAt": updatedAt,
"userId": userId,
"id": id,
"reference": reference,
"order_desc": orderDesc,
"coupon_code": couponCode,
"platform": platform,
"currency_name": currencyName,
"currency_code": currencyCode,
"delivery_address": deliveryAddress,
"total_qty": totalQty,
"total": total,
"subtotal": subtotal,
"total_discount": totalDiscount,
"total_paid": totalPaid,
"balance": balance,
"total_margin": totalMargin,
"delivery_charge": deliveryCharge,
"vat": vat,
"status": status,
"offline_sale": offlineSale,
"manual_sale": manualSale,
"date_synced": dateSynced,
"viewed": viewed,
"items": items == null ? [] : List<dynamic>.from(items!.map((x) => x.toMap())),
"channel": channel,
"customer": customer?.toMap(),
"staff": staff,
"delivery": delivery?.toMap(),
};