78 lines
2.0 KiB
Dart
78 lines
2.0 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final landRef = landRefFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
LandRef landRefFromJson(String str) => LandRef.fromJson(json.decode(str));
|
|
|
|
String landRefToJson(LandRef data) => json.encode(data.toJson());
|
|
|
|
class LandRef {
|
|
final int? id;
|
|
final int? bldgapprDetailsId;
|
|
final String? assessedById;
|
|
final String? assessedByName;
|
|
final DateTime? dateCreated;
|
|
final DateTime? dateModified;
|
|
final dynamic owner;
|
|
final dynamic cloaNo;
|
|
final dynamic lotNo;
|
|
final dynamic tdn;
|
|
final dynamic area;
|
|
final dynamic surveyNo;
|
|
final dynamic blkNo;
|
|
|
|
LandRef({
|
|
this.id,
|
|
this.bldgapprDetailsId,
|
|
this.assessedById,
|
|
this.assessedByName,
|
|
this.dateCreated,
|
|
this.dateModified,
|
|
this.owner,
|
|
this.cloaNo,
|
|
this.lotNo,
|
|
this.tdn,
|
|
this.area,
|
|
this.surveyNo,
|
|
this.blkNo,
|
|
});
|
|
|
|
factory LandRef.fromJson(Map<String, dynamic> json) => LandRef(
|
|
id: json["id"],
|
|
bldgapprDetailsId: json["bldgappr_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"]),
|
|
owner: json["owner"],
|
|
cloaNo: json["cloa_no"],
|
|
lotNo: json["lot_no"],
|
|
tdn: json["tdn"],
|
|
area: json["area"],
|
|
surveyNo: json["survey_no"],
|
|
blkNo: json["blk_no"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"bldgappr_details_id": bldgapprDetailsId,
|
|
"assessed_by_id": assessedById,
|
|
"assessed_by_name": assessedByName,
|
|
"date_created": dateCreated?.toIso8601String(),
|
|
"date_modified": dateModified?.toIso8601String(),
|
|
"owner": owner,
|
|
"cloa_no": cloaNo,
|
|
"lot_no": lotNo,
|
|
"tdn": tdn,
|
|
"area": area,
|
|
"survey_no": surveyNo,
|
|
"blk_no": blkNo,
|
|
};
|
|
}
|