
class ConsumptionModel {
  String tank_name = '';
  String water_level='';
  String block='';
  String type_of_water='';
  String capacity='';
  String location='';
  String consumedWater='';

  ConsumptionModel();

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

    rtvm.tank_name = json['tankname'] ?? '';
    rtvm.consumedWater = json['totalConsumption'].toString() ?? '';
    rtvm.block = json['block'].toString() ?? '';
    rtvm.type_of_water = json['TypeofWater'].toString() ?? '';
    rtvm.capacity = json['capacity'].toString() ?? '';
    rtvm.location = json['location'].toString() ?? '';
    rtvm.water_level = json['waterlevel'].toString() ?? '';





    return rtvm;
  }
  Map<String, dynamic> toJson() => {
    "tankname":this.tank_name,
    "waterLevel": this.water_level ,
  };
}