69 lines
1.9 KiB
Dart
69 lines
1.9 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final lnadPropertyLoc = lnadPropertyLocFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
LandPropertyLoc lnadPropertyLocFromJson(String str) =>
|
|
LandPropertyLoc.fromJson(json.decode(str));
|
|
|
|
String lnadPropertyLocToJson(LandPropertyLoc data) =>
|
|
json.encode(data.toJson());
|
|
|
|
class LandPropertyLoc {
|
|
final int? id;
|
|
final int? landapprDetailsId;
|
|
final String? assessedById;
|
|
final String? assessedByName;
|
|
final DateTime? dateCreated;
|
|
final DateTime? dateModified;
|
|
final String? street;
|
|
final String? municipality;
|
|
final String? barangay;
|
|
final String? province;
|
|
|
|
LandPropertyLoc({
|
|
this.id,
|
|
this.landapprDetailsId,
|
|
this.assessedById,
|
|
this.assessedByName,
|
|
this.dateCreated,
|
|
this.dateModified,
|
|
this.street,
|
|
this.municipality,
|
|
this.barangay,
|
|
this.province,
|
|
});
|
|
|
|
factory LandPropertyLoc.fromJson(Map<String, dynamic> json) =>
|
|
LandPropertyLoc(
|
|
id: json["id"],
|
|
landapprDetailsId: json["landappr_details_id"],
|
|
assessedById: json["assessed_by_id"],
|
|
assessedByName: json["assessed_by_name"],
|
|
dateCreated: json["date_created"] == null
|
|
? null
|
|
: DateTime.parse(json["date_created"]),
|
|
dateModified: json["date_modified"] == null
|
|
? null
|
|
: DateTime.parse(json["date_modified"]),
|
|
street: json["street"],
|
|
municipality: json["municipality"],
|
|
barangay: json["barangay"],
|
|
province: json["province"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"landappr_details_id": landapprDetailsId,
|
|
"assessed_by_id": assessedById,
|
|
"assessed_by_name": assessedByName,
|
|
"date_created": dateCreated?.toIso8601String(),
|
|
"date_modified": dateModified?.toIso8601String(),
|
|
"street": street,
|
|
"municipality": municipality,
|
|
"barangay": barangay,
|
|
"province": province,
|
|
};
|
|
}
|