130 lines
3.6 KiB
Dart
130 lines
3.6 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,
|
|
});
|
|
|
|
LandRef copy({
|
|
int? id,
|
|
int? bldgapprDetailsId,
|
|
String? assessedById,
|
|
String? assessedByName,
|
|
DateTime? dateCreated,
|
|
DateTime? dateModified,
|
|
String? owner,
|
|
String? cloaNo,
|
|
String? lotNo,
|
|
String? tdn,
|
|
String? area,
|
|
String? surveyNo,
|
|
String? blkNo,
|
|
}) {
|
|
return LandRef(
|
|
id: id ?? this.id,
|
|
bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
|
|
assessedById: assessedById ?? this.assessedById,
|
|
assessedByName: assessedByName ?? this.assessedByName,
|
|
dateCreated: dateCreated ?? this.dateCreated,
|
|
dateModified: dateModified ?? this.dateModified,
|
|
owner: owner ?? this.owner,
|
|
cloaNo: cloaNo ?? this.cloaNo,
|
|
lotNo: lotNo ?? this.lotNo,
|
|
tdn: tdn ?? this.tdn,
|
|
area: area ?? this.area,
|
|
surveyNo: surveyNo ?? this.surveyNo,
|
|
blkNo: blkNo ?? 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"],
|
|
);
|
|
|
|
factory LandRef.fromJson2(Map<String, dynamic> json) => LandRef(
|
|
id: json["id"],
|
|
bldgapprDetailsId: json["bldgapprDetailsId"],
|
|
assessedById: json["assessedById"],
|
|
assessedByName: json["assessedByName"],
|
|
dateCreated: json["dateCreated"] == null
|
|
? null
|
|
: DateTime.parse(json["dateCreated"]),
|
|
dateModified: json["dateModified"] == null
|
|
? null
|
|
: DateTime.parse(json["dateModified"]),
|
|
owner: json["owner"],
|
|
cloaNo: json["cloaNo"],
|
|
lotNo: json["lotNo"],
|
|
tdn: json["tdn"],
|
|
area: json["area"],
|
|
surveyNo: json["surveyNo"],
|
|
blkNo: json["blkNo"],
|
|
);
|
|
|
|
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,
|
|
};
|
|
}
|