import 'package:flutter/material.dart';


class OrdersYetDeliveryModel {
  String tankerName = '';
  String bookingid = '';
  String supplierId = '';
  String dateOfOrder='';
  String typeofwater='';
  String delivery_agent_mobile='';
  String capacity='';
  String address='';
  String price='';
  String customerId='';
  String startTime = '';
  String stopTime = '';
  String orderStatus = '';
  String initialWaterLevel = '';
  String finalWaterLevel = '';
  String quantityDelivered = '';
  String amountPaid = '';
  String amountDue = '';
  String paymentMode = '';
  String deliverdWater = '';
  String supplierName = '';
  String deliveryAgent = '';
  var tankerRunningStatus ;
  String expectedDateOfDelivery='';
  double lat=0;
  double lng=0;
  double delivery_latitude=0;
  double delivery_longitude=0;









  Color cardColor=Colors.white;

  OrdersYetDeliveryModel();

  factory OrdersYetDeliveryModel.fromJson(Map<String, dynamic> json){
    OrdersYetDeliveryModel rtvm = new OrdersYetDeliveryModel();

    rtvm.tankerName = json['tankerName'] ?? '';
    rtvm.bookingid = json['bookingid'] ?? '';
    rtvm.supplierId = json['supplierId'] ?? '';
    rtvm.dateOfOrder = json['dateOfOrder'] ??'';
    rtvm.typeofwater = json['typeofwater'] ??'';
    rtvm.supplierName = json['supplierName'] ??'';
    rtvm.delivery_agent_mobile = json['delivery_agent_mobile'] ??'';
    rtvm.capacity = json['capacity'] ??'';
    rtvm.address = json['address'] ??'';
    rtvm.price = json['price'] ??'';
    rtvm.orderStatus = json['orderStatus'] ??'';
    rtvm.customerId = json['customerId'] ??'';
    rtvm.startTime = json['start_time'] ??'';
    rtvm.stopTime = json['stop_time'] ??'';
    rtvm.initialWaterLevel = json['initial_water_level'] ??'';
    rtvm.finalWaterLevel = json['final_water_level'] ??'';
    rtvm.quantityDelivered = json['quantityDelivered'] ??'';
    rtvm.amountPaid = json['amount_paid'] ??'';
    rtvm.amountDue = json['amount_due'] ??'';
    rtvm.paymentMode = json['payment_mode'] ??'';
    rtvm.deliverdWater = json['quantityDelivered'] ??'';
    rtvm.deliveryAgent = json['delivery_agent'] ??'';
    rtvm.tankerRunningStatus = json['tankerRunningStatus'] ??'';
    rtvm.expectedDateOfDelivery = json['expectedDateOfDelivery'] ??'';


    rtvm.lat = json['latitude'] ??0;
    rtvm.lng = json['longitude'] ??0;
    rtvm.delivery_latitude = json["deliveryBoyLocation"]['deliveryboy_latitude'] ??0;
    rtvm.delivery_longitude = json["deliveryBoyLocation"]['deliveryboy_longitude'] ??0;

    return rtvm;
  }

}