passo_mobile_app/lib/model/passo/land_ref.dart

78 lines
2.0 KiB
Dart
Raw Normal View History

2023-07-28 02:35:36 +00:00
// 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 {
2023-09-01 03:22:48 +00:00
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;
2023-07-28 02:35:36 +00:00
LandRef({
this.id,
this.bldgapprDetailsId,
2023-09-01 03:22:48 +00:00
this.assessedById,
this.assessedByName,
this.dateCreated,
this.dateModified,
2023-07-28 02:35:36 +00:00
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"],
2023-09-01 03:22:48 +00:00
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"]),
2023-07-28 02:35:36 +00:00
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,
2023-09-01 03:22:48 +00:00
"assessed_by_id": assessedById,
"assessed_by_name": assessedByName,
"date_created": dateCreated?.toIso8601String(),
"date_modified": dateModified?.toIso8601String(),
2023-07-28 02:35:36 +00:00
"owner": owner,
"cloa_no": cloaNo,
"lot_no": lotNo,
"tdn": tdn,
"area": area,
"survey_no": surveyNo,
"blk_no": blkNo,
};
}