passo_mobile_app/lib/model/passo/other_improvements.dart

105 lines
3.2 KiB
Dart

// To parse this JSON data, do
//
// final otherImprovements = otherImprovementsFromJson(jsonString);
import 'dart:convert';
OtherImprovements otherImprovementsFromJson(String str) =>
OtherImprovements.fromJson(json.decode(str));
String otherImprovementsToJson(OtherImprovements data) =>
json.encode(data.toJson());
class OtherImprovements {
final int? id;
final int? landapprDetailsId;
final String? kindsOfTrees;
final String? subclassAge;
final int? quantity;
final String? unitValue;
final String? baseMarketval;
final int? noOfProductive;
final int? noOfNonproductive;
final String? fruitBearing;
OtherImprovements({
this.id,
this.landapprDetailsId,
this.kindsOfTrees,
this.subclassAge,
this.quantity,
this.unitValue,
this.baseMarketval,
this.noOfProductive,
this.noOfNonproductive,
this.fruitBearing,
});
OtherImprovements copy({
final int? id,
final int? landapprDetailsId,
final String? kindsOfTrees,
final String? subclassAge,
final int? quantity,
final String? unitValue,
final String? baseMarketval,
final int? noOfProductive,
final int? noOfNonproductive,
final String? fruitBearing,
}) {
return OtherImprovements(
id: id ?? this.id,
landapprDetailsId: landapprDetailsId ?? this.landapprDetailsId,
kindsOfTrees: kindsOfTrees ?? this.kindsOfTrees,
subclassAge: subclassAge ?? this.subclassAge,
quantity: quantity ?? this.quantity,
unitValue: unitValue ?? this.unitValue,
baseMarketval: baseMarketval ?? this.baseMarketval,
noOfProductive: noOfProductive ?? this.noOfProductive,
noOfNonproductive: noOfNonproductive ?? this.noOfNonproductive,
fruitBearing: fruitBearing ?? this.fruitBearing,
);
}
factory OtherImprovements.fromJson(Map<String, dynamic> json) =>
OtherImprovements(
id: json["id"],
landapprDetailsId: json["landappr_details_id"],
kindsOfTrees: json["kinds_of_trees"],
subclassAge: json["subclass_age"],
quantity: json["quantity"],
unitValue: json["unit_value"],
baseMarketval: json["base_marketval"],
noOfProductive: json["no_of_productive"],
noOfNonproductive: json["no_of_nonproductive"],
fruitBearing: json["fruit_bearing"],
);
factory OtherImprovements.fromJson2(Map<String, dynamic> json) =>
OtherImprovements(
id: json["id"],
landapprDetailsId: json["landapprDetailsId"],
kindsOfTrees: json["kindsOfTrees"],
subclassAge: json["subclassAge"],
quantity: json["quantity"],
unitValue: json["unitValue"],
baseMarketval: json["baseMarketval"],
noOfProductive: json["noOfProductive"],
noOfNonproductive: json["noOfNonproductive"],
fruitBearing: json["fruitBearing"],
);
Map<String, dynamic> toJson() => {
"id": id,
"landappr_details_id": landapprDetailsId,
"kinds_of_trees": kindsOfTrees,
"subclass_age": subclassAge,
"quantity": quantity,
"unit_value": unitValue,
"base_marketval": baseMarketval,
"no_of_productive": noOfProductive,
"no_of_nonproductive": noOfNonproductive,
"fruit_bearing": fruitBearing,
};
}