class TankersModel {

  String tanker_name = '';
  String address = '';
  String type_of_water = '';
  String capacity = '';
  String price = '';
  String delivery_fee = '';
  String dbId = '';
  String status='';
  String license_plate='';
  String supplier_name='';
  String manufacturing_year='';
  String insurance_expiry='';
  String tanker_type='';
  String pumping_fee='';

  List<dynamic> availability= [];
  List<dynamic> images= [];

  /// ADD THIS
  List<dynamic> blocked_dates = [];

  TankersModel();

  factory TankersModel.fromJson(Map<String, dynamic> json){

    TankersModel rtvm =
    TankersModel();

    rtvm.tanker_name =
        json['tankerName'] ?? '';

    rtvm.dbId =
        json['_id'] ?? '';

    rtvm.address =
        json['supplier_address'] ?? '';

    rtvm.type_of_water =
        json['typeofwater'] ?? '';

    rtvm.capacity =
        json['capacity'] ?? '';

    rtvm.license_plate =
        json['license_plate'] ?? '';

    rtvm.supplier_name =
        json['supplier_name'] ?? '';

    rtvm.price =
        json['price'] ?? '';

    rtvm.delivery_fee =
        json['delivery_fee'] ?? '';

    rtvm.availability =
        json['availability'] ?? [];

    rtvm.images =
        json['images'] ?? [];

    /// ADD THIS
    rtvm.blocked_dates =
        json['blocked_dates'] ?? [];

    rtvm.manufacturing_year =
        json['manufacturing_year'] ?? '';

    rtvm.insurance_expiry =
        json['insurance_exp_date'] ?? '';

    rtvm.tanker_type =
        json['tanker_type'] ?? '';

    rtvm.pumping_fee =
        json['pumping_fee'] ?? '';

    return rtvm;

  }

  Map<String, dynamic> toJson() => {

    "tankerName": tanker_name,

  };

}